LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to force USB boot to /dev/sda? (https://www.linuxquestions.org/questions/linux-software-2/how-to-force-usb-boot-to-dev-sda-4175459933/)

galapogos 04-28-2013 09:48 PM

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?

jdkaye 04-29-2013 04:04 AM

Have you tried using UNetbootin? Have a look at this link. http://unetbootin.sourceforge.net/
jdk

heinblöd 04-29-2013 05:51 AM

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

jefro 04-29-2013 02:32 PM

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.

273 04-29-2013 03:02 PM

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


All times are GMT -5. The time now is 12:14 AM.