Linux - GeneralThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Excuse me, would you please be more specific/expand that answer? I'm currently wondering about installing grub myself, and I'm a little slower than the rest. :-P
If a separate boot partition then that is the choice unless you want it to install to the MBR.
This is answering a different question than OP is asking.
Something needs to be in the mbr--if you put GRUB in a partition boot sector, you still need to point to it somehow.
To the original question: You have to tell the GRUB installer where /boot is---ie where it will find it's config files, kernel, etc.
My site (link below) has an article on booting which may be useful...
While installing grub using grub-install command, do we specify root partition or boot partition?
Thanks
OK--so you mean "where do we install GRUB"??
It is neither of the above...
Normally, GRUB gets installed in the MBR. The other typical option is to put it in the boot sector of a partition. If you do it this way, you then have to have SOMETHING in the mbr that points to that partition--eg using the "chainload" command.
If you have a Linux install with separate partitions for /boot and /, then I guess GRUB would go in the boot sector of the partition which contains /boot.
To install 1st stage grub we use grub-install /dev/hda
in /dev/hda part should we specify the location of our boot filesystem or root file system? or even if they are on the different partition we still use only grub-install /dev/hda command.
grub-install /dev/hda puts stage1 on the MBR of hda---it has nothing to do with where /boot or / are.
To install GRUB (by any method), you have to specify 2 things:
Where the /boot directory is
Where to install GRUB
grub-install apparently defaults to assuming that /boot is in /, and is all in the current Linux partition.
Note from the GRUB manual that the "native" method--using the GRUB shell--is preferred. In this latter method, the "root" command is required:
grub
root (hdX,Y) tells grub where /boot is
setup (hdX) installs grub in the MBR
Look at the booting article at my site--link to the GRUB manual is there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.