Notes on modifying Knoppix 3.2 to boot from USB or Firewire cdrom

1) Knoppix kernel:

   a) use kernel 2.4.22 or later
   b) apply XFS mods (optional)
   c) apply drm patches from http://www.xfree86.org/~alanh/ (optional)
   d) config file is enclosed (config.knoppix)

2) Knoppix autoconfig script:

   a) apply patch knoppix-autoconfig.diff:
      cd $KNOPPIX;
      patch -p2 <knoppix-autoconfig.diff

      The mods here deal with the case that firewire and/or usb were
      autodetected and inserted at boot time.

3) Knoppix hotplug directory (optional):

   To make firewire hotplugging work properly:

   a) cd $KNOPPIX;
      tar zxvf hotplug-mods.tar.gz

   This creates a new ieee1394.agent file and an ieee1394 subdirectory
   for handling adds/removes of firewire devices.

3) Modify initrd miniroot image:

   a) Patch linuxrc with linuxrc.diff.  This adds routines for
   bringing up the firewire and usb buses and registering any
   storage devices found.

   b) Copy following modules from Knoppix source tree to ramdisk
   image:

   modules:
   cloop.o*  ieee1394/  scsi/  usb/

   modules/ieee1394:
   ieee1394.o  ohci1394.o	sbp2.o

   modules/scsi:
   3w-xxxx.o     aha1542.o      eata.o	     pas16.o      qlogicisp.o  wd7000.o
   BusLogic.o    aha1740.o      fdomain.o    pci2000.o    seagate.o
   NCR53c406a.o  aic7xxx.o      gdth.o	     pci2220i.o   t128.o
   a100u2w.o     aic7xxx_old.o  initio.o     psi240i.o    tmscsim.o
   advansys.o    atp870u.o      megaraid.o   qlogicfas.o  u14-34f.o
   aha152x.o     dtc.o	        ncr53c8xx.o  qlogicfc.o   ultrastor.o

   modules/usb:
   ehci-hcd.o  uhci.o  usb-ohci.o	usb-storage.o  usb-uhci.o usbcore.o

4) Switch to using ISOLINUX

   The last step will make ramdisk image larger than can fit onto a
   floppy unless you jettison a lot of SCSI modules.  Easier to start
   using isolinux, which does not have size restrictions.

  a) create an isolinux/ directory in the KNOPPIX master
  directory (the one that contains KNOPPIX/ and autorun.bat).

  b) contents of isolinux/ is:

       % ls -l master/isolinux/
       total 1820
       -rw-r--r--    1 root     root          107 Jul 25 00:37 boot.msg
       -rw-r--r--    1 root     root         1759 Jul 25 00:37 f2
       -rw-r--r--    1 root     root          256 Jul 25 00:37 german.kbd
       -rw-r--r--    1 root     root         9404 Sep 18 13:09 isolinux.bin
       -rw-r--r--    1 root     root         2424 Jul 25 00:37 isolinux.cfg
       -rw-r--r--    1 root     root        15603 Jul 25 00:37 logo.16
       -rw-r--r--    1 root     root       885971 Aug 22 19:12 miniroot.gz
       -rw-r--r--    1 root     root       929003 Aug 17 18:47 vmlinuz

       The file vmlinuz is from knoppix source directory.

       isolinux.bin is from isolinux distribution.

       isolinux.cfg is identical to syslinux.cfg distributed
       with real Knoppix.

       miniroot.gz is the modified compressed miniroot.

  c) modify f2 to include new linuxrc cheat codes (optional, I
  haven't figured out how to edit the ansi codes).  New cheat
  codes are:

	nofirewire      disable firewire autodetect
	nousb		disable usb autodetect

5) Recipe for making the iso image:

 rm -f master/KNOPPIX/boot.cat
 rm -f master/isolinux/boot.cat
 mkisofs -pad -l -r -J -v -V "FIREWIRE KNOPPIX" \
     -b isolinux/isolinux.bin -c isolinux/boot.cat \
     -no-emul-boot -boot-load-size 4 -boot-info-table \
     -hide-rr-moved -o ./knoppix.iso master