Multi-CD USB stick

From YobiWiki
Jump to navigation Jump to search

Well I'm not sure the title speaks for itself...
Live CDs are great and USB sticks have amazing capacities (I'm curious how it'll sound in a couple of years...)
I've bought a 6Gb USB "stick", actually it's a HD in a credit-card format.
The idea is to bring on it and be able to boot:

So I use a single syslinux with a huge configuration file.
Sometimes there are some clashes between the files of the various systems so we've to rename some when possible and choose between some when not possible.

  • syslinux.cfg and isolinux.cfg => merge all and rename some of the targets if needed
  • boot.* => choose one image (I took the Debian spiral from Etch installer) and one text (I list shortly the main targets)
  • F1..F10 help screens => choose or mix

From Etch: this is really the basis of the install, with its syslinux

  • debian-testing-i386-netinst.iso renamed as: debian.iso
  • disk.lbl
  • f1.txt .. f10.txt
  • initrd26.gz
  • initrdg.gz
  • initrd.gz
  • ldlinux.sys (install it properly as a bootable USB stick!)
  • linux
  • linux26
  • splash.rle

From DBAN (dban-1.0.7_i386.ima):

  • dbanlog
  • dbanseed
  • *.txt => dbaninfo/
  • initrd.gz renamed as: initrddb.gz
  • kernel.bzi

From Knoppix DVD:

  • knoppix/
  • balder.img
  • linux renamed as: linux-kn
  • memtest
  • minirt.gz

From FCCU:

  • knoppix/ renamed as: fccu/
  • linux renamed as: lin-fccu
  • minirt.gz renamed as: minifccu.gz (cf note)

Note: For FCCU as we had to rename the directory and as v11 is incompatible with knoppix dvd v5.1.1 I had to change minifccu.gz:

gunzip minifccu.gz
mount -o loop minifccu /mnt/disk

Edit /mnt/disk/linuxrc and prepend the module list by the new path: (but keep the rest!)

MODULE_DIRS="/cdrom/fccu/modules /cdrom/KNOPPIX/modules ...

And now this huge and quite messy syslinux.cfg:

DEFAULT fccu
TIMEOUT 300
PROMPT 1
DISPLAY boot.my
F1 f1.txt
F2 f2.txt
F3 f3.txt
F4 f4.txt
F5 f5.txt
F6 f6.txt
F7 f7.txt
F8 f8.txt
F9 f2
F0 f3

LABEL fccu
KERNEL lin-fccu
APPEND ramdisk_size=100000 init=/etc/init lang=us dma noswap nodhcp 3 apm=power-off vga=791 initrd=minifccu.gz nomce quiet BOOT_IMAGE=knoppix knoppix_dir=fccu

LABEL knoppix
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt.gz nomce loglevel=0 quiet BOOT_IMAGE=knoppix
LABEL knoppix_expert
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt.gz nomce BOOT_IMAGE=expert

LABEL memtest
KERNEL memtest
APPEND foo

LABEL knoppix-txt
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=minirt.gz nomce loglevel=0 quiet BOOT_IMAGE=knoppix
LABEL knoppix_debug
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=minirt.gz debug BOOT_IMAGE=debug
LABEL fb1280x1024
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=794 xmodule=fbdev initrd=minirt.gz nomce loglevel=0 quiet BOOT_IMAGE=knoppix
LABEL fb1024x768
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 xmodule=fbdev initrd=minirt.gz nomce loglevel=0 quiet BOOT_IMAGE=knoppix
LABEL fb800x600
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=788 xmodule=fbdev initrd=minirt.gz nomce loglevel=0 quiet BOOT_IMAGE=knoppix
LABEL dos
KERNEL balder.img
LABEL failsafe
KERNEL linux-kn
APPEND ramdisk_size=100000 init=/etc/init lang=us vga=normal atapicd nosound noapic noacpi pnpbios=off acpi=off nofstab noscsi nodma noapm nousb nopcmcia nofirewire noagp nomce nodhcp xmodule=vesa initrd=minirt.gz BOOT_IMAGE=knoppix
LABEL userdef
KERNEL linux-kn



APPEND ###############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
LABEL install24
	kernel linux
	append vga=normal initrd=initrd.gz ramdisk_size=11302 root=/dev/ram rw  --
LABEL expert24
	kernel linux
	append priority=low vga=normal initrd=initrd.gz ramdisk_size=11302 root=/dev/ram rw  --
LABEL install
	kernel linux26
	append vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  --
LABEL linux
	kernel linux26
	append vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  --
LABEL install26
	kernel linux26
	append vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  --
LABEL linux26
	kernel linux26
	append vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  --
LABEL installgui
	kernel linux26
	append video=vesa:ywrap,mtrr vga=788 initrd=initrdg.gz ramdisk_size=23109 root=/dev/ram rw  --

