LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 05-17-2008, 03:19 AM   #1
shawroo
LQ Newbie
 
Registered: May 2008
Posts: 2

Rep: Reputation: 0
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.
 
Old 05-17-2008, 07:41 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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.
 
Old 05-17-2008, 06:45 PM   #3
shawroo
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MS3FGX View Post
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
 
  


Reply

Tags
boot, linux, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Drive Linux Boot Customization lymae Linux - General 2 12-11-2006 06:38 PM
can't boot from usb: how to boot linux from ext. hard drive? bernhardtjeff Linux - Newbie 5 07-07-2006 02:42 AM
Wish to Boot Linux from USB Hard Drive mdaoud Linux - Newbie 3 02-20-2006 07:44 PM
making usb thumb/pen drive to boot linux rohdimp_24 Linux - Software 2 07-11-2005 02:21 PM
Boot an run linux on USB flash drive possible? zahoo Linux - General 1 03-20-2005 04:12 PM


All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration