Results 1 to 10 of 1202

Thread: Wubi megathread

Threaded View

  1. #1
    Join Date
    Mar 2010
    Ubuntu 10.04 Lucid Lynx

    Wubi megathread

    (or, how to fix those Wubi installation breakages without going crazy)

    January 14, 2011
    Are you experiencing black screen issues or other graphics related problems?
    See posts # 1 and 8 here for Wubi and non-Wubi installs:

    January 10, 2012

    Another recurring problem, missing the root.disk on a Wubi install, is dealt with here by forum member bcbc:

    May 3, 2011
    EDIT: Please do NOT post in this thread if you are not using Wubi.
    If you have Ubuntu installed inside Windows you are using Wubi. Solutions mentioned here are Wubi specific. Fixes for a normal install could potentially break Wubi and we do not wish to confuse users, especially those new to the forums. If you are unsure whether you are using Wubi or not, open a new thread in the Installation & Upgrades forum.
    We would also like to request that you start your own thread if you are using Wubi but have an issue not related directly to the fixes posted here (for example, networking problems etc.). We will see it and try and help as best we can.

    May 3, 2011
    New information: With the release of 11.04, it appears that the major issues affecting Wubi installs are over. However, please refer to this thread if you run into problems and post with relevant information such as the boot info script (mentioned below).

    I would like to preface this thread with the following comments:

    First and foremost, my utmost thanks and gratitude to forum moderator drs305 and long-standing member bcbc for their support, suggestions, feedback, and tireless efforts on behalf of Wubi, as well as regular Ubuntu, users on these forums.

    This guide is based entirely on their troubleshooting and problem solving endeavors.

    I am by no means a Wubi expert. Everything I know comes from watching drs305 and bcbc hard at work.

    Second, please read ALL the information before posting. If you have tried one of the solutions and it did not work or you are unable to proceed because you did not understand something, feel free to post.

    In the interest of keeping this thread "clean," I ask that you follow this simple procedure before cluttering up the thread. It will also make life easier for those responding who want to help solve problems.

    Third, kudos to the developers of Wubi.

    Finally, I ask forum members who are not Wubi users to please read this information carefully before offering advice in a post.

    Unfortunately, there have been instances where even experienced members have advised a thread starter to reinstall Wubi, GRUB, or suggested numerous other "fixes" which are either unnecessary or even counter-productive.


    Wubi, which stands for Windows-based Ubuntu Installer, is a convenient and easy way to try another operating system without the hassle of partitioning or other issues that sometimes occur when attempting to run more than one operating system.

    Wubi uses a virtual disk mounted within the host system (Windows), allowing users to access the full functionality of Ubuntu after the computer starts and the operating system has been chosen from the available menu.
    Wubi Guide

    However, Wubi was never intended as anything other than a means to try a Linux operating system and, as such, it is usually recommended to install Ubuntu to a dedicated partition on the hard-drive.
    Agostino Russo (Wubi developer)

    Things You May Need for Troubleshooting:

    1. an Ubuntu LiveCD or LiveUSB
    (the download link and instructions on how to create a CD or USB can be found here)

    2. a Windows installation/recovery disk

    3. results of the boot info script

    A Word of Caution:

    Do NOT try and reinstall GRUB or use boot managers such as BURG. Wubi installs cannot be booted directly from the MBR of the drive.

    The Core Issue:

    There have been updates for the GRUB bootloader which have been causing problems with Wubi installs. These updates have been known to cause problems on Ubuntu versions from 9.10 onwards including upgrades to the latest 10.10 version.

    I am not going to go into extended detail about the specifics of the problem since I assume most users just want the fix.

    However, for those who wish to know more, the following bug reports make for interesting reading:

    (I do not know if this also affects older Wubi installs, but I am assuming that most users will have one of the more recent versions)

    The issues can be broken down into two main areas, each with its own fix or solutions.

    Problem #1:

    You have Wubi installed and are unable to boot either Ubuntu or Windows.

    Possible Cause:

    A late July 2010 GRUB2 update is causing a "no such disk" error (in some cases it may have a "no such device" error followed by a long string of numbers) for some users of Wubi, resulting in an unbootable system.

    If the system does not display the original Windows menu, the most likely cause of the failure is that GRUB2 was installed in the MBR and/or on the Windows partition.

    Solution #1:

    Restore the Windows bootloader with the relevant Windows Recovery CD.

    Solution #2:

    If you do not have a Windows CD, or are unable to get hold of one, you can use an Ubuntu CD/USB to install a Windows-like bootloader.

    From a terminal on the LiveCD/USB (Applications > Accessories > Terminal), run the following commands:

    sudo apt-get install lilo
    sudo lilo -M /dev/sda mbr
    This assumes that sda is the Windows drive. If not, change this to reflect the actual drive e.g. sdb, sdc, etc.

    Ignore any warnings and continue with the installation to the MBR. The main point is to get lilo installed and allow the user to boot Windows, and hopefully Ubuntu, again.

    Problem #2:

    You have Wubi installed and are able to boot Windows normally.

    However, attempting to boot Ubuntu leads to a number of possible failures including, but not limited to, the following:

    computer reboots without user interaction, a black screen with or without any error messages, loadfont errors, file not found errors, and the like.

    These issues affect the following versions: 10.04, 10.04.1, and 10.10

    The solutions for each version are somewhat different and will be noted next to the relevant solution.

    Possible Cause:

    Recent upgrades to GRUB and the lupin package (used for Wubi) have caused the wubildr file to become out of sync with the latest version of GRUB. This appears to be a problem whether Wubi is installed on the Windows partition or a separate partition.

    As a result, wubildr is unable to handle the commands in the grub.cfg menu and the computer reboots.

    Solution #1 (10.04):

    If it is a 10.04 install, the fix is to boot an Ubuntu LiveCD/USB, loop mount the wubi root.disk and manually edit the grub.cfg file.


    You need to correctly identify your Windows partition. The examples here are meant to be just that, examples.

    If you do not know or are unsure which is the correct partition, run the boot info script and either post it here or use the information for your own purposes.

    As an example, a Windows partition with a Wubi install would look like this in the RESULTS.txt:

    sda3: _________________________________________________________________________
        File system:       ntfs
        Boot sector type:  Windows Vista/7
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows 7
        Boot files/dirs:   /Windows/System32/winload.exe /wubildr.mbr 
                           /ubuntu/winboot/wubildr.mbr /wubildr 
                           /ubuntu/winboot/wubildr /ubuntu/disks/root.disk 
    Note that sda3 is the partition which contains your Windows installation as well as the files needed by Wubi.

    Boot a LiveCD/USB, identify your Windows partition that contains the root.disk (make sure you mount the correct partition; this example assumes /dev/sda1), and edit grub.cfg as follows:

    sudo mkdir /media/win 
    sudo mount /dev/sda1 /media/win
    sudo mount -o loop /media/win/ubuntu/disks/root.disk /mnt
    sudo cp /mnt/boot/grub/grub.cfg /mnt/boot/grub/grub.cfg.copy
    sudo chmod +w /mnt/boot/grub/grub.cfg
    gksu gedit /mnt/boot/grub/grub.cfg
    Remove all lines in the file from the start of the file up to, but not including, the following menuentry
     ### BEGIN /etc/grub.d/10_lupin ###
    Save, reboot.

    Solution #2 (10.04 upgraded to 10.10):

    If it is a 10.04 to 10.10 upgrade, boot into Windows make a backup of the wubildr file and then copy the c:\ubuntu\winboot\wubildr file over the c:\wubildr file.

    Alternatively, you can do this from the LiveCD/USB using the instructions given to mount the Windows partition.

    Run the following commands:
    sudo mkdir /media/win 
    sudo mount /dev/sda1 /media/win
    sudo mount -o loop /media/win/ubuntu/disks/root.disk /mnt
    sudo cp -p /media/win/wubildr /media/win/
    sudo cp -p /media/win/ubuntu/winboot/wubildr /media/win
    This example again assumes sda1, but change to reflect your actual Windows partition e.g. sda2, sda3 etc.

    Solution #3 (10.04.1 upgraded to 10.10):

    This may leave the user with a GRUB prompt and/or the other symptoms previously mentioned.

    There are 2 possible approaches here.

    Either boot the LiveCD/USB and edit the grub.cfg file as before (Solution #1).

    Alternatively, use the instructions provided by drs305 to boot into Ubuntu from the GRUB prompt:

    The advantage of being able to boot from the GRUB prompt is that the user does not need to use a LiveCD/USB.

    If booting from the GRUB prompt works and you are able to boot into Ubuntu, follow the instructions in Solution #1 to edit the grub.cfg file.

    In this case, enter the following command in the terminal:
    gksu gedit /boot/grub/grub.cfg
    Again, as above, remove the entries from the start of the file up to, but not including, the following menuentry
     ### BEGIN /etc/grub.d/10_lupin ###
    Permanent Fix (as of the time of writing):

    Thanks to bcbc, there is a more or less permanent fix for these problems.

    These steps are applied after you have restored the Wubi install and are able to boot normally into both Windows and Ubuntu.

    From the terminal:

    sudo mv /boot/grub /boot/grubold
    sudo mkdir /boot/grub
    sudo cp /boot/grubold/grubenv /boot/grub
    sudo update-grub


    Not done yet - prevent GRUB updates from breaking the Wubi install again:

    Go to System > Administration > Synaptic Package Manager and select the grub-pc and grub-common packages. Click on Package > Lock Version.

    I cannot stress this enough; if you want to prevent this happening either on a freshly installed system or a fixed system, please lock the grub packages.

    This fix has been tested and confirmed on a 10.04.1 install, an install upgraded from 10.04.1 to 10.10, as well as a new 10.10 install (with grub-pc reinstalled to intentionally break it).

    Additional Information:

    If you find that one of the solutions does not work for your version, try another. For example, if copying the wubildr file does not get the job done, use the fix to edit the grub.cfg file.

    If all of the above seems overwhelming, you can recover your data from the Wubi install from within Windows. In this case, you can use ext2read to recover any important data from the Ubuntu root.disk.

    If using the Ubuntu LiveCD/USB, you can also access and copy your user files. The Ubuntu folders are located in /mnt if you mounted Wubi as instructed earlier in the guide. Your HOME folder contents are found at /mnt/home/<your_user_name>/

    Do not run the sudo update-grub command BEFORE rebooting after following the solutions above.

    In most cases, locking the GRUB version in Synaptic and/or not upgrading will help prevent problems arising in the first place.

    If you are uncertain as to the designation for your Windows partition, either post the results of the boot info script or use the information yourself.

    Here is another example from the RESULTS.txt:

    sda2: _________________________________________________________________________
         File system:       ntfs
        Boot sector type:  Windows Vista/7
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows 7
        Boot files/dirs:   /bootmgr /Boot/BCD /Windows/System32/winload.exe 
                           /wubildr.mbr /ubuntu/winboot/wubildr.mbr /wubildr 
                           /ubuntu/winboot/wubildr /ubuntu/disks/root.disk 
    In this case, you would mount sda2 in the commands given above.

    Please be careful and make sure you mount the correct partition.

    If in doubt, ask here first.

    Finally, if you would like to migrate your Wubi install to a dedicated partition, bcbc has created a fantastic guide on how to do this:
    Last edited by Rubi1200; January 14th, 2012 at 09:08 AM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts