Help - Search - Members - Calendar
Full Version: A Multiple Partition USB Stick with Multi Boot OS
MSFN Forums > Unattended Windows Discussion & Support > Multi-Boot CD/DVDs

   


Google Internet Forums Unattended CD/DVD Guide
Markymoo
A Multiple Partition USB Stick with Multi Boot OS

Scroll down for 5/4/2006 update

I wanted several operating systems on a USB stick and after many hours messing with syslinux, memdisk, grub4dos, xosl, freedos, avlgomgr, acronis os selector, ranish partition manager. I have succumbed. I first started out wanting to boot an iso off USB and ran into trouble loading large img with memdisk which I found out is due to a bug in msdos so I used freedos but things didn’t work out as planned and it’s a similar woe story’s with the rest. Acronis os selector lets you boot multiple os from one partition from different folders but don’t work great when it comes to dos.

I have 5 partitions on my USB stick and using the boot loader BootIt NG http://www.bootitng.com/bootitng.html This is a 30 day trial. There’s a iso boot image inside the zip you need to burn to cd.

Now I wasn’t happy just putting one os on my USB stick. I wanted linux and diagnostic tools etc.

I now have what I think is the easiest helpful solution below.

Stage 1.

Ok XP can only see one partition on a removable USB but if change the USB driver to a fixed disk driver then XP will see it as a hard drive then we can have lay down multiple partitions as we like. Now open regedit and goto HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR
and double click on USBSTORE and you see a subkey below it, select the first subkey below USBSTORE and right click and select Copy Key Name

Here is mine, yours maybe different.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

Now we need only need this part:

USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

Copy and paste it temporarily into notepad.

You will now need this driver. http://www.xpefiles.com/viewtopic.php?t=92
Unpack it to a folder on your desktop. Inside the folder is the file cfadisk.inf. You need to open this file and scroll down to you see the line %Microdrive_devdesc% = cfadisk_install, specific data
Now you need to replace all lines %Microdrive_devdesc% = cfadisk_install, specific data with
the line you copied from your registry like so.

%Microdrive_devdesc% = cfadisk_install,USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

There could be more lines so replace all and save the file.

Goto Device Manager and click on disk drives. You see your USB listed, dbl click on it and goto the driver tab and click update driver and install from a specific location and choose the driver to install and click on Have Disk and browse to the cfadisk.inf file your modified driver on your desktop and force that to replace your existing driver. It might ask you to reboot. You should now have your USB showing as Local Disk

We want your first partition dos bootable so run HP USB Disk Storage Format Tool. I’m using version 2.1.8. Select your drive letter of your USB device and select "Create a DOS startup disk" and browse to your 98 boot disk folder. Click Start. Your USB will be formatted and 3 files will be copied from your dos startup files. You need to manually copy the rest of the 98 boot files to your USB drive.

You can now resize the drive (mines 512MB) and create multiple partitions. All partition software now sees it as a fixed disk. I used acronis disk director and resized the partition keeping the first dos bootable partition intact and made another 4 fat partitions so I had 5 in total.

Make sure your format all partitions as Primary not Logical.

I now make all the os for each drive on my USB, so for example I copy all linux files to the root of I: and then syslinux I:

G: Dos bootable drive
H: BartPE2USB
I: Dsl Linux
J: UBCD
K: Partition Tools

So this way makes it easy to load multiple iso using ramdisk also. thumbup.gif

Stage 2

Insert your BootIt NG cd you made earlier and your USB stick and reboot and change your bios to boot from cd and disable all hard drives from your bios so they not detected, that way you wont delete any hard drive data and you know your using the USB only. You can now install BootIt onto your USB stick. This is a simple install. It install on the first partition. It will detect all partitions. You can now add the partitions easily. Your USB shows up as HD0 and the separate partitions as MBR 1, 2 ,3 ,4 5 etc and boot from each one from the menu.

BootIt is not free. I am using this till i can workout a freeware solution.


EDIT: Here comes the better freeware solutions.

I going to explain simple easy way that works, on how to create a bartpe and dos dual-boot on an USB stick install each on separate partitions including a menu to select either. I will use 2 partitions for now.

Download spfdisk it’s a good boot loader which has many features and is free.
http://spfdisk.sourceforge.net/Spf2K3rE.exe We will be using this. Unpack it. You need 1 file only from it, spfdisk.exe.

Plan how much space to split up for dos and bartpe. Delete all your USB stick so it’s unallocated space and then create 2 partitions of fat to the size you need and format. Make the first partition dos.

Acquire or make a dos bootable cd or floppy and put spfdisk.exe on it. Make sure you match the dos version of your boot disk to same version of dos system files you be using on your usb.

Copy dos,ghost whatever files to your dos partititon and copy your bartpe files to the bartpe partititon.

Check you have the 2 files mkbt.exe & pe2usb.bin in your pebuilder folder. Download Pe2usb if not.
Open up a cmd box in your pebuilder dir and run the command:

“mkbt.exe -x pe2usb.bin N:” N being the letter of your bartpe partition.

Reboot and keep your USB stick in and boot off the dos cd or floppy.

Type the command sys drive: drive being the letter of your dos partititon.

Run spfdisk.exe in dos Create the menu to boot both partitions in spfdisk. Save the changes.



Reboot, take out your cd and boot up off the USB and its working.

Alternative method using WinGrub for multiboot usb

