Talk:GRUB

From ArchWiki

Jump to: navigation, search

NOTE: I made this discussion because I got tired of having to experiment again with how to do this after I had trashed the installtion while reinstalling another OS on a dual-boot system. I figured other people would be intrested in knowing and that this would be the best place for it. If you feel this should be somewhere else/deleted feel free.

[edit] Installing GRUB with a GRUB bootdisk

Step 1) Make a GRUB boot floppy or CD

Creating a GRUB boot floopy
Making a GRUB boot CD

Step 2) Installing GRUB navitvely
Once you boot up with your CD or floppy (if you have any problems booting check the BIOS settings to make sure it's turned on) you have to do a few simple things. First you need to set 'root' to the partition where containing the boot directory. This is done in (hdn,m) format where n is the disc and m is the partition starting with 0.

If you don't know which partition has the boot directory use the command find in this format.

find /grub/stage1 -or- find /grub/stage2

Finally after we have defined root we can use the command 'setup' to actually install GRUB to the MBR. The syntax that is required for 'setup' since we have defined root is 'setup install_device. If you're installing to the MBR of your primary master than you would use this format.

setup (hd0)

Installing GRUB navtively(man GRUB)

That's pretty much it. The reason this always gives me so much trouble is because for some reason even though all the GRUB documentation says to look for /boot/grub/stage1, etc. it doesn't find anything there and it always stumps me for an insanely long time. Hope this helps somebody.

--gonffen 22:27, 1 Sep 2005 (EDT)

[edit] Installing the boot loader into Master Boot Record: not quite correct?

I'm referring to following lines:

If you have a separate boot partition mounted at /boot, do one of the following

grub-install --root-directory=/boot '(hd0)'
grub-install --root-directory=/boot sda
grub-install --root-directory=/boot hda


I do have a separate partition for kernel images, mounted at /boot. However, running

grub-install --root-directory=/boot '(hd0)'

installed grub in /boot/boot/grub! The consequence was that at boot grub didn't detect automatically the "menu.lst" file, which was located in /boot/grub.

Installing with

grub-install '(hd0 )'

worked fine. I suppose this is because the 'grub-install' script has changed since this page was written. Should I change the page?

Personal tools