Friday, July 27, 2007

USB boot for Linux/Fedora

I purchased an eSATA enclosure so that I could boot multiple OSs and have something for backup. I've got CentOS4 (repackaged RHEL 4) on there for some older software that I use for work. The eSATA enclosure also has a usb port while my laptops don't have an eSATA port.

I want to be able to boot the eSATA enclosure when using USB. Since most of the kernels that come with a distribution don't support booting from USB, I had to make some changes. Using this website as a guide I was able to setup the CentOS update kernel.

This was the only command that I had to was:

mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod /boot/usbinitrd.img 2.6.9-1.667smp

Make sure that you modify it for your kernel version.

The difference in speed between eSATA and USB is really evident here. The timed buffered disk reads are:
eSATA ~71MB/sec
USB: ~31MB/sec

Update:
I recommend that you setup the usbinitrd image while you're still connected to the eSATA connection, otherwise you may have to use the rescue CD to perform the operations described by the external website.

Also, I have USB 2.0 ports on my laptop and the enclosure supports USB 2.0. I would imagine that a USB 1.1 port is very much slower. See the comments sections.

3 comments:

Olen said...

Is there any difference between USB 1.0 and 2.0? Which were you using here?

James Hubbard said...

I'm using USB 2.0. I would bet that there would be a big difference between USB 2.0 and 1.0. I don't know if the USB 1.0 spec has support for boot devices, but the speed for 1.1 is 12Mbps whereas the speed for USB 2.0 is 480Mbps.
For more info see:
http://www.everythingusb.com/usb2/faq.htm

Olen said...

Turns out I meant 1.1. Sometimes my fingers go faster than my brain. :)