Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just put together a new box and I'm using a 74gb Raptor (sata) for the OS - linux only for those who don't know me...
Raptor is plugged into SATA1 (DFI lanparty) and I have a 300gb (pata) drive where /home and a few other partitions are mounted.
My problem is this: sometimes when I boot, Raptor is sda, and sometimes Raptor is sdb. Editing fstab is getting annoying and obviously there has to be a solution, so has anyone else had this issue? The Raptor is jumpered to be MASTER, the other drive has no jumper on it at present.
I've built countless machines and never ran across this one before...
I just put together a new box and I'm using a 74gb Raptor (sata) for the OS - linux only for those who don't know me...
Raptor is plugged into SATA1 (DFI lanparty) and I have a 300gb (pata) drive where /home and a few other partitions are mounted.
My problem is this: sometimes when I boot, Raptor is sda, and sometimes Raptor is sdb. Editing fstab is getting annoying and obviously there has to be a solution, so has anyone else had this issue? The Raptor is jumpered to be MASTER, the other drive has no jumper on it at present.
I've built countless machines and never ran across this one before...
Thanks in advance!
Hi,
my girlfriend had similar problem with OpenSuse. She managed to solve problem by setting the other drive to be primary. Try to do that.
All best
Use udevinfo to get unique attributes about the devices you are going to write a rule for.
udevinfo -a -p /sys/block/sda | grep -i model
Gives the following output: SYSFS{model}="LD 0 RAID1 139G"
udevinfo -a -p /sys/block/sda | grep -i size
Gives the following output: SYSFS{size}="286515200"
udevinfo -a -p /sys/block/sdb | grep -i model
Gives the following output: SYSFS{model}="PERC 5/E Adapter"
udevinfo -a -p /sys/block/sdb | grep -i size
Gives the following output: SYSFS{size}="10732699648"
2. Now that we have unique information about each device, we can write a udev rule and rename each device. cd /etc/udev/rules.d
vi 51-perc.rules
Place the following into the file: SYSFS{size}="10732699648", SYSFS{model}="PERC 5/E Adapter", NAME="sdb"
SYSFS{size}="286515200", SYSFS{model}="LD 0 RAID1 139G", NAME="sda"
On my SATA mother board the first SATA is SATAII0.It may make no difference, but you might put your Raptor, jumpered as Master, on the first controller connection. Also, set the jumper on the PATA HDD as Master.
I would want the jumpers and the boot flags on both the HDD to reflect what you want them to be, one to be seen first as the HDD to boot from, and one to be seen thereafter.
You might check your BIOS to see how the two HDD are detected, and if there are any settings in the BIOS boot sequence that determine the HDD to be booted. On my board, A Gigabyte, there are, under Hard Disk Boot Priority, choices for First Boot Device, Second, etc. Upon selecting Hard Disk as one of the devices to boot from, I may press "enter" and choose HDD0 or HDD1, etc. for the SATA HDD.
My assumption is that the BIOS is presenting linux with whichever HDD it manages to find first and that the BIOS setup presents them as equally valid for presentation to the OS.
The post from farslayer may well be the one to fix the problem, but I would think that a logical solution might as well also rest on a good electronic base, those sequences and jumpers for example.
Good Luck
Last edited by thorkelljarl; 03-27-2009 at 09:26 AM.
changing drive jumpers or BIOS settings may work for the short term, but my concern is then you add another drive to the system, or leave a USB drive plugged in over a reboot, and you are troubleshooting all over again.. if drive device names that change is an issue, I would try to address the issue where it's occurring..
The udev rules are fixed and won't change, so you can build the rule set as you go, or add to the system.
Best of luck and remember to feed back with your final working solution.. Might be something completely different than we've provided thus far
There are so many interfaces on motherboards these days, SATA, SATA RAID, PATA, PATA RAID, eSATA, USB, etc.. who knows which one the system is going to present first to the OS.. I'm ultimately the one that ends up sitting there scratching my head wondering why didn't the system boot this time ? I have one system that refuses to complete POST if I forget to unplug my External USB Hard drive.. now what's that all about ? I could see it failing to start Linux, but not completing POST even with an error ? It can be trying at times
You can also use the UUID number in grub and /etc/fstab. Then the correct filesystem is selected even if the node assignment changes.
In fstab you can use UUID=<UUID #> instead of the device node.
And, just to nit-pick, those (/dev/sda, ...) names are not drive aliases. They are the names assigned to the physical drives presented to the kernel in the order specified by your GRUB settings which is, by default, the order specified by the BIOS, but you can change that with the GRUB map directives.
If you want to have drive aliases, you can use udev to create symlinks from the physical drive name (based on drive characteristics as described above) to any mnemonic name you want to use.
Wow, all great suggestions particularly the UUID and udev posts. To thorkelljarl - I am using the first SATA connect and set to MASTER. There are 8 in this machine numbered 1-8 which is why I'm puzzled in the first place. Drives order is set correctly in the BIOS as well.
I'll most likely give the UUID one a shot. Should be a painless and relatively elegant way to go about it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.