Hi,
I've been experimenting with making a USB flash drive bootable. I've got a 512MB pen drive with Gentoo on it. I had to add the rootdelay option to the kernel boot options, otherwise I'd get a kernel panic. I also had to build SCSI, usb and usb-storage into the kernel.
The extract from my lilo.conf (OK, I know grub is fashionable these days, but I find Lilo far more friendly!) shows how to use it.
image = /boot/vmlinuz-2.6.14 root = /dev/sda2 label = Gentoo read-only # read-only for checking append = "lapic rootdelay=10"
HTH
Chris
On Mon, 2006-01-16 at 21:58 +0000, Wayne Stallwood wrote:
I'm lost for ideas now. :-((
Trying it here now and running into similar problems.
Perhaps the best way of learning how to do this is to download an image of a USB booting distro (DSL or something) and see how they do it.
If not then this document is a little out of date but seems to be speaking some sense.
http://www-128.ibm.com/developerworks/linux/library/l-fireboot.html?ca=dgr-l...
Primarily it is talking about firewire boots but most of this should also apply to USB booting.
Pay special attention to about halfway down where it is talking about one phase and two phase boots.
This bit in particular could be the source of your problem
[snip]
This almost works, except for two problems:
1. Because of the fact that SBP support uses SCSI emulation, the emulated SCSI bus need to be "rescanned" in order to detect the disk and allow /dev/sda1 to be mounted. This scanning is performed with a couple of simple commands. Unfortunately, however, using a one-phase boot, we cannot run any commands until the kernel has finished booting, and the kernel cannot finish booting until the root file system is mounted -- a classic Catch-22 situation. Thankfully, there is a patch available for 2.4 kernels that causes the SCSI bus to be scanned on startup (see Resources for more details). By applying this patch, I was able to have the external drive automatically detected by the kernel during bootup with no rescanning commands required. This leads us to the next problem. 2. There is a timing window within the kernel, which means that often, the kernel will proceed to try to mount the root device before it has had a chance to be properly detected or initialized. Again, there is a patch available for this (please see Resources for a link) that simply makes the kernel wait for a short period of time on startup, and retry if it fails to mount the root filesystem (to give the external drive time to be recognized).
By applying these two patches, I was successfully able to build a kernel on a bootable floppy disk, which would boot and then use the external FireWire drive as root.
The main problem with this approach is that it requires us to patch the kernel source -- which is at best a pain (when new kernel versions are released) and at worst, a real problem (if the patches are not maintained to keep in step with the other changes occurring to the kernel).
It may have occurred to you that we can avoid these two problems if our BIOS supports USB or FireWire and we are booting directly. Unfortunately, this is not the case: while this method uses BIOS calls to access the disk during boot up, once the kernel begins to initialize, the BIOS is no longer used, and the disk is accessed using the kernel drivers -- so the same problems are encountered.
[snip]
interesting huh ?
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above! -- This email has been verified as Virus free Virus Protection and more available at http://www.plus.net