MSFN Forum: A Multiple Partition USB Stick with Multi Boot OS - MSFN Forum

Jump to content


  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

A Multiple Partition USB Stick with Multi Boot OS Updated 5th April 2006 Rate Topic: -----

#1 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

  Posted 05 March 2006 - 12:49 PM

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....wtopic.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

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.sourc...et/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.

Posted Image

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.n...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.

Posted Image

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.

Posted Image

This post has been edited by Markymoo: 19 November 2007 - 05:38 AM



#2 User is offline   e-t-c 

  • WHS 2003 SP2
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 13-March 06
  • OS:2003 x86
  • Country: Country Flag

Posted 13 March 2006 - 09:56 AM

Maybe You can use this Bootmanager (Private = Free) :)

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

salü
Wolfgang e-t-c

#3 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 14 March 2006 - 04:08 AM

@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:

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:

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.

This post has been edited by Bilou_Gateux: 14 March 2006 - 08:07 AM


#4 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 15 March 2006 - 10:52 PM

View Poste-t-c, on Mar 13 2006, 09:56 AM, said:

Maybe You can use this Bootmanager (Private = Free) :)

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

This post has been edited by Markymoo: 15 March 2006 - 10:54 PM


#5 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,572
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 16 March 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

jaclaz

#6 User is offline   EchoNoise 

  • Defender of the Penguin
  • PipPipPipPipPip
  • Group: Members
  • Posts: 933
  • Joined: 10-April 05

Posted 16 March 2006 - 04:24 PM

Why not just try syslinux... lol

#7 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 16 March 2006 - 04:49 PM

View Postundeadsoldier, on Mar 16 2006, 04:24 PM, said:

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.

View Postjaclaz, on Mar 16 2006, 05:11 AM, said:

@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

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

This post has been edited by Markymoo: 16 March 2006 - 05:17 PM


#8 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 16 March 2006 - 05:01 PM

@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!

This post has been edited by Markymoo: 16 March 2006 - 06:36 PM


#9 User is offline   chazco 

  • Group: Members
  • Posts: 7
  • Joined: 05-April 05

Posted 25 March 2006 - 03:17 AM

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?

#10 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 28 March 2006 - 02:04 AM

@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

This post has been edited by Markymoo: 28 March 2006 - 02:05 AM


#11 User is offline   chazco 

  • Group: Members
  • Posts: 7
  • Joined: 05-April 05

Posted 29 March 2006 - 01:16 AM

Thanks for the reply - i tried that already though. I'll explain in more detail...

I'm creating a Windows - based Linux installer :huh: 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...

#12 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 05 April 2006 - 08:27 AM

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

This post has been edited by Markymoo: 05 April 2006 - 08:56 AM


#13 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,572
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 09 April 2006 - 10:54 AM

Good work, Markymoo. :)

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

This post has been edited by jaclaz: 09 April 2006 - 11:04 AM


#14 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 11 May 2006 - 03:03 PM

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.

#15 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,572
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 12 May 2006 - 10:35 AM

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.imagemagi...cript/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

#16 User is offline   Markymoo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 22-April 04

Posted 17 May 2006 - 11:29 AM

@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.imagemagi...cript/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

This post has been edited by Markymoo: 17 May 2006 - 12:16 PM


#17 User is offline   2dumb 

  • Group: Members
  • Posts: 1
  • Joined: 17-June 06

Posted 17 June 2006 - 08:40 AM

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!

#18 User is offline   fattest_cat 

  • Group: Members
  • Posts: 1
  • Joined: 18-February 07

  Posted 18 February 2007 - 07:29 AM

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:

#19 User is offline   johnbig 

  • Group: Members
  • Posts: 1
  • Joined: 15-March 07

Posted 15 March 2007 - 05:34 PM

View Postfattest_cat, on Feb 18 2007, 07:29 AM, said:

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:


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! :)

#20 User is offline   diginode 

  • Newbie
  • Group: Members
  • Posts: 24
  • Joined: 05-September 06
  • OS:XP Pro x86
  • Country: Country Flag

Posted 15 May 2007 - 10:11 PM

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.

Share this topic:


  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy