Installing grub to dual boot

Collins Richey crichey
Fri Jun 10 20:26:17 PDT 2005


On 6/10/05, Michael Hipp <Michael at hipp.com> wrote:
>
> The deprecation of grub-install is news to me also. Wonder what replaces
> it? It always "just worked" for me.
> 

If I remember correctly, grub-install was deprecated almost as soon as
it was created. The manual approach always works. Here's a brief
intro. I'm assuming you have Windows on hda1 and Linux on hda2 with no
/boot partition, otherwise the numbers below will have to be changed.

1) I presume that your distro did the correct thing and installed the
required grub boot stage...  modules and a grub.conf (or menu.lst) in
/boot/grub.

2) boot from something useful like Knoppix and mount (remount as rw)
your Linux partition (hda2) on /mnt/something. Verify that
/boot/grub/grub.conf (or menu.lst) has the correct stanzas to boot
Windows (hda1 or grub (hd0,0)) and Linux (hda2 or grub (hd0,1)).

3) chroot /mnt/something /bin/bash

4) grub

     root (hd0,1)             <== this is hda2, partition where grub can find
                                             /boot/grub
    setup (hd0)               <== disk drive (hda) where MBR will be written

    quit

5) exit from chroot; unmount /mnt/something; reboot and enjoy.

Those depressingly few lines in 4) are all that grub-install
accomplishes, when it actually works.

Enjoy


-- 
 Collins
       Head teachers of the world unite: you have nothing to lose but 
       the Start button.



More information about the Linux-users mailing list