Download Wingrub http://sourceforge.net/project/showfiles.php?group_id=104188

Have the partitions formatted to fat.

Install WinGrub. Insert your USB stick

Note: Your usb stick partitions will be hd0,0 and hd0,1 when you boot on startup but will be different under windows, not showing as the first drive.



First time you rub Wingrub you see a box pop up called base setup. Click the drive letter of your USB stick and click Ok. Make sure its your USB stick you click and not your hard drive. In Wingrub right click in the menu table and click edit and paste the menu data below over the existing data in the edit box and click ok. now save it as a new name ending in .lst - If you need that menu again load it back in. You need to make a folder on your usb called boot and inside that another folder called grub and then copy your menu.lst to that folder.

timeout 30
color=white/blue

title Dos Utils
unhide (hd0,0)
hide (hd0,1)
rootnoverify (hd0,0)
chainloader +1
makeactive
boot

title BartPE
hide (hd0,0)
unhide (hd0,1)
rootnoverify (hd0,1)
chainloader +1
makeactive
boot

Now in tools menu click Install Grub. You going to install grub to the MBR. Now click the partition letter of your first partition of your USB stick then click install. 2 files have copied to your partition and your mbr is now patched with grub. How easy is that, no use of a disk editor needed. The original mbr is saved in the file MBR.ORG on your usb. You can now reboot test your usb stick and use the grub menu.

e-t-c
Maybe You can use this Bootmanager (Private = Free) smile.gif

http://www.boot-us.de/download.htm

salü
Wolfgang e-t-c
Bilou_Gateux
@Markymoo
Congratulations for this fine tutorial.

Step 1: done!
One Olympus MAUSB-300 Portable Reader / Writer with one xD-Picture Card inserted is now seen as a basic disk in Disk Management console (diskmgmt.msc).

Some input: you can change the string in CFADISK.INF to reflect the exact name of your hardware
QUOTE
[cfadisk_device]%MAUSB-300_devdesc% = cfadisk_install,USBSTOR\Disk&Ven_OLYMPUS&Prod_MAUSB-300&Rev_1.00

[Strings]
MAUSB-300_devdesc = "Olympus MAUSB-300"


The 256 Mb xD-Picture Card was previously formated with WinPE 2K3 SP1 OPK CD formatufd.exe tool. One single partition.



Step 2: Done but factory.exe fails to initialize NIC. no.gif

Boot PE from Hard Drive

The same image works fine when booted from Hard Drive. I must retrieve some posts from this board and www.911cd.net/forums board users who have the same issues.



Step 3: not enough time to achieve this because i should deliver the writer/reader to my customer soon.

Boot Windows XP Embedded w/SP1 from this UFD. no.gif

Request to all members:

if someone as already done this with one SanDisk MobileMate Reader , please report your eXPerience.

i would like to buy one to play with it and SanDisk Extreme® III SD™ Cards

it should probably works because it can be done with Puppy Linux distro.
Markymoo
QUOTE (e-t-c @ Mar 13 2006, 09:56 AM) *
Maybe You can use this Bootmanager (Private = Free) smile.gif

http://www.boot-us.de/download.htm

salü
Wolfgang e-t-c


Nice try, Its no good for usb.

The best solution is to use grub. Installing grub is easiest with linux. I will update my guide soon
jaclaz
@Markymoo
QUOTE
The best solution is to use grub. Installing grub is easiest with linux. I will update my guide soon


You might be interested in my reply to your post in 911CD:
http://www.911cd.net/forums//index.php?sho...ic=10806&st=268


(you could get some ideas to expand your tutorial) thumbup.gif

jaclaz
EchoNoise
Why not just try syslinux... lol
Markymoo
QUOTE (undeadsoldier @ Mar 16 2006, 04:24 PM) *
Why not just try syslinux... lol


because i want to use big img's and these take time to load up with memdisk same with ramdisk, plus theres issues with memdisk and io.sys, plus syslinux needs fat and yes there is freedos as a workaround. so saying all that i am impatient and dont want to wait when partitions just run it instant.

QUOTE (jaclaz @ Mar 16 2006, 05:11 AM) *
@Markymoo
QUOTE

The best solution is to use grub. Installing grub is easiest with linux. I will update my guide soon


You might be interested in my reply to your post in 911CD:
http://www.911cd.net/forums//index.php?sho...ic=10806&st=268


(you could get some ideas to expand your tutorial) thumbup.gif

jaclaz


ta jaclaz respect. it should be you writing the tutorials. im sure you can do awesome with your vast knowledge and i dont mean pasting x number of bytes into the bootblock but more friendly.

i just bought a usb external hard drive, its a full scale limitless bootable solution, it be interesting to know when those with xp on there usb sticks give up the ghost (joke get it) how long they last
Markymoo
@Bilou_Gateux

cheers! if i can help people complete the jigsaw, there are people with the solutions in the heads already but less on paper. you see snippets here snippets there but nothing concrete. its like we all know the twin towers didnt fall down just due to planes.

i dont think it matters what the hardware called as long as you get the end result

i just revived data from a laptop from utils off my usb where the partition was mostly detroyed but i managed to browse the files on the damaged partiton and burn to dvd-rw in one go. how cool is that!
chazco
This has really helped me with a project i've been working on, but how do you uninstall the driver and revert to showing as a removable device?
Markymoo
@chazco
simple, same place you install the driver in hardware devices theres a rollback option to revert back to the previous driver which will be your original
chazco
Thanks for the reply - i tried that already though. I'll explain in more detail...

