I have Windows 7 Ultimate installed, then installed most recent version of Debian on an unallocated 100GB partition on the primary drive (on a PC, not on a notebook). That all works without a problem. The problem is that I can not figure out how to change the boot menu to boot with either operating system. I downloaded ezBCD.exe and edited the boot menu to add the Debian os, but when I select it after rebooting I get the error that Windows cannot boot because the files are corrupt (there's lots of other info too that I have forgotten).

When I installed Debian I told it to install grub in the primary boot sector, where I think that is where MS-Windows boot loader is installed.

The only way I can boot into Debian is to use the boot menu of the motherboard bios setup.

Any suggestions how to make the duel-boot menu work?

Thanks

Dani AI

Generated

Short, practical checklist to fix the dual-boot so you can pick Windows or Debian from the normal boot menu (addresses points raised by , and others).

First, diagnose from Debian (you can boot Debian now via the motherboard menu). The usual, robust solution is to make GRUB the primary bootloader in the disk MBR and then regenerate GRUB’s config so it detects Windows. From a root shell in Debian reinstall GRUB to the whole disk (not the partition) and rebuild its config, for example:

sudo grub-install /dev/sda
sudo grub-mkconfig -o /boot/grub/grub.cfg

Use /dev/sda only if that is the disk with Windows and Debian. After that GRUB should present both Debian and Windows; if Windows still does not appear, ensure the package that probes other OSes is installed (Debian may need os-prober) and rerun the config step.

If you prefer to keep the Windows boot manager first (as and touched on), that can be done by creating a Windows-side entry that chainloads GRUB. EasyBCD sometimes works but can be fragile — if EasyBCD entries fail with Windows boot errors, restore the Windows bootloader first (use a Windows 7 repair disk) and then either add a correct Linux entry or reinstall GRUB cleanly.

Cautions: back up important data and have a Windows recovery DVD/USB ready before changing the MBR. If anything goes wrong you can repair Windows with its recovery tools and then restore GRUB from a Debian live USB. ’s comment about GRUB2 being fiddly is accurate; the above sequence (install to MBR, ensure os-prober is present, regenerate GRUB config) is the most reliable, repeatable fix.

Recommended Answers

All 9 Replies

Member Avatar for Member #1042208

I think windows boot loader is replaced by GNU's boot loader.

This might be of some help. Although it was for Ubuntu, but I hope it will also work for Debian.

Debian uses grub2, which is a real pita to reconfigure, though it is possible. Do you get the grub splash screen when it is booting? If so, then what happens when you hit the spacebar before Windows (or whatever) boots up? Usually you have only a couple of seconds to do that (it should show the boot menu with the installed systems displayed), though that can be reconfigured as well.

I didn't get the grub screen until I used ezBCD.exe to add Debian to the menu. I never saw the screen that Debian installed. Windows is the default boot item in the menu, so I used arrow key to change to Debian and hit Enter key. It is at that point I get a bunch of error messages saying that Windows can't start.

I just installed Debian 7.0 in a virtual machine, and dealing with grub2 is just such a PITA! The original grub (which fortunately RHEL still uses) was SO much simpler to deal with. I'm still trying to figure out how to deal with grub2. I did some such successfully a year or two ago when I was running Ubuntu on my laptop, but I dropped that in favor of Scientific Linux when Ubuntu stopped supporting my wireless cruft out-of-the-box. Yes, with SL/RHEL I still have to manually install the drivers and such, but it works, and I don't have to futz with grub2... :-(

I see from google that Ubuntu has used grub2 since version 9 so Ubuntu will have the same problem.

First install windows 7 on first partition or /dev/sda1
then istall your Debian Linux
grub will auto detect your windows

In bcdedit go on deployment and there is an option to reinstall the MBR. after that the windows bootloader will come first giving you the option to choose either windows or Linux.

By choosing linux you get grub which gives you an option to choose windows or linux which is a pain in the ass :P So just go to Linux and in the terminal navigate to:
/boot/grub
and edit
grub conf to have a timeout of 0

Did you find solution?
If you can get to Linux anyhow you can use command
sudo update-grub

grub will auto detect your windows

I tried that -- grub didn't detect any operating system on the computer.

Did you find solution?

Nope -- I gave up. Your suggestion didn't fix the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.