SEARCH

How-To Geek

How To Restore the Wubi Ubuntu Bootloader

Has Ubuntu disappeared from your Windows Boot Manager list after installing it with Wubi?  Here’s how you can quickly restore it and use your Ubuntu as before.

Wubi makes it easy to install Ubuntu from your Windows computer and keeps you from messing up your Windows Boot Loader.  It simply adds an Ubuntu entry to your Windows boot loader, and you can manage it directly from Windows.

13wubi

However, several different things can mess up this boot screen.  If you ever install a different boot loader, restore your Windows Setup from a boot disk, or reinstall Windows, your Ubuntu link will disappear.  What’s worse, there’s no apparent way to add it back to Windows.  Even though the Ubuntu files are still on your hard drive, you won’t be able to restore them to the boot list from Windows Startup and Recovery tool or from the Wubi Installer.
image

But, with the EasyBCD tool and a little Command Prompt tweaking, you can get your Wubi Ubuntu restored and ready to use again.  Here’s how to do it in Windows 7 or Vista.

Add Wubi to the Windows Boot Loader with EasyBCD

If you don’t already have EasyBCD installed, download and install it as normal (link below).

sshot-2010-06-25-[10-38-45]

Once it’s installed, run EasyBCD, and select Add/Remove Entries from the toolbox on the left.

sshot-2010-06-25-[10-39-28]

Select the Linux tab in the Add an Entry section on the bottom.  Click the drop-down menu beside Type, and select Wubi from the available options.

image

You can name your Ubuntu entry whatever you’d like, and then click the Add Entry button.

image

You should now have two entries: Windows and Ubuntu.  Now, at the top of the EasyBCD window, click Save, and then exit the program.

sshot-2010-06-25-[10-40-04]
Edit the Boot Information in Command Prompt

If you try to reboot and launch Ubuntu right now, you’ll receive an error in the Boot loader because Windows doesn’t know where you Wubi Ubuntu is stored.  So, as soon as you have added the entry in EasyBCD, launch Command Prompt in administrative mode.  To do this, right-click its icon in the start menu and select Run as Administrator.

sshot-2010-06-25-[11-14-06]

In Command Prompt, enter the following to see the boot entries that are setup on your Windows boot loader:

bcdedit

SNAGHTML5382a9[4]

Now we can change the entry to let Windows know where our Ubuntu is saved.  Note that the Real-mode Boot Sector section contains the information we need to edit.  On our computer, we had installed Ubuntu on our E: partition, so we need first to add this to the entry.  If your Ubuntu is installed on your main C: drive, you can skip this step and proceed to the following.

To change the drive or partition, enter the following, substituting {device_id} for the identifier of your drive from the identifier listed under Real-Mode Boot Sector, and X: for your Drive letter designator.  Note that you can quickly insert the drive identifier by copying and pasting the information printed out already in Command Prompt.

bcdedit /set {device_id} partition=X:

image

Finally, we need to add the path to our Ubuntu install.  The path should be \ubuntu\winboot\wuildr.mbr, though this may be different, depending on your setup.  Browse to your Ubuntu folder to check if you’re not sure, and then enter the following in the Command Prompt, substituting \your_ubuntu_path for the correct path to the Ubuntu files in your computer:

bcedit /set {device_id} path \your_ubuntu_path\winboot\wubildr.mbr

sshot-2010-06-25-[11-39-12]

Close Command Prompt, and reboot your computer.  Now you will be able to boot into Ubuntu as before!

Conclusion

Wubi makes it easy to use Ubuntu on your Windows computer, and with this trick, you can keep it running even if something messes up your boot loader.  You can even use this trick to copy your Ubuntu install to another computer; copy the Ubuntu files, and then follow these steps to add the entry to the boot loader. 

If you don’t already have Ubuntu installed with Wubi and would like to try it out, here’s some articles to help you get started:

Link

Download EasyBCD

Matthew digs up tasty bytes about Windows, Virtualization, and the cloud, and serves them up for all to enjoy!

  • Published 06/30/10