I'm creating a Windows - based Linux installer huh.gif for handheld PC's, and needed to partiton compact flash cards. My setup installed the driver using an application called "infpinst" which can be run from a command line. Unfortunatly, this seems to prevent roll-back from working. I can uninstall the old driver using infpinst, but then Windows refuses to detect them as mass storage.

Any suggestions...
Markymoo
just use a generic usb driver, theres quite a few around.

you need these

Usbport.sys
Usbhub.sys
Hccoin.dll
Usbehci.sys

or just find out your manufacturer
jaclaz
Good work, Markymoo. smile.gif

Just for the record Wingrub development is on hold, the GRUB4DOS version it has is corresponding to 0.91, whilst GRUB4DOS is up 0.4.1 - corresponding to 0.97 (stable) and and 0.4.2pre is just out:
http://sarovar.org/projects/grub4dos/

You can use allright the Wingrub to make the menu.lst, but it is better if you use the latest grub4dos as the actual bootloader.

You do not actually need to INSTALL it.
You can format the key under NT/2K/XP/2003 (so that the bootrecord invokes NTLDR), then you copy to the stick:
menu.lst (it can be either in ROOT, /boot/, /boot/grub/)
NTLDR
GRLDR
and you add a boot.ini file with this entry (at least):
C:\GRLDR="Start GRUB"

If you format the key as a (win9x) DOS disk (so that bootrecord invokes io.sys/msdos.sys/command.com)
you add to the stick:
menu.lst (it can be either in ROOT, /boot/, /boot/grub/)
GRUB.EXE
and (optionally) you add to your autoexec.bat the line:
GRUB.EXE
(or you can input it on comand prompt, only when you need to shift partitions)

@Markymoo
Where did you get that splashimage?

jaclaz
Markymoo
yes i agree with you. but this is the newbie guide. the splash image i got off the web, is that a trick question because it has softpedia burnt into the background of the image.
jaclaz
NO, I just asked because it was nice and it is not easy to make a GRUB image.

Here is my experience on those images:
QUOTE
SPLASHIMAGE
GRUB allows using a splashimage, sort of a background.
Here are the NEEDED features of the slashimage:
1) The image MUST be 640x480
2) The image MUST have a maximum of 14 colours
3) The image MUST be in the .xpm format (and can later be gzipped)

The Windows 32 port of the Gimp saves in a .xpm format that is NOT compatible with GRUB.
http://www.gimp.org/windows/
You will need the Windows 32 port of ImageMagick.
http://www.imagemagick.org/script/index.php

Draw your image in your preferred graphic program, save it as .BMP with a 14 colours palette (if your graphic program does not allow this, use the Gimp to open the .BMP, limit the palette to 14 colours and save it again as .BMP).
Now open a command prompt window, navigate to your ImageMagick install directory and give this command:
convert picture.bmp picture.xpm
Preview the result with the Gimp, check that colours are really limited to 14, DO NOT save the image with the Gimp!
If result is OK, re-run as follows:
convert picture.bmp picture.xpm.gz
(or you can use 7zip to gzip the image previously made)
Please note that it is important to do the above because if you try to use, as you should theoretically: convert -colors 14 picture.bmp picture.xpm.gz
starting from a, say, 256 colours image, the palette will NOT be optimized and result will be VERY POOR.
After having tested that the image works with GRUB, you should spend sometime experimenting with the two settings:
Foreground=xxyyzz
Background=xxyyzz
These are coded colours (RGB, same as used in HTML) that apply to the TEXT superimposed by GRUB (normal/highlighted).

Since I am a very bad "painter", I have found that a quick way to get acceptable results is to start from a 16 colours 640x480 image, they used to be backgrounds for Windows 3.1 and can be found quite ieasily on the internet.


jaclaz
Markymoo
@jaclaz

ok apologies, i got it touring the web. i got it from the linux community like kde or gentoo if i can remember right. some here grub splash screens
http://schragehome.de/splash/
http://www.schultz-net.dk/grub.html
if your using linux heres a easy way to convert a image to grub format. it easy it just like the same way for cdshell. you cant get above 14 colours, it uses some form of vesa.it easy to convert a image to 640x480 you need gzip and

imagemagick http://www.imagemagick.org/script/index.php
and gimp http://www.gimp.org/

Quoted

1. Start the GIMP.
2. Click on File->New or type Ctrl+N
3. In the new image dialog, change Width to 640 pixels and Height to 480 pixels. (The image should be of size 640x480 pixels.) Now click OK.
4. Create the image which you would like to be the splash image. It's quite fun to experiment with the various tools of the GIMP!
5. After you have finished creating the image, hit Alt+i or right click on the image and click on Image->Mode->Indexed...
6. In the Indexed Color Conversion dialog that appears, click on the radio button "Generate optimal Palette" and in "# of colors" enter 14. Click OK.(The image should be of only 14 colors)
7. Now right-click on the image and click on File->Save As...Save the file as ImageName.xpm in a directory of your choice.

For some reasons i could not create *.xpm so i save it as *.png and then

convert ImageName.png ImageName.xpm

(convert is a part of media-gfx/imagemagick)

You can save image from this page and convert it skipping image creation hassle

