Transition to libata driver - SCSI system - GRUB changes
Linux - SoftwareThis 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
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.
Transition to libata driver - SCSI system - GRUB changes
My Specs:
Debian 4.0
2.6.25
GNOME/GDM/Xorg
Recently I moved to using the libata driver (in Kernel) for my IDE devices which caused my entire system to move to SCSI system. Basically all instances of "/dev/hd*" should be now referred to as "/dev/sd*". I changed those in my GRUB (menu.lst) file and in my /etc/fstab. All was fine until I thought of this scenario:
Suppose my Debian system is installed on Primary Slave (/dev/sdb) with a another hard drive as my primary master (/dev/sda). Now what if I just remove my primary master and just boot the system? My system won't boot because my GRUB still refers to "root=/dev/sdb1" which is no longer valid because with just one disk present it will be treated as /dev/sda by linux Kernel under the new SCSI system. I will have to change the line in GRUB to "root=/dev/sda1".
Is there is a workaround for this? I have seen that new releases of UBUNTU using root=UUID=<some large number>. Is that the solution?
I would just add a new line to grub as you suggested (prior to taking out the primary master) and label it in grub as "alternate boot with primary master missing" or something; using the UUID should work too, though I haven't tried it.
I would just add a new line to grub as you suggested (prior to taking out the primary master) and label it in grub as "alternate boot with primary master missing" or something; using the UUID should work too, though I haven't tried it.
Hmm. Does it mean that it is a shortcoming of SCSI system? Because with the /dev/hd* thing those would never change even if you remove/add a drive or a CD-ROM.....
The problem isn't libata per se, but probably the initscripts - and udev rules.
You should be able to use /dev/disk/by-id/... I'd imagine. Not sure if that will be available by the time you want to mount the root or not.
Easy enough to test.
I find UUID to be a PITA - you'll have to add support for it in an initrd to use it for grub parms. I guess with Debian you're already using an initrd - I never do when I build a kernel.
Also UUIDs aren't necessarily unique. Try dd'ing a few partitions around ...
If I find I can't boot a system because of a disk "moving", I just adjust the grub entry from the menu, and fix it (permanently) later. LABELs (or UUID) in the fstab will get you around those mountpoints now being on a different device.
The problem isn't libata per se, but probably the initscripts - and udev rules.
You should be able to use /dev/disk/by-id/... I'd imagine. Not sure if that will be available by the time you want to mount the root or not.
Easy enough to test.
I find UUID to be a PITA - you'll have to add support for it in an initrd to use it for grub parms. I guess with Debian you're already using an initrd - I never do when I build a kernel.
Also UUIDs aren't necessarily unique. Try dd'ing a few partitions around ...
If I find I can't boot a system because of a disk "moving", I just adjust the grub entry from the menu, and fix it (permanently) later. LABELs (or UUID) in the fstab will get you around those mountpoints now being on a different device.
I see....Thanks for the explanations. So basically it is the udev and init-scripts which names the devices as sd* when they see libata driver being loaded?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.