LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-15-2008, 01:29 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
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?

Any help will be greatly appreciated.


Thanks
 
Old 05-16-2008, 07:16 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Ignore this ... too late at night
 
Old 05-16-2008, 11:25 AM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by syg00 View Post
Ignore this ... too late at night

Not quite sure as to what you are trying to say. Should I ignore the SCSI system or you are going to reply once you get up in the morning?
 
Old 05-16-2008, 01:54 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
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.
 
Old 05-16-2008, 03:35 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by mostlyharmless View Post
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.....
 
Old 05-16-2008, 08:26 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 05-17-2008, 01:54 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by syg00 View Post
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?
 
  


Reply



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
How to load a driver before libata Ohesceayar Linux - Hardware 1 11-02-2006 06:57 PM
How do I call/use libata from my driver Ohesceayar Linux - Kernel 0 11-02-2006 11:13 AM
GRUB or LILO boot to SCSI drive on SCSI system w/ IDE card mkl838 Linux - General 1 03-06-2005 09:01 PM
Ok, I decided to make Linux my main system... now please help me in the transition! RobertoBech Mandriva 11 03-09-2004 08:18 PM

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

All times are GMT -5. The time now is 05:21 AM.

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