Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Windows 7 on a separate hard drive and I have Debian on another hard drive. After installing Windows 7 my grub doesn't appear so I used an Ubuntu Live CD to use boot-repair to fix my grub2 installation. Everything went well but after I restart it boots directly into Windows 7 and no grub shows up.

Like I said I have two hard drives one with Windows 7 (sda) and one with Debian (sdb). I installed grub2 on sdb following the boot-repair process but it doesn't work. Any ideas of what I should do.

Here is my boot info.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Go into BIOS setup and change boot order so that sdb drive comes first.

share|improve this answer
    
Thanks! that fixed it! –  Atirag Jan 3 '13 at 22:52
add comment

I'd make this a comment, but it would be too long. I'm not sure if it's going to be a solution, or simply a guess, but here goes...

I'm guessing that you have installed grub on sdb, but you are booting from sda. When you install grub, there are two things you need to do: 1. Install something in the master boot record (MBR) of the drive that is set to boot by your BIOS. This is sda on your system. This disk's MBR apparently has only the windows boot loader, not grub. 2. Tell this boot loader where to find the grub menu file, normally in /boot/grub/grub.cfg of the last Linux partition installed. Note that if the MBR code doesn't know where to look, it does not matter in the least what is in menu.lst, because it will never be seen.

The easiest way to fix the problem is to download and burn a live CD called Super Grub Disk. You can find a lot of discussion on askubuntu, but it's pretty self-explanatory, I think.

The other way is use the command line, and run grub-install, telling it where to put the MBR code; you would need to mount the disk to do this, and run it from a live CD. The command would be something like: sudo grub-install --root-directory=/location of root directory /dev/sda You would need to specify the correct location for the root directory of the distro for the grub.cfg file, unless it's run on the live system (I've never tried that, but it may be possible, though probably not recommended). If you want to go this route, I'm sure you can find step-by-step instructions.

Once the MBR is set up, you can run sudo update-grub to update the menu file.

You may also be able to use the BIOS setting to choose which OS to boot, by picking either disk 1 or disk 2. This should work, although I've found it to be problematic in the long run, because grub will eventually get installed on disk 1 by mistake.

share|improve this answer
1  
Thanks a lot for the detailed explanation. Changing the Bios option to boot on the other hard drive fixed it. I think all that you say was done by the boot-repair app when I run it since I had to run some similar commands but in the end the bios was only looking at the Windows boot portion. I read it's better to set grub on your linux partition to keep the installation clean that's why I intalled it on sdb. Thanks a lot! –  Atirag Jan 3 '13 at 22:55
    
I did it that way, but like I added, eventually after several installs of various systems, I found grub was on sda. I most likely wasn't paying close enough attention somewhere, but we're all only human, and we all make mistakes. If I did it over, I'd make the Windows disk sdb, so it would be less likely to be changed by over-zealous installers. :) –  Marty Fried Jan 3 '13 at 22:59
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.