Fix Grub

After installing Ubuntu (or any other linux) as a dual boot with Windows 7, the bootloader seems to be unable to detect the Windows OS. Here is a quick way to fix this.

Hit the following commands to update grub to detect Windows on your system.

user@Xubuntu-EU:~$ sudo su
 [sudo] password for user:
 root@Xubuntu-EU:/home/user# grub-update
 grub-update: command not found
 root@Xubuntu-EU:/home/user# update-grub
 Generating grub configuration file ...
 Found linux image: /boot/vmlinuz-3.19.0-25-generic
 Found initrd image: /boot/initrd.img-3.19.0-25-generic
 Found linux image: /boot/vmlinuz-3.19.0-15-generic
 Found initrd image: /boot/initrd.img-3.19.0-15-generic
 Found memtest86+ image: /boot/memtest86+.elf
 Found memtest86+ image: /boot/memtest86+.bin
 Found Windows 7 (loader) on /dev/sda1
 done
 root@Xubuntu-EU:/home/user# grub-install
 Installing for i386-pc platform.
 grub-install: error: install device isn't specified.
 root@Xubuntu-EU:/home/user# grub-install /dev/sda
 Installing for i386-pc platform.
 grub-install: warning: Sector 32 is already in use by the program `FlexNet'; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.
 Installation finished. No error reported.
 root@Xubuntu-EU:/home/user#

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s