Linux – How to install GRUB to a partiton and not MBR

grublinuxlinux-mintmulti-bootwindows 7

I am trying to dual boot Windows and Linux. I would like to continue using the Windows bootloader in my MBR.

I installed Windows 7 first. During the install I left some unallocated space that I intended to install Linux.

I found this guide:
http://neosmart.net/wiki/display/EBCD/Linux

It says to install GRUB to the bootsector of the partition that Linux is being installed to and not the MBR of your hard drive.

I am trying to install Linux Mint Debian to the second partition. When the installer gets to where you are asked to install GRUB the only option is to install GRUB to /dev/sda which I believe is the MBR.

I decided just not to install GRUB and proceeded with the installation.

How can I install GRUB to the bootsector of my Linux partition?

Best Answer

Typically if you want to install GRUB or lilo or any of the bootloaders to the partition rather than the MBR you simply substitute the actual partition in place of the drive identifier.

e.g where you would use

grub-install /dev/sda

to install it to the drive (bootsector/MBR), you instead use

grub-install /dev/sda3

to install it to the bootsector of the third partition of that drive.

To then set up the Windows bootloader to be able to boot Linux How to dual-boot Vista with Linux (Vista installed first) looks like it will show you how to set up the bootloader properly. It is for Vista but the bootloader is the same for Windows 7 and should Just Work.