Linux – Recovering GRUB/Arch Linux after installing Windows 7

arch linuxbootloadergrublinuxwindows

So on my desktop I have Arch Linux installed but I need to dual boot with Windows 7. After installing Windows 7, it's bootloader takes over and the original GRUB is gone. Now, I've done this before and took notes, but apparently it doesn't want to work. Here's what I have, assuming /dev/sda1 is where Arch Linux is installed:

mount /dev/sda1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc /proc /mnt/proc
chroot /dev/mnt/
grub-install /dev/sda

After I run that and reboot, it still goes to the Windows loader, so I can still only run Windows. Any idea on what I can do to get around this?

Thanks!

Best Answer

GRUB has an internal way to do it, which I've found may work when grub-install does not. It requires an existing /boot/grub, which you should have lying around.

On a LiveCD, open up the GRUB CLI (su -c grub) and run:

find /boot/grub/stage1
root (hdX,Y)
setup (hdX)
Related Question