Creating image (Imagemagick)

* You can also pick an image (any type supported by ImageMagick) and execute:

convert -resize 640x480 -colors 14 picture.jpg ImageName.xpm

Installing the Image

gzip ImageName.xpm
mount /boot
mv ImageName.xpm.gz /boot/grub/

* In the /boot/grub/grub.conf you have to point splashimage to newly created image i.e.

File: /boot/grub/grub.conf

# Splash Image
splashimage=(hd0,0)/grub/ImageName.xpm.gz
2dumb
Thanks for this great guide for partitioning USB sticks. I followed your outline and scuessfully created the parations I wanted and boot menue on my usb stick.
I am new to this stuff, now I need to know how to get a workable iso file on to my partitions!
fattest_cat
Hello I have been searching around for ages to see if its possible to split a flash usb into multiple drives.

You say above:
QUOTE
Ok XP can only see one partition on a removable USB but if change the USB driver to a fixed disk driver then XP will see it as a hard drive then we can have lay down multiple partitions as we like.


So does this mean that after the driver modification it would see multiple drives in XP but any other PC you stick the flash into would only see the first partition? ph34r.gif
johnbig
QUOTE (fattest_cat @ Feb 18 2007, 07:29 AM) *
So does this mean that after the driver modification it would see multiple drives in XP but any other PC you stick the flash into would only see the first partition? ph34r.gif


Yes, that is right! But this is the only way to force WinXP to see other partitons!
BTW, it is a good idea to add this driver to WinXP installation distributive. Any idea how to make this?
I think after driver integration it will be possible to install full (not PE) WinXP on USB flash drive! smile.gif
diginode
In this section most of the discuss on GRUB. But topic is USB stick partition.

I change & modified cfadisk.inf file. But when I try to install my kingston 1 GB usb driver from cfadisk.inf, XP says drive information found.
pls anyone give any sample cfadisk.inf as he modified.

Thanks.
firegun9
Hi,

This topic is just what I want!
But I have a problem following the instructions.

I have a SanDisk cruzer 4GB usb stick.
By changing the driver, it is recognized as a HD in XP.
I split it into three FAT16 partitions by using Partition Magic. (One thing to notice is that after launching partition magic, it complains about the space is not consistent for the usb stick, and I have to choose to fix it or the stick would be recognized as bad in Partition magic.)
Then I use WinGrub to install grub to the usb stick as the instructions said.
The partitions are all empty at this point.
When I reboot and try to boot from the usb stick, nothing happens. I mean the BIOS still launches from the hard drive even the usb stick has a higher boot priority.
stevesumner
Right, I got the Grub boot working. Only problem is when I use Markymoo's menu.lst it works the first time, but never again. the reason is that the partitions are hidden! So then I have to use a partition manager to unhide the partitions. Is there any way around this? Markymoo, what do you do once your partitions are hidden? I tried editing the menu.lst and removing the hide/unhide lines, but then BartPE would boot halfway and blue screen.

So far I have tried numerous methods and Markymoo's seems to be the best. I just need some help avoiding the hidden partition problem.
jaclaz
@stevesumner

What you report is VERY strange, markymoos entries in boot.ini come in pairs:
QUOTE
unhide (hd0,0)
hide (hd0,1)


QUOTE
hide (hd0,0)
unhide (hd0,1)


So everything should be cool.

However, you can add a "service" only entry in menu.lst, something like:
CODE
title Unhide all partitions
unhide (hd0,0)
unhide (hd0,1)


and choose it when you find problems, if it works, nothing prevents you from adding the two line at the top of each entry.

FYI, this interesting tutorial by markymoo appears to be a bit dated now, there are other ways to boot, expecially the direct chainloading feature of system files from grub4dos and the mapping features, so that in most cases hiding/unhiding partitions is not necessary.

jaclaz
stevesumner
Hmmm, not sure what I did. I found that after booting and getting the blue screen from BartPE, the next time grub wouldn't even work, it would just say
try (hd 0,0) fat 16
try (hd 0,1) fat 16
error

Or something like that from memory. Then when I plugged my USB back into Windows PC and checked in Explorer one drive had become hidden, a bit of a nuisance.

I changed the second partition to the iso method and ramdrive and now the USB boots fine, maybe there was something wrong with my partitions and using the "pe2usb -f f:" command with the -f format switch fixed it? Still end up with a hidden partition which is not ideal.

I would be interested in which method you prefer and what your menu.lst file would have, if you use grub as a bootloader, jaclaz.
jaclaz
QUOTE (stevesumner)
I would be interested in which method you prefer and what your menu.lst file would have, if you use grub as a bootloader, jaclaz.


I guess it's all a matter of preferences, and of what you want to do.

Personally, though it is fun to try different methods/solutions, I try to keep things as KISS as possible.

There is no actual need to have the stick multipartitioned, unless you are going to boot a few tens of different OS.

Of course there are limits, but most can be overcome, as long as you stay (STRONGLY suggested) with FAT16 or FAT32 as filesystem.

What I usually do is:
1) Keep the Win2K/XP/2003 MBR (if it is the case in the "hacked" version that comes with the "HP" utility) untouched
2) Keep the bootsector (invoking NTLDR) written by the Win2K/XP/2003 FORMAT command or by the HP utility untouched
3) Add to root of the stick NTLDR, grldr and a boot.ini with a line:
CODE
C:\GRLDR="Grub4dos"

