LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-04-2004, 04:20 PM   #1
stupidloser
LQ Newbie
 
Registered: Aug 2004
Posts: 14

Rep: Reputation: 0
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 04:27 PM.
 
Old 12-04-2004, 04:27 PM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 47
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)
 
Old 12-04-2004, 04:29 PM   #3
stupidloser
LQ Newbie
 
Registered: Aug 2004
Posts: 14

Original Poster
Rep: Reputation: 0
nice. thanks for the reply 320mb!
 
Old 12-04-2004, 06:38 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,153

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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
....
 
Old 12-04-2004, 08:27 PM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
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)
 
Old 12-04-2004, 09:47 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,153

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
I stand corrected.
 
Old 12-05-2004, 02:26 AM   #7
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
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 02:27 AM.
 
  


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
how to amount hda1 (win xp pro-ntfs) hda5 (data) and cdrom (cd-rw) yohanes Linux - Hardware 2 08-30-2005 04:45 AM
GRUB problem possible if NTFS d: extended (hda5) Seb74 Linux - Newbie 7 10-28-2004 02:54 PM
Grub cannot find the filesystem type of my hd0 drive JimmyGourd Linux - Newbie 9 09-25-2004 01:28 PM
Grub: how to recover Boot Record for (hd0,0)? fishwombat Linux - General 1 04-27-2004 10:43 AM
Grub can't find files on (hd0,0) nathology Linux - Software 6 10-24-2003 11:53 AM


All times are GMT -5. The time now is 03:57 PM.

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