LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-03-2007, 06:56 PM   #1
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Grub boot Hard disk- make 'root=' option a variable (/dev/sda1 keeps changing),


The problem is that /dev/sda keeps changing to /dev/sdc
Depending on what other USB , sata happen to be connected at boot

Any way of making root=variable

Code:
title		kernel 2.6.17-10-generic
root		(hd0,4)
kernel		/boot/vmlinuz-2.6.17-10-generic root=/dev/sda5 ro quiet splash
initrd		/boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot
 
Old 02-03-2007, 07:07 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,264

Rep: Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027
You're looking at this arse-about.
If the disk changes, fstab will also be wrong.

The solution is not to change grub (and everything else), but to make the disk address static. Sounds like udev is causing you grief - set some (udev) rules to force the disks to where you want them.
 
Old 02-03-2007, 07:41 PM   #3
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00
You're looking at this arse-about.
If the disk changes, fstab will also be wrong.

The solution is not to change grub (and everything else), but to make the disk address static. Sounds like udev is causing you grief - set some (udev) rules to force the disks to where you want them.
I fixed FSTAB thank you very much

FSTAB uses the unique Hard Disk UUID to mount partitions

however Grub locks up when /dev/sda5 changes to /dev/sdc5 or /dev/sdb5

but i will look around for udev configuration rules
 
Old 02-03-2007, 07:53 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,264

Rep: Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027
Quote:
Originally Posted by carl0ski
FSTAB uses the unique Hard Disk UUID to mount partitions
Good point - never use it personally.
The udev rules will come in handy other ways too - say when mounting a camera.
 
Old 02-03-2007, 08:55 PM   #5
joelscott
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Rep: Reputation: 0
Another option is to use the 'label' option in grub.conf.

i.e. root=label=bigdrive

where 'bigdrive' is the label on your portable drive. That way you don't need to deal with udev.

Hope this helps.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR AT MOUNTING USB :mount: wrong fs type, bad option, bad superblock on /dev/sda1, saiket Linux - Hardware 3 04-12-2008 12:07 AM
GRUB's hard disk option unable to boot kernel 2.6.15 cvelasquez Linux - Software 2 03-10-2006 03:18 PM
How can I install Grub to /dev/sda1 stardotstar Linux - Software 3 02-13-2006 09:55 PM
Grub Dual Boot /dev/sda1 /dev/hda1 jono268 Debian 4 01-14-2005 04:54 AM
how to mount /dev/sda1 not only for root? mizuki26 Linux - Newbie 4 11-04-2003 08:15 PM


All times are GMT -5. The time now is 09:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration