LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-28-2013, 09:48 PM   #1
galapogos
Member
 
Registered: May 2008
Posts: 227

Rep: Reputation: 30
How to force USB boot to /dev/sda?


Hi,

I have a custom linux environment with a 2.6 kernel downloaded from kernel.org with a simple busybox shell as init. The system boots off a USB flash drive with root=/dev/sda with lilo, and it works perfectly when it's alone with no other SATA drives.

However, once I connect a SATA drive to the PC, from the bootup logs, it seems that the SATA drive is detected as sda, and the USB flash drive is detected as sdb, so I get a kernel panic with the following message

Quote:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
Pid: 1, comm: swapper Not tainted 2.6.37 #37
This is despite setting the boot order to boot from USB drives before SATA drives.

If I try to append the root=/dev/sdb boot option in LILO, I get a different kernel panic:

Quote:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,16)
Pid: 1, comm: swapper Not tainted 2.6.37 #37
How do I get force the USB drive to be /dev/sda so that it boots up correctly?
 
Old 04-29-2013, 04:04 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Have you tried using UNetbootin? Have a look at this link. http://unetbootin.sourceforge.net/
jdk
 
Old 04-29-2013, 05:51 AM   #3
heinblöd
Member
 
Registered: May 2004
Location: France
Distribution: Slackware Gentoo
Posts: 186

Rep: Reputation: 31
If your BIOS won't let you, there is no way to force detection.


I think you need the lilo bios=0x80 option here.
Look at this, the example given there looks similar to what you need

http://www.tldp.org/HOWTO/LILO-4.html

I don't think unetbootin will be a big help in this case, if you don't want to change the stick's bootloader

Last edited by heinblöd; 04-29-2013 at 05:54 AM.
 
Old 04-29-2013, 02:32 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
Put all the drives in on cold power. Boot to bios. Move usb drive up in boot order in the "hard drive" selection.

Both usb and an internal drive are considered scsi disks in this more modern computer. Sda being the first boot selected in bios.
 
Old 04-29-2013, 03:02 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
My first thought is "use UUIDS" but it seems that might be a bit more work with LILO, does this help any?
http://nil-techno.blogspot.co.uk/201...s-by-uuid.html
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot from USB Drive - force device as sda m.lukas Linux - Hardware 10 05-13-2011 03:55 PM
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
Installing RIP LinuX on a USB drive - device name /dev/sdc becomes /dev/sda Mleahy Linux - Software 1 07-30-2008 08:57 PM
Sandisk USB card Reader not linking /dev/sg0 to /dev/sda acidraven Linux - Hardware 1 06-19-2004 03:56 PM
USB Compact flash card reader hotplug creates /dev/sda but no /dev/sda1 -Mandrake 9.1 bibinono Linux - Hardware 2 08-11-2003 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:48 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
Open Source Consulting | Domain Registration