LABEL expert
	kernel linux26
	append priority=low vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  --
LABEL expert26
	kernel linux26
	append priority=low vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  --
LABEL expertgui
	kernel linux26
	append priority=low video=vesa:ywrap,mtrr vga=788 initrd=initrdg.gz ramdisk_size=23109 root=/dev/ram rw  --

LABEL rescue
	kernel linux26
	append vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  rescue/enable=true --
LABEL rescue24
	kernel linux
	append vga=normal initrd=initrd.gz ramdisk_size=11302 root=/dev/ram rw  rescue/enable=true --
LABEL rescue26
	kernel linux26
	append vga=normal initrd=initrd26.gz ramdisk_size=9882 root=/dev/ram rw  rescue/enable=true --
LABEL rescuegui
	kernel linux26
	append video=vesa:ywrap,mtrr vga=788 initrd=initrdg.gz ramdisk_size=23109 root=/dev/ram rw  rescue/enable=true --

### DBAN 1.0.7
LABEL  autonuke
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe --autonuke" silent

LABEL  dban
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe" silent

LABEL  dod
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe --autonuke --method dod522022m" silent

LABEL  dod3pass
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe --autonuke --method dod3pass" silent

LABEL  dodshort
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe --autonuke --method dodshort" silent

LABEL  gutmann
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe --autonuke --method gutmann" silent

LABEL  ops2
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe --autonuke --method ops2" silent

LABEL  paranoid
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe --autonuke --method prng --rounds 8 --verify all" silent

LABEL  prng
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe --autonuke --method prng --rounds 8" silent

LABEL  quick
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe --autonuke --method quick" silent

LABEL  zero
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe --autonuke --method zero" silent


# Troubleshooting Labels

LABEL  nofloppy
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe" floppy=0,16,cmos

LABEL  nosilent
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe"

LABEL  noverify
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc quiet nuke="dwipe --verify off"


# Debugging Labels

LABEL  debug
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="exec ash" debug

LABEL  shell
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="exec ash"

LABEL  verbose
KERNEL kernel.bzi
APPEND initrd=initrddb.gz root=/dev/ram0 init=/rc nuke="dwipe --method quick"


# The DBAN kernel uses DevFS without devfsd, so you may not use conventional
# device node file names in kernel options.
#
# Note that Linux 2.4.19+ will not boot with root=/dev/rd/0.  The /dev/ram0
# name is, however, now hardcoded in 'init/do_mounts.c' so root=/dev/ram0 works
# instead.  This violates the DevFS documentation and is probably a kernel bug.
#
# If a VGA or HGA video adapter is not found, then the first serial port
# detected will be used as the system console.

# This option will start syslinux on the first serial port.
#SERIAL 0

# This kernel option will force a serial console on the first serial port.
#APPEND console=ttyS0,9600n8r [...]

# Print the product banner and liability disclaimer.
#DISPLAY warning.txt

# Extra screens.
#F1 warning.txt
#F2 about.txt
#F3 quick.txt
#F4 trouble.txt
#F5 raid.txt


# The Boot Prompt
# ---------------
#
#  Usage: [label [kernel options] [nuke="dwipe [dwipe options]"]]
#
#  Dwipe Options:
#
#       --autonuke  Be really sure.
#    -m --method    The wipe method to use.
#    -r --rounds    The number of times to run the method.
#       --verify    The verification level.
#
#  Dwipe Methods:
#
#    dod522022m         American Department of Defense 5220.22-M standard wipe.
#    dodshort dod3pass  DoD short wipe, passess 1,2,7 from the standard wipe.
#    gutmann            Peter Gutmann's wipe.
#    ops2               RCMP TSSIT OPS-II standard wipe.
#    prng random        PRNG stream wipe.
#    quick zero         Quick erase.
#
#  Verification Levels:
#
#    0  off         Do not read anything back from the device.
#    1  last        Check whether the device is empty after wiping.
#    2  all         Check whether all passes were written properly.
#
#  Notes:
#
#    * The rounds option does not apply to to the quick method. This method
#      always runs one round.
#
#    * Use at least four rounds with the prng method. Using eight rounds with
#      the prng method is recommended.
#
#    * The last pass of every method fills the device with zeros, except the
#      ops2 method which fills the device with a random stream on its last pass.
#

# eof

Quick howto to copy the setup on another stick:

  • Copy the mbr from one to the other with sth like (check for your own drive letters!!)
dd if=/dev/sdX of=/dev/sdY bs=512 count=1
  • Check the partition table but by default you usually get one sdY1 with FAT, flag it as bootable
fdisk /dev/sdY -> a -> 1
  • Install syslinux
syslinux /dev/sdY
  • Copy the other files