4) from the above setup you can boot a FULL 2K/XP directly through a line in boot.ini
5) for a PE/BartPE/Winbuilder you simply have an entry in boot.ini menu.lst like:
CODE
title PE/BartPE/Winbuilder
chainloader /setupldr

or
CODE
title PE/BartPE/Winbuilder
chainloader /minint/setupldr

6) For DOS (7.1 aka Win98) you can use either BOOTPART and chainload it directly from BOOT.INI or add an entry in menu.lst like:
CODE
title DOS 7.1
chainloader /IO.SYS

though usually it is much more convenient to use images, loaded either directly or through memdisk
7) for Linux, see above, also worth a shot is the RAMDISK using HMLOAD

Here are a few links with some more ideas, details:
http://www.911cd.net/forums//index.php?sho...c=19873&hl=
http://www.911cd.net/forums//index.php?sho...c=18045&hl=
http://www.911cd.net/forums//index.php?sho...c=18031&hl=
http://www.911cd.net/forums//index.php?sho...c=18846&hl=
http://www.msfn.org/board/index.php?showtopic=95537

More generally search on the 911CD forum for keyword "grub4dos", please DO remember that here we are talking of grub4dos, NOT grub, the grub4dos WHERETO is here:
http://www.boot-land.net/forums/Grub4Dos-t14.html
http://www.911cd.net/forums//index.php?sho...c=19097&hl=

And here there are some more related threads:
http://www.boot-land.net/forums/Boot-methods-f12.html

Have a look at the given links, and if anything is not clear or you need additional help just post so, specifying which OSses you are willing to multiboot.

jaclaz
stevesumner
Hey cheers for that jaclaz, really useful info.

I have tried your method and just want to check a couple of things.

I should use XP's format to format the USB to FAT, then copy BartPE files to the USB.
Then copy ntldr and boot.ini from c: drive and also copy grldr.
Then edit boot.ini to have the line
CODE
C:\GRLDR="Grub4dos"

and
CODE
title PE/BartPE/Winbuilder
chainloader /setupldr

or similar. Is that right?

And that's all?

My boot.ini looks like this:
CODE
[boot loader]
timeout=30
[operating systems]
C:\GRLDR="Grub4dos"
title BartPE
chainloader /setupldr
jaclaz
Well, NO, the:
CODE
title BartPE
chainloader /setupldr

goes into the menu.lst file, sorry for the mistyping sad.gif.

To further clarify, NTLDR looks for choices in boot.ini.

Grub4dos' grldr, grldr.mbr and grub.exe look for choices in menu.lst.

Syntax of menu.lst entries is detailed in the download and docs, briefly here is an example of a complete menu.lst:
CODE
# This is a basic menu.lst file for GRUB4DOS, in the version for ezG4DOS.
# You can make changes to it.
  
# Following lines load a splashimage and set text foreground/background colour
# splashimage /GRUB4DOS/ezG4DOS.xpm.gz
foreground  = 69ed4e
background  = 337326

# Following line is the choice for colours when background image is NOT SET
# (see above) they are commented out as a splashimage is SET  
# color black/cyan yellow/cyan

# Following is the timeout for the default choice
# By not pressing any key during the timeout, the default will be chosen
timeout 10
# Following is the menu item that will default
default 0

# This reflects the "normal" behaviour of a PC
# i.e. booting the first partition of first harddisk
# By setting it as default with timeout 10 seconds (see above)
# We try to replicate somehow the "Press any key to boot from CD..." message
# of Microsoft Install CDs, this way if no key is pressed, as an example for
# unattended installs, the system will boot "normally" even if CD is inserted
# of course if the "any" you press is [ENTER] system will boot from this entry
title Boot Hard Disk MBR on (hd0,0)
chainloader (hd0,0)+1
rootnoverify (hd0)

title Win98.ima memdisk Boot
find --set-root /grldr
kernel /memdisk.gz
initrd /win98.ima

title Win98 HD
find --set-root /IO.SYS
chainloader /IO.SYS

title BartPE
find --set-root /setupldr.bin
chainloader /setupldr.bin

title NTLDR
find --set-root /NTLDR
chainloader /NTLDR



I am correcting my previous post. smile.gif

jaclaz
MI4C
EDIT: read post #31, to get better instructions.

Just got finished USB-Uber stick.
USB trippleboot containing UBCD, DOS & CentOS.

First I follow Markymoo's instructions:
QUOTE
A Multiple Partition USB Stick with Multi Boot OS

Scroll down for 5/4/2006 update

I wanted several operating systems on a USB stick and after many hours messing with syslinux, memdisk, grub4dos, xosl, freedos, avlgomgr, acronis os selector, ranish partition manager. I have succumbed. I first started out wanting to boot an iso off USB and ran into trouble loading large img with memdisk which I found out is due to a bug in msdos so I used freedos but things didn’t work out as planned and it’s a similar woe story’s with the rest. Acronis os selector lets you boot multiple os from one partition from different folders but don’t work great when it comes to dos.

I have 5 partitions on my USB stick and using the boot loader BootIt NG http://www.bootitng.com/bootitng.html This is a 30 day trial. There’s a iso boot image inside the zip you need to burn to cd.

Now I wasn’t happy just putting one os on my USB stick. I wanted linux and diagnostic tools etc.