Comments (23)

  1. Jaxsen

    PLEASE HELP
    I have done exactly ever thing you said, but when I get to open in the command prompt, when I right click it, there is know “Run as administrator” so I searched for CMD and ran that as adminastrator, but when I get to the “bcedit /set {device_id} path \your_ubuntu_path\winboot\wubildr.mbr” part, and I put “ubuntu” in for where it is (because thats where it is) I get this: ‘bcedit’ is not recognized as an internal or external command, operable program or batch file.

    Please help

  2. Matthew Guay

    @Jaxsen – Try entering bcdedit … looks like you left out that middle d.

  3. Rick Lehtinen

    Well, you may be happy about Wubi, and I want to be, but has caused me serious pain.

    I have a dual boot system, Vista on one drive, Windows7on the other. I entered Wubi, set a download for unused space onthe Win7 drive, and was really impressed. Ubuntu 10.4 ran well. But then an upload pop up cam by, and as I had a fresh install I went ahead and ran the updates. When it was done, I was asked to restart. My computer has not run since. The post sequence does not complete. The PCI listings stop at APCI, and then the machine says there is an error, and drops me into Grub Rescue. And there I stay. I made up an iso install disk, and can run Ubuntu Live. I can install in left over space on the Win7 disk. And the install seems to work. But when I restart, the same thing happens. Without the Live CD, I can’t start my machine. Something either in Wubi or in the updates (possibly Grub, because it wanted some check boxes) has toasted my Windows bootloader to the point the computer doesn’t boot on its own.
    I’ve searched the Internet, and found lots of people say this happens, but few say what to do about it. Some say Wubi is intrusive, and installs inside Win7, and that Grub overwrites part of the MBR that is needed by APCI.
    Really bummed to see this happen. I need the machine. Are there any ideas on how to fix this?

  4. Matthew Guay

    @Rick Lehtinen – Yes, sounds like you got an update to the Ubuntu Wubi bootloader, which made it only show Ubuntu as a boot option. To fix it, boot up with your Windows 7 DVD, and select to repair your Windows installation. I’ll try to make an article explaining the process this week, but hopefully you’ll get it up and running before that. Feel free to leave another comment if you need more help!

  5. Sahan

    I had to install Windows 7 again after a viral attack and I was wondering how to recover wubi bootloader of ubuntu. Your post really helped me to sort things out. Thanks a lot!

  6. Keith Alick

    My friend installed Ubuntu 10.10 on her computer. I have done this with my computers several times. This time I’m trying to reinstall it on her computer because it will no longer boot. Now, when i try to reinstall I get a prompt that says “boot loader” and the prompt says live. The only option I have is to press OK. I don’t know what this is. This is the first time I have ever seen this. Ive been working on this for 3 days now trying to figure it out, searching older forums. I have gotten no where. I need help.

  7. Anna

    Hey,

    Please Help!

    I did all the steps mentioned above and I got the Ubuntu entry in the boot menu. But when i select the Ubuntu option I am getting an error saying that the wubildr.mbr file is corrupt. Is there anything i can do to repair that file or is there someway for me to recover my Ubuntu data?.

    Thanks

  8. Miss. Andrea Borman.

    I had Linux Mint installed alongside my windows 7 on my laptop a netbook. BUT when I unistalled Linux Mint,when I started my laptop,it still has 2 enteries. Windows 7 and Linux Mint which was no longer there and so of course would not boot into Linux Mint I got an error message. But Windows was still there and I could boot into it but I did not want Linux Mint listed on the boot entery as it was no longer on my computer. Command prompt did not resolve my problem and also because I was silly enough to delete the Linux Mint file on C drive I could not even uninstall Linux Mint in uninstall programs menu. Hense Linux Mint was still on my bootloader. But this tool got rid of that for me and also deleted the blank Linux Mint partition as well. It even lets you re name your current Windows operating system to one of your choice. for example my PC or my computer,which is fun. But i have just re named my windows 7 WINDOWS which if I did upgrade later to any advanced Windows editions. If I install Linux again I will know which program is which. And now when i start my computer I still get the windows bootloader screen but now it just says Windows. But i would not use the tool for anything more than edit your OS name or removing old Linux enteries or it could accendently delete Windows or some thing important. Then the computer would not work as being a Netbook it has no CD drive to back up Windows. Andrea Borman.

  9. Júlio Souza

    Thank you! It helped me a lot!

  10. rhiter

    Thank you! That’s what i needed! :D
    After reinstalling win7 wubi mbr were overwritten by it. Then i didn’t have any idea how to fix non-grub loader for ubuntu. But with your very practical topic i’ve repaired this issue just within seconds!

  11. Mycha

    I really need help.

    I spent 5 hours installing ubuntu via wubi then I followed your instructions and I have 2 entries but when I select Ubuntu it takes me to black screen and it will write this:

    Try (hd0,0) : NTFS5: No wubildr
    Try (hd0,1) : NTFS5: No wubildr
    Try (hd0,2) : Extended:
    Try (hd0,3) : invalid or null
    Try (hd0,4) : EXT2: _

    And I cant write anything.

    I am looking forward to your reply.

    Mycha.

  12. Mycha

    Oh sorry I installed it via Unetbootin, but I really need help.

  13. Hojjatollah Maddahi

    Salam
    this article is very good but have several problem:
    1-bcdedit /set {device_id} device partition=X: is correct
    2- you must have copy wubildr.mbr and wubildr to C: drive

  14. Hojjatollah Maddahi

    3- bcdedit /set {device_id} path \your_ubuntu_path\winboot\wubildr.mbr is correct

  15. AKI

    Hi,

    does it works with XP.
    I have Windows XP, and Wubi. I Formated my Windows, and i forgot to backup my Files were on Wubi.
    Any ideas?

    Thanks

  16. JAZZ

    It says this only!! What can I do now to fix it?

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\jassiel>bcdedit

    Windows Boot Manager
    ——————–
    identifier {bootmgr}
    device partition=\Device\HarddiskVolume1
    description Windows Boot Manager
    locale en-US
    inherit {globalsettings}
    default {current}
    resumeobject {2e737456-75c7-11df-b688-d6e7dafeb830}
    displayorder {current}
    {2e73745d-75c7-11df-b688-d6e7dafeb830}
    toolsdisplayorder {memdiag}
    timeout 10

    Windows Boot Loader
    ——————-
    identifier {current}
    device partition=C:
    path \Windows\system32\winload.exe
    description Windows 7
    locale en-US
    inherit {bootloadersettings}
    recoverysequence {2e737458-75c7-11df-b688-d6e7dafeb830}
    recoveryenabled Yes
    osdevice partition=C:
    systemroot \Windows
    resumeobject {2e737456-75c7-11df-b688-d6e7dafeb830}
    nx OptIn

    Real-mode Boot Sector
    ———————
    identifier {2e73745d-75c7-11df-b688-d6e7dafeb830}
    device partition=\Device\HarddiskVolume1
    path \NST\NeoGrub.mbr
    description UBUNTU

    C:\Users\jassiel>bcdedit /set {2e73745d-75c7-11df-b688-d6e7dafeb830} partition=C
    :
    The element data type specified is not recognized, or does not apply to the
    specified entry.
    Run “bcdedit /?” for command line assistance.
    Element not found.

    C:\Users\jassiel>

  17. Rpk

    @JAZZ Try this
    bcdedit /set {2e73745d-75c7-11df-b688-d6e7dafeb830} device partition=C:

  18. vinod

    Its really helpfully …
    thank you..

  19. orelsoriz

    You can tell us: This program easybcd is for windows 7 not for xp.
    Whatta geeks. )))

  20. toad

    We use Vista Boot Pro 3.2 instead.
    It runs on Win-7 just fine.
    Much simpler than BCD edit.

  21. pj

    Great post! Worked like charm.

  22. vikas

    @anna and my problem r same….plz ans us..
    Hey,

    Please Help!

    I did all the steps mentioned above and I got the Ubuntu entry in the boot menu. But when i select the Ubuntu option I am getting an error saying that the wubildr.mbr file is corrupt. Is there anything i can do to repair that file or is there someway for me to recover my Ubuntu data?.

    Thanks

  23. vikas

    by d way my os is linux mint and win7.

Enter Your Email Here to Get Access for Free:

Go check your email!