Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Windows Vista and Linux Mint 12 KDE installed on my PC, each installed on it's own hard drive.

I recently wanted to try out Windows 8 Consumer Preview and see how it ran on my PC so I created a partition on my Windows hard drive for Win 8. After installing Win 8, GRUB no longer appeared when I turned on my computer, but a Windows 8 bootloader that let me choose between Windows Vista or Windows 8.

Well after testing out Windows 8 a bit, and trying to get it to detect my wireless adapter (outdated drivers), I wanted to use Linux so in Vista I wiped the partition that had Win 8 installed and reallocated the memory for Vista.

When I started my computer it still tried to use the Windows 8 bootloader and had all sorts of errors, and would automatically restart the computer over and over again. I almost had a heart attack that my computer was unusable, but after booting from the Win 8 CD I was able to boot into Vista, and in System Configuration removed the 'Windows 8' boot option which set 'Windows Vista' as default.

Great, now my computer boots, but where is GRUB? How can do I use GRUB again to access my Linux distro on my other hard drive?

share|improve this question
add comment

2 Answers

You can use a linux rescue disk to put grub back on the disk's MBR. Then you should see your linux installation again.

You may also want to add your Linux installation to the Windows boot-loader, so that if Windows ever over-writes the MBR again, you'll still be able to boot linux. read http://blogs.technet.com/b/port25/archive/2006/10/13/http-port25-technet-com-archive-2006-10-12-windows-and-linux-integration-3a00-a-conversation-with-the-author-aspx.aspx for more info.

share|improve this answer
add comment

Initially when you had only Linux and Windows Vista, MBR was containing the GRUB. As soon as you installed the Windows 8, the Windows 8 Boot Loader overwrite the GRUB in the MBR. Since Windows 8 Boot Loader can only recognize the Windows partitions so it allows you to boot only Windows Vista and Windows 8. Now to get back the Linux and to be able to boot both Linux and Windows Vista, you need to do two things:

  1. Install GRUB using rescue disk.
  2. Manually enter the entry for the Windows Vista partition.

1st step comprises of:

a. Boot from rescue disk(Bootable Pendrive or CDROM with Linux).
b. Install the GRUB using grub-install command.

$ sudo grub-install /dev/XXX

where XXX is the device of your Linux install.

You can use the following command to know the device with Linux install.

$ sudo fdisk -l

This will show the partition with Linux installed.

2nd step depends on the kind of grub you are going to install. If your rescue disk contains latest Linux distribution then it must be installing GRUB 2. For GRUB 2 you have to carry out following steps:

a. Open grub configuration file using command.

vi /boot/grub/grub.cfg

Manually put the menu entry for Windows after Linux menu entry:

menuentry "Windows Vista (loader) (on /dev/XXX)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdosX)'
search --no-floppy --fs-uuid --set device-UUID
chainloader +1
}

You can find device(/dev/XXX) containing the Windows Vista using fdisk -l command.

If the device is suppose /dev/sda1 then put the entry as:

set root='(hd0,msdos1)'

In place of device-UUID in the entry, you have to find out the device UUID for /dev/sda1 by using the following command:

$ sudo blkid

Put the UUID value out of the result of the above command for the Windows Vista partition.

Save the file and boot again now you will find the Windows entry coming in the GRUB while booting.

share|improve this answer
add comment

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.