I now have what I think is the easiest helpful solution below.

Stage 1.

Ok XP can only see one partition on a removable USB but if change the USB driver to a fixed disk driver then XP will see it as a hard drive then we can have lay down multiple partitions as we like. Now open regedit and goto HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR
and double click on USBSTORE and you see a subkey below it, select the first subkey below USBSTORE and right click and select Copy Key Name

Here is mine, yours maybe different.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

Now we need only need this part:

USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

Copy and paste it temporarily into notepad.

You will now need this driver. http://www.xpefiles.com/viewtopic.php?t=92
Unpack it to a folder on your desktop. Inside the folder is the file cfadisk.inf. You need to open this file and scroll down to you see the line %Microdrive_devdesc% = cfadisk_install, specific data
Now you need to replace all lines %Microdrive_devdesc% = cfadisk_install, specific data with
the line you copied from your registry like so.

%Microdrive_devdesc% = cfadisk_install,USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

There could be more lines so replace all and save the file.

Goto Device Manager and click on disk drives. You see your USB listed, dbl click on it and goto the driver tab and click update driver and install from a specific location and choose the driver to install and click on Have Disk and browse to the cfadisk.inf file your modified driver on your desktop and force that to replace your existing driver. It might ask you to reboot. You should now have your USB showing as Local Disk

We want your first partition dos bootable so run HP USB Disk Storage Format Tool. I’m using version 2.1.8. Select your drive letter of your USB device and select "Create a DOS startup disk" and browse to your 98 boot disk folder. Click Start. Your USB will be formatted and 3 files will be copied from your dos startup files. You need to manually copy the rest of the 98 boot files to your USB drive.

You can now resize the drive (mines 512MB) and create multiple partitions. All partition software now sees it as a fixed disk. I used acronis disk director and resized the partition keeping the first dos bootable partition intact and made another 4 fat partitions so I had 5 in total.

Make sure your format all partitions as Primary not Logical.

So this way makes it easy to load multiple iso using ramdisk also.


After this I made another stick only containing UBCD, because when I use UBCD own script it wipes whole stick as 1 partition containing only UBCD.
- Windows XP or Vista (32-bit):
Connect small ~ 150 MB small USB stick to computer.
Mount UBCD and open command prompt, next go to the \tools\ubcd2usb folder and type ubcd2usb.bat D: E: (the D: is my cdrom and E: is stick).

Now I have 1 stick containing UBCD only and another stick which seems to be as local disk.
- WinImage software:
Next thing is that I read the UBCD stick with WinImage software. and after that I write the data to the other stick.
I notice that the other stick has now the data, but the MBR is missing, so I choose "edit master boot record properties" and save the mbr to bin file from UBCD stick to local disk and after that I import saved mbr to the other stick.

Now I have stick containing UBCD with plenty room on it.
- GParted:
I modify flags to hide UBCD partition just in case not to lose the partition and then create new partition for DOS I also give the boot flag to this partition.

- DOS boot
Now boot computer with DOS boot floppy and format the partition which created earlier, remember to format to bootable.

If everything went ok, if changed the boot flag with GParted I get either UBCD or DOS boot.
Now I have two boots on the stick.

Next I boot with CentOS 5.1 DVD and make custom partitioning. I create the OS root partition to the rest of stick (no swap or other partitions).
To the bootloader I add the hidden UBCD /dev/sda1 to the bootmenu and I choose advanced and install the bootloader to the /dev/sda3. Then I choose custom install on packages, and take everything else away but editors and BASE install. After I have installed the system, I used GParted to manage the flags once more. Now I put the boot flag to the /dev/sda3.

After reboot the stick finds GRUB, which has the other to boots (DOS and UBCD).

Sorry this bad English etc, hope this helps some ppl, who tries to do the same as I did. Enjoy.
MI4C
I noticed that the extra mbr.bin import is not necesary.
Also that the first partition of the stick is viewable on normal computers, which is in my earlier post ~150 MB.

Now question to others, how could I grow the UBCD partition ~5 GB without 5 GB UBCD stick?
If I try to resize the stick with GParted the mbr brokes and partition magic can't even recognice the partition after I have used the ubcd script.
Is there any way to fool operating system with ex. virtual hd (safe way) that I could create ~5 GB UBCD partition (with mbr), I think that the mbr somehow has information of partition table and if partition is touched it doesn't anymore match to the information kept in mbr.

The bad side is that if I run the ubcd2usb.bat the script makes whole hd to same partition, I check'd that there is missing partitioning posibility on the running script (maybe if I get custom binary for this). The script formats the disk by checking %device%, so if I create virtual disk (also have to dig how to do it), could it be recogniced as device also?
jaclaz
MI4C,
sorry, but I do not understand what you are trying to do.

If what you are asking for is to create Virtual hard disks of given size/geometry or "manually" formatting a USB stick, you may find these batches useful MBRBATCH/MKIMG:
http://www.boot-land.net/forums/?showtopic=3191
http://www.boot-land.net/forums/?showtopic=5000

Otherwise, can you re-describe what you are trying to do?

jaclaz
MI4C
jaclaz, sorry for so fuzzy posting.

I got the stick working just like I wanted.
The virtual disk thing didn't work and some other things either didn't work.

Here is description how to make 8 GB stick, containing DOS, UBCD 4.1.0 (ultimate boot CD) and Cent OS.

