Change Windows 7 Boot Configuration Data from Ubuntu?

7,903

Solution 1

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.

Solution 2

After trying the other suggestion of Boot-Repair and GRUB editing, I ended up replacing the failing drive and installing a fresh, native (i.e. non-WUBI) Ubuntu. For the rare occasions that I need to do something in Windows, I fire up a VirtualBox Windows 7 installation.

Share:
7,903

Related videos on Youtube

Aphoid
Author by

Aphoid

Updated on September 18, 2022

Comments

  • Aphoid
    Aphoid over 1 year

    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.

  • kreemoweet
    kreemoweet over 10 years
    There is no indication at the given link to Boot-Repair that it has the capability to edit the BCD. There is an option to "repair Windows boot files", whatever that may mean.
  • MariusMatutiae
    MariusMatutiae over 10 years
    This is what Boot Repair is for. It fixes corrupt configurations, which is the case here: not all cases of misconfigurations are due to software errors, while Boot-Repairs can fix most of them.
  • Ashildr
    Ashildr over 10 years
    why not use grub-install ? It's easy , I think.
  • MariusMatutiae
    MariusMatutiae over 10 years
    It would be the right thing to do if there were Ubuntu only, on the machine. Since there is Windows too, I am afraid that Grub and BCD will somehow clash. Using Boot-Repair fixes the possibility of a conflict between the two.
  • Aphoid
    Aphoid over 10 years
    Got to Boot-Repair, but something messed up and now I'm getting the "BOOTMGR is missing" error when I try to boot. The partition is still there, as an old copy of UBCD lets me use an old copy of SuperGRUB2 boot to a read-only version of my computer. I'm downloading the Secure Linux disk to see if I can use that to fix things.
  • Aphoid
    Aphoid over 10 years
    Boot repair was unable to fix this for me. I ended up installing a new copy of Ubuntu on a brand new HD and installed a Windows VM in VirtualBox for the rare occasions when I need Windows software. I copied my old configuration over by mounting the old WUBI root.disk temporarily. This should be a better setup for me regardless as the new HD is larger than my root.disk and it's native ext4 instead of NTFS mounted. Thanks for the help.