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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-04-2004, 03:20 PM
|
#1
|
|
LQ Newbie
Registered: Aug 2004
Posts: 14
Rep:
|
grub; hda1 == root(hd0,0) ; hda5 = ????
simple question, I'm editing my grub to include a distro installed on hda5, so what should the first line [i.e.- root(hdx,x)] be?
my hda1 uses (hd0, 0)
so hd5 should use hd?,?
Last edited by stupidloser; 12-04-2004 at 03:27 PM.
|
|
|
|
12-04-2004, 03:27 PM
|
#2
|
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
Re: grub; hda1 == root(hd0,0) ; hda5 = ????
Quote:
Originally posted by stupidloser
simple question, I'm editing my grub to include a distro installed on hda5, so what should the first line [i.e.- root(hdx,x)] be?
|
root (hd0,4)
|
|
|
|
12-04-2004, 03:29 PM
|
#3
|
|
LQ Newbie
Registered: Aug 2004
Posts: 14
Original Poster
Rep:
|
nice. thanks for the reply 320mb! 
|
|
|
|
12-04-2004, 05:38 PM
|
#4
|
|
Moderator
Registered: Aug 2002
Posts: 10,707
|
It depends on how your drive is partitioned. It is my understanding that grub works on recognized partitions starting from 0.
So if your drive is partitioned.
/dev/hda1 - hd0,0
/dev/hda4 - hd0,1
....
|
|
|
|
12-04-2004, 07:27 PM
|
#5
|
|
Member
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288
Rep:
|
First, the partition number (the 5 in hda5) is always 1 less than the linux number. So it is 4 in this case.
Second, grub scans through hda-hdf in sequence, assigning a drive number if and only if a drive is detected. So if for example you have a hd on hda and hdf and not on any other positions hda=(hd0) and hdf=(hd1).
Finally, an entry in menu.lst/grub.conf like this:
root(hd0,0)
refers to the partition on which menu.lst, grub.conf, the stage files etc. which you are using reside. This is grubs root, _not_ the filesystem root (/). It is distinct from the root=hd?? on the kernel line. root(hd?,?) is optitional by the way. That info is encoded in the mbr when you install grub. It is usefull to have as a reminder of which menu.lst/grub.conf to edit when booting multiple linux installations. Many distro's will install with it commented out:
#root(hd0,0)
|
|
|
|
12-04-2004, 08:47 PM
|
#6
|
|
Moderator
Registered: Aug 2002
Posts: 10,707
|
I stand corrected.
|
|
|
|
12-05-2004, 01:26 AM
|
#7
|
|
Member
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288
Rep:
|
Quote:
Originally posted by michaelk
I stand corrected.
|
Confused the heck out of me at first, too.
Forgot to mention, only hd's count, other ide devices (ie cdrom's) are done seperately in a similar fashion, as are floppies (fd0), scsi drives (sd0) and so on.
It's important to remember which root(hd?,?) you're using and this can change when installing multiple linux system's. I prefer to use the grub prompt to set this manually to the /boot/grub I want to use, as grub-install seems to be a little unpredictable, at least for me.
Last edited by kevinalm; 12-05-2004 at 01:27 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:14 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|