Restore GRUB 2 after Windows installation
November 8th, 2009There are sometimes when GRUB 2 disappears for no reason (or it appears this way, it’s always the user’s fault) and the user cannot boot to Ubuntu. This happens especially when you have a dual-boot system using both Windows and Linux distro. Here I’ll show you how you can restore GRUB 2 from within Windows.
1) The fist thing you have to do is to download GRUB4DOS from the official site and extract it to C: drive. If you are using an XP installation, you have to copy the grldr file to C:. On the other hand if you are using Vista/7, you should copy grldr and grldr.mbr.
2) At the root of C: there should be a file called boot.ini in case of XP (if you don’t see it, enable “Show Hidden files, folders and drives” from Folder Options). Open it in notepad and copy the line:
c:\grldr="grub4dos"
In case of Vista/7 you have to open Notepad and copy the following lines:
[boot loader]
timeout=0
default=c:\grldr.mbr
[operating systems]
C:\grldr.mbr="Grub4Dos"
and then click save and in the filename box write:
“boot.ini”
Yes, with the quotes.
3) Now create a new file in Notepad and copy the following lines:
timeout 0
default 0
title grub2
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img
boot
4) Restart the system and choose to boot with Grub4Dos. Now you should be able to see your Linux distro. Choose it (in my case it was Ubuntu) and when you boot into the operating system open a teminal and type:
sudo grub-install /dev/sda
That’s it. GRUB 2 is back and alive!




