LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-05-2005, 01:00 PM   #1
zillah
Member
 
Registered: Oct 2004
Posts: 532

Rep: Reputation: 30
GRUB concepts clarify


Hi All

If I want to reinstall grub for any reason and my /boot is hda3 , we commanly see in the most of the web sites this command:

grub> root (hd0,0)

1- Do I need to change the above command to this(my case):
grub>roo (hd0,2) ?


2- Is there any difference between these two commands:

grub> setup (hd0)

grub> setup (hd0,0)

Last edited by zillah; 02-05-2005 at 01:30 PM.
 
Old 02-05-2005, 01:39 PM   #2
Brain Drop
Member
 
Registered: Feb 2003
Location: just outside reality
Distribution: balanced
Posts: 752

Rep: Reputation: 35
Re: GRUB concepts clarify

Quote:
Originally posted by zillah
Hi All

If I want to reinstall grub for any reason and my /boot is hda3 , we commanly see in the most of the web sites this command:

grub> root (hd0,0)

1- Do I need to change the above command to this(my case):
grub>root (hd0,2) ?
yes, you got it.
Quote:

2- Is there any difference between these two commands:

grub> setup (hd0)

grub> setup (hd0,0)
yes, (hd0) refers to the mbr of hda, where the bios looks for booting instructions, and (hd0,0) refers to the first regular partition on hda.
 
Old 02-05-2005, 01:59 PM   #3
zillah
Member
 
Registered: Oct 2004
Posts: 532

Original Poster
Rep: Reputation: 30
As you know they always mention for GRUB,install it on MBR or first sector of boot partition.

now we knew that : setup (hd0) means MBR, this is obvious.

What does setup (hd0,0) mean? Does it mean first sector of root or first sector of boot or fisrt sector of /usr----etc?

Why online always do we see: set (hd0,0)?

Thanks

Last edited by zillah; 02-05-2005 at 02:02 PM.
 
Old 02-05-2005, 03:29 PM   #4
Brain Drop
Member
 
Registered: Feb 2003
Location: just outside reality
Distribution: balanced
Posts: 752

Rep: Reputation: 35
Like I said, (hd0,0), refers to the first partition on the hard drive, in other words, hda1. If you have a hard drive with only one partition on it, that partition would be (hd0,0). Normally you will not want to run setup (0,0), because this will setup stage 1 grub on hda1. You would still need then to have some form of bootloader on the mbr as well. Often all that needs to be typed at the grub prompt is:

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

This is assuming that your /boot is on hda1. For contrast, hdb2 (second partition on second hard drive) would be (hd1,1).

Hope this helps.

Last edited by Brain Drop; 02-05-2005 at 03:32 PM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel compile - Please clarify ksun Linux - Newbie 2 12-06-2004 05:28 PM
some questions to clarify dimsun Linux - Newbie 4 11-05-2004 09:28 PM
Clarify something about Fedora for me? purplecow Fedora 12 11-05-2004 05:36 PM
Just to clarify (scripting, bash) onewhoknows Linux - Newbie 2 05-21-2004 06:12 PM
help me clarify shanenin Linux - Software 1 11-06-2003 09:28 PM


All times are GMT -5. The time now is 09:00 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