LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Boot linux 2.6.18 from a USB drive (http://www.linuxquestions.org/questions/linux-general-1/boot-linux-2-6-18-from-a-usb-drive-642817/)

shawroo 05-17-2008 02:19 AM

Boot linux 2.6.18 from a USB drive
 
I'm having some trouble on booting a 2.6.18 kernel from a usb drive. By searching the topic in the Internet, I think I understand the issue with booting linux from a usb drive. Basically the scsi bus needs to be rescanned in order to detect the disk and mount it as a scsi disk.

Martyn Honeyford has an article "Boot Linux from a FireWire device" well explaining the issue and suggesting some solutions. However the article is quite old, talking about 2.4 kernel. He has the following script to force a scsi scan in the initrd.

echo "scsi add-single-device 0 0 0" > /proc/scsi/scsi
echo "scsi add-single-device 1 0 0" > /proc/scsi/scsi
echo "scsi add-single-device 2 0 0" > /proc/scsi/scsi
/bin/devfsd /dev -np

The newer 2.6 kernel obsoleted the devfs and the devfsd is no longer existent. Anybody know(s) how to force a scsi scan in a 2.6 kernel?

Thanks a lot,
-shawroo.

MS3FGX 05-17-2008 06:41 AM

All you should have to do in your initrd boot scripts is simply wait a few seconds before attempting to mount the USB device after the modules load and udev kicks in.

shawroo 05-17-2008 05:45 PM

Quote:

Originally Posted by MS3FGX (Post 3156108)
All you should have to do in your initrd boot scripts is simply wait a few seconds before attempting to mount the USB device after the modules load and udev kicks in.

Actually I have all the related modules built in the kernel.

CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y


CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
CONFIG_BLK_DEV_SD=y

So the newer 2.6.18 kernel actually does a scsi scan automatically? When does udev kick in?

TIA.
-shawroo


All times are GMT -5. The time now is 05:44 AM.