paperlined.org
apps > grub
document updated 15 years ago, on Sep 8, 2009
My multi-boot setup is on a portable USB drive. The main partition is FAT32.

Each thing that's booted needs to reside in its own subdirectory:

\boot\MSDOS7.1\
\boot\Knoppix\
\boot\PuppyLinux\
\boot\Hiren\
\boot\VistaPE\
However, sometimes it takes work to relocate each OS into a specific subdirectory — most are used to having the root directory all to themselves. An alternate method to this document's approach is to instead allocate one partition per OS.

Several commands work only on one GRUB variant. (see documentation for more)

Key
GRUB Legacy
GRUB4DOS
Super Grub Disk

Linux-based

Debian Live

It includes an example menu.lst, see here.

See live-initramfs(7) for boot parameters. Notably:

Clonezilla Live

See "Debian Live".

For default parameters, see the syslinux/syslinux.cfg file inside the Clonzilla Live distro.

Note: Clonezilla can't save images to the same partition that it booted from, so you may have to create a separate partition for Clonezilla to boot from.

NOTE:: The above may be fixable with the command `sudo mount -o remount,rw /cdrom` (I haven't tested it yet, but it works on Knoppix)

Knoppix v6.x

title Knoppix
    kernel          /boot/Knoppix/boot/isolinux/linux knoppix_dir=/boot/Knoppix/knoppix/ ramdisk_size=100000 lang=en vt.default_utf8=0 apm=power-off vga=791 initrd=minirt.gz nomce elevator=anticipatory quiet loglevel=0 pci=routeirq
    initrd          /boot/Knoppix/boot/isolinux/minirt.gz

Knoppix v5.x

title Knoppix
    kernel          /boot/Knoppix/boot/isolinux/linux knoppix_dir=/boot/Knoppix/knoppix/ ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt.gz nomce quiet BOOT_IMAGE=knoppix
    initrd          /boot/Knoppix/boot/isolinux/minirt.gz
See boot parameters here. Notably: For some reason, I can't get knoppix_dir to work at all, so I always end up having to put the very large cloop file at \Knoppix\Knoppix.

To be able to write back to the USB drive, run `mount -o remount,rw /cdrom` after booting. Put this command in knoppix.sh in order to have this automatically work every bootup.

Damn Small Linux

It's Knoppix-based. Useful cheat codes are:

Puppy Linux

title Puppy Linux
    kernel /boot/Puppy/vmlinuz acpi=off psubdir=boot/puppy
    initrd /boot/Puppy/initrd.gz 
Boot parameters are here, notably:

tomsrtbt v2.0.103

title tomsrtbt
    map --mem /tomsrtbt-2.0.103.ElTorito.288.img (fd0)
    map --hook
    chainloader (fd0)+1
    rootnoverify (fd0)

You can download the tomsrtbt-2.0.103.ElTorito.288.img.bz2 from various places, but you need to unzip it.

Unfortunately, the boot process goes through MEMDISK ⇒ LILO, so you can't set any boot parameters from the outside.

DOS-based

MS-DOS

Download files from http://ms-dos7.hit.bg/.

Unfortunately, MS-DOS must have the following several files in the root directory: io.sys, msdos.sys, config.sys, and autoexec.bat. Some things can move, however:

title MS-DOS
    chainloader /boot/msdos7.10/io.sys
    boot

Hiren's Boot CD

  1. Copy the entire BootCD\ directory somewhere under your main MS-DOS partition. (for me, it goes in \boot\Hiren\BootCD\)
  2. Modify loadcd.bat, and right after the first call to findcd, add this:
    set CDROM=C:\boot\Hiren\
    
  3. Remove jo.sys from the floppy image.
  4. Package those files back into a standalone boot floppy file.
  5. Use this in menu.lst:
    title Hiren's Boot CD   v9.5
    
        map --mem /boot/Hiren/h95_fd0.img (fd0)
        map --hook
        chainloader (fd0)+1
        rootnoverify (fd0)
        map --floppies=1
        
        boot
    
This way, no CD-ROM drivers are needed at all. The boot partition already appears under Hiren's as C:, so we just leverage that.

(This is a small modification of the official Hiren's-on-USB. We leave the files packaged inside a floppy image, so that we can boot from different config.sys's elsewhere, but leave the config.sys-based menu intact for Hiren's.)

Windows-based

Windows PE 1.0

See also: /apps/WinPE/booting.html.

Windows PE 2.0 (e.g. VistaPE)

Recovery Console

title Windows Recovery Console
    chainloader /cmdcons/setupldr.bin
    #####################################################################
    # write string "cmdcons" to memory 0000:7C03 in 2 steps:
    #####################################################################
    # step 1. Write 4 chars "cmdc" at 0000:7C03
    write 0x7C03 0x63646D63
    # step 2. Write 3 chars "ons" and an ending null at 0000:7C07
    write 0x7C07 0x00736E6F

Other

memtest86+

Advice

See also