Joerg's multiboot USB-Pen

This is a short description, how to build a real multiboot USB pen (also known as USB flash drive, USB pen or USB stick). How to get knoppix, DSL, grml, grml64, tinycore qparted together on one usb pen? Also this is the solution for filling empty usb pens. I used it for my small laptop without optical drive or for servers to test hardware. You can use it also for hard disks or flash disks or multiboot CDs in a similar way. Future distros will probably have a special option for easier creation of multiboot disks, like GRML already has.

The base ...

A partitioned usb pen with one VFAT partition on it. Grub installed to the MBR (Master boot record at sector one) and Syslinux installed on the VFAT partition. You can go from grub to syslinux and back to go around boot problems. Every distribution will be put to its own directory and often needs some adaptions of the initrd or the booting parameters listed below. Copy the content of each live CD (not the iso-image itself) to a subdirectory on the usb-pen. Choose a 8.3 FAT filename to avoid name conflicts.

### GRUB menu.lst:
title syslinux from hd0,0
    root (hd0,0)
    chainloader +1

title Floppy
    root (fd0)
    chainloader +1

title floppyimg
    kernel (hd0,0)/boot/memdisk
    initrd (hd0,0)/boot/fdboot.img

title Memtest
    kernel (hd0,0)/boot/memtest

### syslinux.cfg:
# boot grub from MBR
 MENU LABEL Boot First Harddrive

 MENU LABEL Boot Second Harddrive

LABEL floppyimg
 KERNEL /boot/memdisk
 APPEND initrd=/boot/fdboot.img

TinyCore_2.0 2009-06 (10MB)

A minimalistic ramdisk distro using k2.6.29, Xvesa, jwm, ssh. Extendable.

 - download tinycore_2.0.iso (11MB 2009-06)
 - mount -o ro,loop ./tinycore_2.0.iso /media/cdrom
 - mount /dev/sda1 /media/usbpen  # replace sda1 by the correct devicename
 - cp -r /media/cdrom/boot /media/usbpen/tinycore.20 # we dont include the CD-root here
 - edit /media/usbpen/syslinux.cfg (changes to original distro in red)
 label tinycore.20
   kernel /tinycore.20/bzImage
   append initrd=/tinycore.20/tinycore.gz
 - edit /media/usbpen/boot/grub/menu.lst
 title=TinyCore-2.0 2009-06
   kernel /tinycore.20/bzImage
   initrd /tinycore.20/tinycore.gz
 - # boot options: tce=hdXY/tce # use subdir (default=tce) for extensions
   #  local=hdXY # use subdir tclocal or loop image tclocal.
   #  local=hdXY/tinycore.20
   # see /etc/init.d/tc-config for more info (appbrowser)
 - umount /media/usbpen
 - umount /media/cdrom
 - test: qemu -hda /dev/sda
 - ToDo: add mountable extensions:

GParted Live 0.3.4 (53MB)

A linux distro for repartioning.

 - download gparted-livecd-0.3.4-11.iso (53MB 2007-12-17)
 - mount -o ro,loop ./gparted-livecd-0.3.4-11.iso /media/cdrom
 - mount /dev/sda1 /media/usbpen  # replace sda1 by the correct devicename
 - cp -r /media/cdrom /media/usbpen/gparted.034
 - edit /media/usbpen/syslinux.cfg (changes to original distro in red)
 - touch /media/usbpen/gparted.034/livecd
   kernel /gparted.034/boot/gparted
   append initrd=/gparted.034/boot/gparted.igz root=/dev/ram0 init=/linuxrc vga=788 looptype=squashfs loop=/gparted.034/gparted.dat subdir=gparted.034 setkmap=de nodetect cdroot=/dev/sd video=vesa
 - edit /media/usbpen/boot/grub/menu.lst
 title=GParted-liveCD 0.3.4-11 (please edit cdroot=/dev/sd)
   kernel /gparted.034/boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs subdir=/gparted.034 loop=/gparted.034/gparted.dat setkmap=de udev nodetect cdroot=/dev/sd video=vesa
   initrd /gparted.034/boot/gparted.igz
 - # cdroot # auto search for ${SUBDIR}/livecd in /dev/{hda,hda1,hdc,...} fails!
   # cdroot=/dev/sda1 # skip autodetection and set by hand
   #   if you end with an error "Invalid loop location:" cdroot was set wrong
   #   see gparted.igz:/etc/init.scripts:findcdmount()+bootstrapCD()
   # cdroot=/dev/sd  works? (buggy?)
 - umount /media/usbpen
 - umount /media/cdrom
 - test: qemu -hda /dev/sda # change: cdroot=/dev/hda1

GRML-MEDIUM-2009.05 (200MB)

Universal toolkit for the console (fbdev + links2 -g works). Great for the small laptops.

### GRUB:
  title GRML-MEDIUM-2009.05
    kernel (hd0,0)/grml_m200905/boot/grmlmedium/linux26 gmt keyboard=de xkeyboard=de boot=live live-media-path=grml_m200905/live toram=grml-medium.squashfs nomce noudev edd=off verbose
    initrd (hd0,0)/grml_m200905/boot/grmlmedium/initrd.gz
  title GRML-HDT Hardware-Detection
    kernel (hd0,0)/grml_m200905/boot/addons/hdt.c32
    initrd (hd0,0)/grml_m200905/boot/addons/pci.ids
 LABEL grml
  MENU LABEL grml - Standard Bootup
  KERNEL /grml_m200905/boot/grmlmedium/linux26
  APPEND apm=power-off vga=791 initrd=/grml_m200905/boot/grmlmedium/initrd.gz boot=live nomce

 LABEL grml2ram
  MENU LABEL grml2ram - Copy Squashfs file to RAM
  KERNEL /grml_m200905/boot/grmlmedium/linux26
  APPEND apm=power-off toram=grml-medium.squashfs vga=791 initrd=/grml_m200905/boot/grmlmedium/initrd.gz boot=live nomce

Knoppix-5.1.1 (730MB)

Live-CD. (ToDo: rename knoppix to knoppix5)

### GRUB:
 title knoppix-5.1.1 Jan07
    kernel (hd0,0)/knoppix/linux ramdisk_size=100000 init=/etc/init lang=de apm=power-off vga=791 nomce loglevel=3 BOOT_IMAGE=knoppix toram
    initrd (hd0,0)/knoppix/minirt.gz
LABEL knoppx-511Jan07
 KERNEL /knoppix/linux ramdisk_size=100000 init=/etc/init lang=de apm=power-off vga=791 nomce loglevel=3 BOOT_IMAGE=knoppix toram
 APPEND initrd=/knoppix/minirt.gz

Other live distros ...

If you have trouble with other distros first search the internet or the live CD for cheatcodes. If that gives no solution, analyze the boot scripts of the initrd image.


- headless version (no screen, no keyboard, using serial [over ethernet] console)
  should work always, but distros dont do a good job if option "serial"
  must to be choosen on boot prompt using the keyboard which is not
  available when using serial cable :(

Look at my Homepage for contact address.