Wednesday 13 May 2009

Creating a multiboot USB drive - Part four: adding boot options & modify Grub4DOS menu

Essential items & software for this part:

The final part of this guide will help you add extra options to your Grub4DOS menu to build your multiboot USB drive. Although you can use the text editor included with Windows (i.e. notepad) it's much easier if you use a more powerful editor such as Notepad++.

Part 4.1 - Modifying the Grub4DOS menu

Locate menu.lst on the root of your USB drive and open it in your text editor. You will see the default Grub4DOS menu, which includes a lot of options that have been commented out - feel free to delete everything prefixed with a # as we'll be adding our own entries. To give you an example of how to do this, I will add an Ultimate Boot CD image and add it to the menu. Copy the UBCD ISO file to the root of your USB drive and add the following lines to your menu.lst file;

title Ultimate Boot CD 4.11 ISO\nLoad the UBDC
find --set-root /ubcd411.iso
map /ubcd411.iso (0xff) || map --mem /ubcd411.iso (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

Make sure the filename matches the one referenced in the menu.lst file - ubcd411.iso in this example. Save and close the menu.lst file and boot from your USB drive, and you will see a new option in your Grub4DOS menu. You can add as many images as you like, you are limited only by the space on your USB drive.

Unfortunately it's not quite as straightforward as simply copying the ISO file to the drive and referencing it in the menu.lst for everything - certain things like WinPE and BartPE will fail to boot this way unless you load them into RAM first (an extremely helpful guide on how to do this can be found here). Some Linux LiveCDs will also fail using this method, but can instead be launched by chainloading their bootloader. There are various guides on the Internet that explain how to do this. If your image does not work, I recommend that you read the Grub4DOS manual, which is available on the project website and provides a great deal of useful information that will help you get your more troublesome CD images to load.

While it is beyond my ability to list everything you may want to boot from your USB drive, I have tried a number of utilities. Here is have been able to get the following to launch from Grub4DOS without issue;

UtilityGrub4DOS menu entry
Acronis True Imagetitle Acronis True Image Server 8.0 ISO\nLoad the old version of Acronis True Image Server
find --set-root /Acronis.iso
map /Acronis.iso (0xff) || map --mem /Acronis.iso (0xff)
map --hook
chainloader (0xff)
FreeDOStitle FreeDOS\nLaunch the FreeDOS operating system
map --mem (hd0,0)/DOSUBCD.IGZ (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
MemTest86+title MemTest86+\nStart MemTest86+
kernel /memtest.bin
Ultimate Boot CD 2.4 ISOtitle Ultimate Boot CD 2.4 ISO\nLoad the old version of UBDC
find --set-root /ubcd24.iso
map /ubcd24.iso (0xff) || map --mem /ubcd24.iso (0xff)
map --hook
chainloader (0xff)
WinPE x86find --set-root /WinPE_x86.iso
map /WinPE_x86.iso (0xff) || map --mem /WinPE_x86.iso (0xff)
map --hook
chainloader (0xff)



I hope that you have found this guide to be informative, and that the information proves useful to you in creating your USB multiboot drive. If you have any questions or issues please feel free to leave a comment. If you believe I have referenced your work without giving you credit, please let me know so I can amend the guide. Thank you for reading!

No comments:

Post a Comment