Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88645 - Wrong command to install GRUB in the MBR
Summary: Wrong command to install GRUB in the MBR
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Gentoo Linux x86 Installation Guide (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-10 14:21 UTC by Markus Petersen
Modified: 2005-04-17 13:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Petersen 2005-04-10 14:21:45 UTC
In the manual, it says, if you want to install GRUB you type "grub-install --root-directory=/boot /dev/hda". I only got it working when I typed "grub-install /dev/hda", WITHOUT the "--root-directory"-parameter. I suppose "grub-install --root-directory=/ /dev/hda" would work too, but I haven't tested.

It seems that the root directory is the root of linux, NOT of GRUB. I am not certain, linux newbie, but this is how I got it working. If you do as said in the manual, it creates another boot directory in boot, so grub is installed in /boot/boot/grub, which is not what we want, probably.

Hopefully it's helpful. :)

Reproducible: Always
Steps to Reproduce:
1. grub-install --root-directory=/boot /dev/hda
2. GRUB is now installed into /boot/boot/grub, which is wrong.
Actual Results:  
GRUB is now installed into /boot/boot/grub, which is wrong.

Expected Results:  
Install into /boot/grub

None.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2005-04-16 13:38:02 UTC
Inside grub-install, "--root-directory" is stored in ${rootdir}. The ${bootdir} is then defined as "${rootdir}/boot" and ${grubdir} is "${bootdir}/grub". Then, later on, the ${grubdir_device} is found from ${grubdir} using the find_device function, which uses df(1) which should be okay given the fact that we've copied the /proc/mounts over.

So yes, it's indeed not needed.

In case you're wondering why I put this in here, it's because I'll probably forget otherwise and now I have something to return to :)
Comment 2 Markus Petersen 2005-04-17 13:02:23 UTC
Good. Makes me kind of proud I found a bug, don't know why.. :D Glad to help. :)

Regards