You need 2 USB stick (8 GB and 150 MB or bigger), gparted liveCD, UBCD 4.1.0 CD, dos boot floppy and Cent OS installation media.
No need to do the markymoo's thing described earlier.

First create the small USB stick with the UBCD script (which is located on the UBCD CD \tools\ubcd2usb) ubcd2usb.bat D: E: (the D: is my UBCD CD and E: is stick).
Then create with gparted 3 partitions to the bigger stick. I create 5 GB, exact size of the small stick and rest to the linux. Format each as FAT32 and manage flags that only 5 GB partition is not hidden. Boot with the dos boot floppy and format the 5 GB partition with startup disk option. Test that the stick boots to the created partition. After this connect both stick to computer and boot with gparted, you can check with gparted which stick is the small and bigger stick. Open terminal and type dd if=/dev/sda# of=/dev/sdb2 (the sda is the smaller stick and # should be the number where the UBCD is, I had it somehow on sda4, you can check that number from the gparted partition manage window). Now we have copied UBCD partition (including the data) from the smaller stick to the bigger. Remove the hidden flag from the sdb3.

Next boot with CentOS 5.1 DVD and make custom partitioning. Create the OS root partition to the sda3 (no swap or other partitions).
To the bootloader add the hidden UBCD /dev/sda2 to the bootmenu, the bootloader can be installed to the mbr, so no advanced settings needed. Choose custom install on packages, and take everything else away but editors and BASE install. After os installation the stick is ready.

My problem was earlier that I didn't find a way how to get the UBCD partition to the second partition (because the UBCD function break-up if the partition size is changed, don't know why) and windows XP only sees the first partition of the stick, even if the partition is hidden. I found that if I create an image of this tripple boot stick and restore it, it somehow break-up. I can still clone the stick with the linux dd command which I used earlier in the instructions.
Kelsenellenelvian
QUOTE
with both password and fingerprint protection, so nobody, even the police, will not be able to see unauthorized information


I agree with Jaclaz! Any prepared person with physical access to the thumb-drive can have your info in a matter of a handful of days, if not hours.

I haven't had much experience bypassing print readers, but am assured and have witnessed them being bypassed with things as simple as a COPY (Yes a Xerox-type copy) bypassing them. Plus if it's on the thumb-drive itself you can be assured its not too sophisticated of one.

As for the password I have bypassed many passwords in the past on things from bios to windows to programs. It's not hard and there is ready access to tons of programs that will nicely or, by brute force bypass nearly any password...
Fixt00l
Hello, thanks for the reply, and I am sorry fot any wrong approach.I own licensed versions of both XP and Vista, I have 2 PCs, and I need to reinstall windows very frequently, a clean install, an image file recovery won`t help me.I will use my flash memory to reinstall the OS as soon as the **** encoding fails and messes up my system32, which happens at least once ever 2 weeks.I live in Bulgaria, where the law that any policeman can seize anything from people, with no document or order from a judge, means the Police can steal anything they want from people and never return it.The EU court is aware of this, the procedure is long, so, this is another story.I don`t want my flash stick seized and my licenses literally stolen, last time a friend of mine was a victim of police literally stealing his PC with a valid Windows sticker, from his office.The policeman even asked him if the PC was good enough for videogaming...Now, communism is evil, as you might know.I want a single flash drive to ensure and backup both my PCs, and nothing more, nothing illegal, if I would want something illegal, I do not think I would post it online so everyone can see it.Well, I hope this is the right approach...And, do not worry, the police do not have any experts, as when they took a PC, I just disconnected the SATA cable, and they nevery made the windows boot blink.gif
jaclaz
You might be happy to know that one of the main contributors in the "install XP from USB" thingie is ilko_t, from Bulgaria. thumbup.gif

You can find some info on the procedure also in your native language:
http://www.hardwarebg.com/forum/showthread.php?t=102363

jaclaz
andyd
Hopefully someone can help with this question...

How would I make something like UBCD bootable within this environment? It has it's own partition but how do I properly point to it? is it that wingrub / grup will automatically point to the right files?
jaclaz
QUOTE (andyd @ May 25 2009, 03:32 PM) *
Hopefully someone can help with this question...

How would I make something like UBCD bootable within this environment? It has it's own partition but how do I properly point to it? is it that wingrub / grup will automatically point to the right files?


Something like UBCD or UBCD?

UBCD has been in latest releases modified as to allow use of both Isolinux/Syslinux and grub4dos.

However the steps are more or less the same.

See here:
http://www.boot-land.net/forums/index.php?showtopic=6119
http://www.boot-land.net/forums/index.php?showtopic=7312

For a "generic" DOS based floppy image, start from here:
http://www.boot-land.net/forums/index.php?showtopic=3963

jaclaz
andyd
I meant booting an iso of some sort. Like say if I want to be able to add Acronis True Image to the boot as well

I'll give the links a look - thanks!
jaclaz
QUOTE (andyd @ May 25 2009, 05:07 PM) *
I meant booting an iso of some sort. Like say if I want to be able to add Acronis True Image to the boot as well


Boy, do I hate the use of the "any": each .iso and each OS has it's own story. ph34r.gif

Read here:
http://www.boot-land.net/forums/index.php?...c=6896&st=4

And here:
http://www.boot-land.net/forums/index.php?showtopic=5041 (post #4 is for Acronis)

