1

I currently have a PC with Vista and Ubuntu installed, using the Grub boot loader to select the OS. The two OSes are on separate partitions.

If I were to ugrade the Vista installation to Windows 7, will it affect the grub loader? If it does, how would I re-instate the grub loader after the update?

Skizz
  • 982
  • 1
  • 11
  • 26

1 Answers1

3

Yep, Windows 7 will break your GRUB. You can get it back like so:

1) Boot off the LiveCD

2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub “prompt”, and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.

sudo grub

> root (hd0,0)

> setup (hd0)

> quit

Reboot (removing the livecd), and your boot menu should be back.

Check The How-To Geek's guide for more details, in case you don't see Windows in the boot menu after this configuration.

John T
  • 163,373
  • 27
  • 341
  • 348
  • You should use `grub> find /boot/grub/stage1` to find where root is. And grub uses quit, not exit, as I found out yesterday – TonyUser Oct 27 '09 at 12:33
  • That looks good. I'll give it a go. – Skizz Oct 27 '09 at 14:31
  • An extra note: if, like me, you forgot which partition number Ubuntu was installed on, typing "root (hd0," and then displays the available partitions, just pick the one that it identifies as a readable partition (it doesn't recognise the NTFS partitions). – Skizz Nov 11 '09 at 12:33