Windows – Change Windows 7 Boot Configuration Data from Ubuntu

bootgrubUbuntuwindows 7

I have a Dell workstation that had Windows 7 installed on it. I added a second HD and installed Ubuntu to that using WUBI. This worked fine as a dual boot system for a long time but then the primary HD appears to have died enough that Windows refuses to boot now (it gets stuck in a Recovery cycle). I'm fine with Ubuntu as my primary OS, but the problem is that the Windows 7 Boot Configuration Data (BCD) has Windows as the default OS and a time-out of 3 seconds. The way it appears to boot is if I select Ubuntu from the Windows Boot Manager, it loads GRUB, which then loads Ubuntu. (I.e. if I hold down shift after selecting Ubuntu, I get the regular GRUB interface and can select the Ubuntu recovery mode).

I suspect the real solution here is to just blow away the whole machine and start fresh, but I'm hoping that there's some way I can just edit the windows BCD from within Ubuntu and have Ubuntu set as the default OS. Under XP, I know I could have just edited the boot.ini, but that seems to no longer be an option under 7.

What appears to be the configuration: sda0: Dell recovery partition and Ubuntu/WUBI install; sda2: default boot

Note that when I boot using the SuperGrub2, it tells me that it's booting Windows Vista. The Ubuntu install appears to be an NTFS disk with an Ubuntu Virtual disk on it.

Best Answer

You can. Since you can somehow boot into Ubuntu, do so, and then download and install Boot-Repair. You can find all information here. Basic configuration is enough to solve most (not all) problems. This will correctly configure GRUB to give you an option between Ubuntu and Windows, and Grub is smart enought to search all disks for bootable partitions, not just the one it is being called for.

Incidentally, this will most likely mean you cannot use Wubi any longer. And that might be a smarter move than you suspect, since Wubi creates a very large number of problems, and its development has been abandoned.

Related Question