jaclaz

andyd
Well I meant more towards bootable tools etc but yeah I guess it was inappropriate tongue.gif Thanks for the links. I actually registered and have been asking around there too.
Freshbie
Hello guys

I try to follow the guide but i cannot create primary partition more than 4. My storage is 80GB 2.5" hdd in usb enclosure.

Does it need to be primary for booting the OS?

I need to make 6 partition like this

1. XP setup
2. Vista Setup
3. Seven Setup
4. Linux Setup
5. Ghost Image for boot
6. Program setup for each OS

Now i can boot from Grub4Dos 0.4.4 and can see the menu
But cannot boot !!

Could anyone guide me the rest of this ?

PS. i need windows setup partition to be NTFS but i am not sure for linux and else, please tell me what it should be?
jaclaz
@Freshbie

This guide, though still largely valid, is a bit oldish.

Newer releases of grub4dos have added features, and solutions/workarounds were found for most problems.

BUT, you seem to have started, just like all "freshbies" do newwink.gif, with a very ambitious project, without having (yet) digested the needed background knowledge.

There is NO way you can have more than 4 Primary partitions on any hard disk, for the simple reason that there are 4 entries in the partition table in the MBR.

You can have a standard setup:
1 primary partition + any number of logical volumes inside extended partition
OR
a maximum of 3 primary partitions + any number of logical volumes inside extended partition
OR
a maximum of 4 primary partitions

The above is NOT negotiable, though there are a couple of (relatively complex) workarounds to do that, but the whole point is that you need NOT more than 4 primary partitions.

Another thing that you may want to note is that you simply won't be able to install XP from a USB harddisk unless you use one of the apps in the dedicated forum (or replicate manually what they do).

What you should do is browse, search and READ both here:
http://www.msfn.org/board/index.php?showforum=157
and here:
http://www.boot-land.net/forums/index.php?showforum=66
(start from the pinned topics in both forums)

Using this app:
http://www.msfn.org/board/index.php?showtopic=120444
you will have most of the things you asked for, then you will need to integrate the results with the other items.

jaclaz
Freshbie
Very glad to hear from you !! Jaclaz

I now success to install XP Pro from my first partition.

I have read the thread you give me here.

It seems like, one who will truely understand must have technically knowledge on it.

If something i don't get it, i hope i can ask for your help shifty.gif


Lastly i will try to make my HDD boot from extended partition on logical disk.
I will see if i can do it and will report here for us all to study from it.

My primary concern for now is, Can i boot XP pro, Vista, Seven on same partition?
And for XP can i use the same partition for different version of XP?

Thanks alot !!

Freshbie
jaclaz
QUOTE (Freshbie @ Jun 28 2009, 02:45 PM) *
My primary concern for now is, Can i boot XP pro, Vista, Seven on same partition?
And for XP can i use the same partition for different version of XP?


Only up to a certain extent.
For complex/multiversion setups, I guess this:
http://www.msfn.org/board/index.php?showtopic=121446
or a similar approach, running the actual setup from an already booted PE of some kind is easier/better.

QUOTE (Freshbie @ Jun 28 2009, 02:45 PM) *
Lastly i will try to make my HDD boot from extended partition on logical disk.
I will see if i can do it and will report here for us all to study from it.

Good smile.gif

Read these:
http://www.goodells.net/multiboot/
http://www.goodells.net/multiboot/ptedit.htm
and this only partially unrelated thread, that may however give you some ideas:
http://www.boot-land.net/forums/index.php?...ic=7138&hl=

jaclaz
Freshbie
Thanks Jaclaz.

The post you give to me is very interesting.
I try to follow and adapt to my use

Now i got an idea. If i use multiple folder to keep setup files instead of mutipartition.
How can i tell grub4dos to boot the loader inside the folder?

And now after i install a windows to my computer, i got a problem that my computer see any external HDD as a removable disk
then i can see only first partition. I use winsetupfromusb. I think i have to fix a migrate.inf but don't know how blushing.gif
jaclaz
QUOTE (Freshbie @ Jun 29 2009, 01:31 PM) *
Now i got an idea. If i use multiple folder to keep setup files instead of mutipartition.
How can i tell grub4dos to boot the loader inside the folder?

You can tell grub4dos almost everything you want, and it will probably do what you told it to do, but the problem remains with the HARDCODED paths and more generally NOT FLEXIBLE way the Windows Setup works.
In other words, I doubt that you will succeed with your idea. sad.gif

QUOTE (Freshbie @ Jun 29 2009, 01:31 PM) *
And now after i install a windows to my computer, i got a problem that my computer see any external HDD as a removable disk
then i can see only first partition. I use winsetupfromusb. I think i have to fix a migrate.inf but don't know how blushing.gif

migrate.inf is only needed/useful to assign letters to a drive partition (differently from wht setup would do automatically).

If all your USB hard disk are shown as "Removable", there are two possibilities:
  • all your USB hard disks are "Removable" newwink.gif
  • somehow you managed to have installed/running the "reversed" dummydisk.sys Filter Driver woot.gif


I haven't handy any install on which the rdummy.sys is installed/running, but it should be in the Registry in
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\rdummy]
(or somethng similar)

jaclaz

honda4life
Confirmed to work on Windows 7 build 7600 RTM

You should try it's great tongue.gif and you can find test keys from microsoft btw




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.