Using EasyBCD to "repair" an existing Wubi install...

#1
I have a 3 partition system disk (XP-install-1, 'temp' data, XP-install-2) and a separate primary user data disk. I have installed Wubi, but with the Windows folders containing the Ubuntu virtual disks on the Data disk.

The current XP boot.ini shows a boot entry pointing to "c:\wubildr.mbr="Ubuntu", and there are two wubildr.* files in the root of C: (no wubi* folders...). I assume that the "wubildr.mbr" points the Wubi boot over the the appropriate Ubuntu boot partition in the virtual Ubuntu disks over on the other (data) disk.

Now, I plan to (clean) install Windows7 into the first XP partition, blowing the original XP system (and it's associated system data - e.g. boot.ini, etc.) away. I'm assuming that as it's a clean install, all data will be lost, and Windows7 will not recreate the equivalent of the boot.ini Wubi entry in the new BCD. I've run up EasyBCD (latest - v1.7.2) on a test Windows7 machine, and saw that it allows you to add a Wubi entry - but this automatically points to (a specific NeoSmart?) *ldr.mbr file in a specific directory, and not the "wubildr.mbr" in the root of C:.

As my Wubi installation is in essence entirely on the Data Drive (apart from the boot files/pointers currently in the root of the 1st XP installation), it won't be affected when I blat the first partition on the system disk, and to get Wubi back, I (believe that I) just need to get the Wubi boot files back in place on C:, and set a correct entry in BCD. I can copy the files back from an Acronis backup that I have (and will do another backup just before installing Win7), but I cannot see a way to manually edit the actual path and file name in the Wubi entry added to the BCD by EasyBCD, to match those that I have in the original "boot.ini" - is that possible? Have I missed a "manually edit" option in EasyBCD?

Thanks,
 
#3
Ok, if your C: partition is "system" (according to Disk Management), and contains your boot.ini (and all the rest of your boot files), and C: is the "first XP partition" you're referring to, then yes, installing Windows 7 in that partition will indeed destroy your wubi boot. To workaround this problem, right before the Win 7 install, move the boot.ini containing the Wubi entry somewhere safe (i.e. a new partition). Once Win 7 is installed, use [thread=642]EasyBCD 2.0 Beta[/thread] to add an XP entry to the BCD, letting it auto-configure. Once this has been done, simply move the old boot.ini back, replacing the EasyBCD-configured one, and you should have your Wubi boot back. For some reason, the Win 7 bootloader (bootmgr and BCD) seems to have the capability of auto-detecting additional non-standard entries in the boot.ini and adding them automatically to the boot menu (don't know exactly how this is done, but that's what happened when i manually used bootpart a while ago, to add a ubuntu entry to the menu, and it added an entry to the boot.ini, pointing to the file it created, which is similar to what wubi has done to your boot.ini).

If you look in the root of your C: partition right now, with hidden files and folders shown and protected system files unhidden in the Folder Options of the Control Panel, its likely you'll see a file named "wubildr.mbr". So, make sure to move that file over too, to same place as boot.ini, before the Win 7 install, and then move it back after the install.
 
#4
@kairozamorro - unfortunately, that only (seems to?) edit the old "boot.ini" file - and I am not sure how that's s used once BCD is being used...??

@kairozamorro - as mentioned above, I'm not sure how the boot.ini is used...?? Are you saying that EasyBCD creates a boot.ini? If so, where does it put it? I've been testing EasyBCD on a beta Win7 machine, and haven't noticed a boot.ini being present...?

From testing on my Win7 (beta) machine, adding a Wubi entry to the BCD using EastBCD means BCD looks like this:

================
There are a total of 2 entries listed in the bootloader.

Default: Windows 7
Timeout: 30 seconds.
Boot Drive: C:\

Entry #1
Name: Windows 7
BCD ID: {current}
Drive: C:\
Bootloader Path: \Windows\system32\winload.exe

Entry #2
Name: Ubuntu Linux
BCD ID: {ec3385d4-f7ec-11dd-a63b-86ac84efd28f}
Drive: C:\
Bootloader Path: \NST\AutoNeoGrub0.mbr
================

The old boot.ini had an entry (for Wubi, in addition to the references to the other Windows instances) of:

================
"c:\wubildr.mbr="Ubuntu"
================

My first thought (and the original question) was how do I edit the above (BCD) to become what I assume would work, e.g.:

================
There are a total of 2 entries listed in the bootloader.

Default: Windows 7
Timeout: 30 seconds.
Boot Drive: C:\

Entry #1
Name: Windows 7
BCD ID: {current}
Drive: C:\
Bootloader Path: \Windows\system32\winload.exe

Entry #2
Name: Ubuntu Linux
BCD ID: {ec3385d4-f7ec-11dd-a63b-86ac84efd28f}
Drive: C:\
Bootloader Path: \wubildr.mbr
================

Would that work - and how do I 'manually edit' the BCD data? (blue text to red text)

Or, another thought - can I leave the EasyBCD created BCD file as is, and just copy the "wubildr.mbr" file (originally in the root of C:smile:, into C:\NST\ and then rename it "AutoNeoGrub0.mbr" - which should then cause BCD's 2nd entry to 'run' the "wubildr.mbr" file booting Ubuntu from the 2nd (data) disk?

Or, does "AutoNeoGrub0.mbr" do something else, and needs to be retained??

Thanks....
 
#5
You seem to have ignored my post...
Like already mentioned, all you have to do is move your boot.ini and wubildr.mbr files into some other partition before the Win 7 install. Then, as soon as you install W7, run [thread=642]EasyBCD 2.0 beta[/thread], go to Add/Remove Entries, select the ".../NT/XP" option in the Type menu, give the entry a name, click Add Entry, and accept the offer to auto-config. Then don't change where the XP entry points. The auto-configure feature will automatically put XP's boot files in the root of the "system" partition (which i believe is C:/ in your case), including boot.ini. Forget adding a Wubi entry in EasybCD, I don't think its necessary.
Now, just copy the two files already mentioned back into the root of C, replacing the boot.ini that was auto-configured by EasyBCD. Now, when you boot, you should see three entries in your first boot menu:

Windows XP
Windows 7
Ubuntu

and selecting Windows XP will bring you to a second menu with two entries, one for the first XP, the second for the second XP. Selecting Ubuntu should load your Wubi install.

The other possibility is seeing just these entries in your first boot menu:

Windows XP
Windows 7

Selecting Windows XP would then bring you to another menu, with three entries, two for the two XPs, and the other one named "Ubuntu" for Wubi.
 
#6
Sorry, my bad - I did read your post, but I think that I missed the fact that you specified that the entry added by EasyBCD would need to be a new XP partition; and not realising that, then I also missed the fact that by doing that, EasyBCD will create a boot.ini - which can then be replaced by my old one.

So, note to self to stop speed reading.

Thanks for the information - it is appreciated.

P.
 

JustinW

Super Moderator
Staff member
#7
You said something about using boot.ini to boot wubi (or at least that's what I was thinking) but never mind :smile:

If you want to boot wubi via BCD i've never done it so don't know if EasyBCD can help you create an entry. Really, if you were to install Wubi and replace the disk file the installer should add the entry and you'll end up with your previous system well you not?...