[debian-knoppix] Boot from USB stick
Hi Nicki and Kohjin,
On Thu, Apr 24, 2003 at 11:15:21 +0200, Nicki Messerschmidt wrote:
> > I managed to get a 128MB usb memory stick bootable with a stripped
> > down version (82MB) of Knoppix. I had to include the necessary usb
> > kernel modules (usb-uhci, usb-ohci, usb-storage) in the initial
> > ramdisk (miniroot.gz) and I modified /linuxrc.
> Could you provide this or a how to? And did you find a solution to the
> timing problem you encountered with the usb modules?
Unfortunately, booting from USB is extremely hardware and BIOS
dependent. I found a solution for the timing problem, but I failed making
another 128MB USB stick bootable with the same method. It seems BIOSes
are very picky about the disk geometry and/or stick type.
I started with looking at spblinux for making the USB stick bootable
(Kohjin, you were right ;-)). The bootloader is syslinux 2.00.
Then I extracted modules usb-uhci.o, usb-ohci.o, usb-storage.o from
running Knoppix and included them into /modules/scsi in
miniroot.gz. (newer Knoppix releases also need usbcore.o, but my 82MB
mini knoppix is based on Knoppix 3.0)
Next I modified /linuxrc to load these modules and have a short delay
before test-mounting CDROMs / partitions:
USB_MODULES="usb-uhci.o usb-ohci.o usb-storage.o"
loadmodules SCSI $USB_MODULES
IFS="." read begin x < /proc/uptime
while read end x < /proc/uptime
[ "$begin" != "$end" ] && break
# All interactively requested modules should be loaded now.
> A bootable usb memory stick would be a really cool thing... *g*
Yes, but I'm afraid BIOS manufacturers are making their own "standards"
for booting USB devices...
 I solved it this way:
When "delay" is called only once, it can be too short (the integer part of
/proc/uptime is checked for changes). So I simply call it once again.
There will be at least a delay of one second.
Christian Perle email@example.com
Grunaer Str. 31 http://www.itm.tu-clausthal.de/~perle/
01069 Dresden LinuxGuitarKitesBicyclesBeerPizzaRaytracing
debian-knoppix mailing list