Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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)
share|improve this answer
    
And that'll basically do all of the magic? –  Chiggins Dec 23 '11 at 19:54
    
@Chiggins It should. GRUB knows how exactly to locate its own stuff within most any partition type, and shouldn't require any extra mounting. –  new123456 Dec 23 '11 at 19:55
    
Alright cool, thanks for that. I'll give it a shot when I get home. –  Chiggins Dec 23 '11 at 20:56
    
Yeah I tried to run that but it didn't work as expected :\ Still booting into the Windows bootloader –  Chiggins Dec 24 '11 at 0:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.