LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB concepts clarify (https://www.linuxquestions.org/questions/linux-newbie-8/grub-concepts-clarify-286626/)

zillah 02-05-2005 01:00 PM

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)

Brain Drop 02-05-2005 01:39 PM

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.

zillah 02-05-2005 01:59 PM

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

Brain Drop 02-05-2005 03:29 PM

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.


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