Contents

  1. Introduction
    1. What is Wubi?
    2. What about Windows 8?
    3. How to use this guide
    4. Warning
  2. Installation
    1. How do I download Wubi?
    2. How do I install Ubuntu?
    3. How do I select whether to run Windows or Ubuntu?
    4. How do I install Wubi on a machine with no Internet connection?
    5. Where do I find older versions of Wubi?
    6. How can I use a manually downloaded ISO?
    7. Why is the AMD64 version of Ubuntu being downloaded and installed?
    8. Can I force Wubi to download and install a 32 bit version of Ubuntu?
    9. Can I force Wubi to install if I have less than 256MB of memory?
    10. Can I force Wubi to install even if I have less than 5GB of free disk space?
    11. Can I force Wubi to skip the md5 checks?
    12. Which Operating Systems are supported?
    13. What happens if the installation is interrupted?
  3. Upgrading
  4. Uninstallation
    1. How do I uninstall Wubi?
    2. How do I manually uninstall Wubi?
    3. How do I reinstall Wubi?
    4. How can I make a backup of my Wubi install?
  5. Unsupported set-ups
    1. Software raid arrays
    2. Encrypted disks
    3. Windows ME
    4. Proxy server
    5. DVD and Alternate ISO
  6. Troubleshooting
    1. Cannot access the CD
    2. Windows Missing hal.dll
    3. Cannot boot into Ubuntu
    4. Other boot or video problems
    5. Installation error while formatting the swap file
    6. Cannot uninstall Ubuntu
    7. Cannot download the ISO file
    8. Video Problems after second reboot
    9. Corrupted NTFS filesystem
  7. Wubi Support Forum
  8. Misc.
    1. Inclusion into official Ubuntu
    2. How do I make Ubuntu the default boot option?
    3. Can I back up the installation files?
    4. How do I install multiple distros?
    5. Improving disk performance
    6. What happens if I have another bootloader?
    7. How big should the the virtual disks be?
    8. How do I migrate to a real partition, and/or get rid of Windows entirely?
    9. How do I resize the virtual disks?
    10. How do I increase my swap space?
    11. How do I create a virtual disk in Ubuntu?
    12. How do I create a virtual disk in Windows?
    13. How do I access the Windows drives?
    14. How can I access the Wubi files from Windows?
    15. How can I access my Wubi install and repair my install if it won't boot?
    16. How to reboot cleanly even when the keyboard/mouse are frozen
  9. Wubi Customization
    1. Can you add Ubuntu-flavor-XYZ to Wubi?
    2. How do I compile Wubi from source?
    3. Can I use Wubi for non-Ubuntu based distributions?
    4. Where is the source code?
    5. What is the license?

Introduction

Wubi logo

What is Wubi?

Wubi is an officially supported installer for Windows XP, Vista and 7 users that allows Ubuntu to be installed and uninstalled in a safe, easy way as with any other Windows application.

What about Windows 8?

At this time, Wubi does not work with Windows 8 default boot-loader. Thus at this point Wubi would not work on a new Windows 8 machine. You would be able to install, but not reboot into Ubuntu.

If you upgraded to Windows 8 and are using BIOS firmware, Wubi does work, but do not enable hybrid-sleep on Windows 8.

How to use this guide

Please note that this guide is only for issues directly related to the Wubi installer; for general Ubuntu questions please use appropriate resources such as the official Ubuntu documentation, the Ubuntu Forums, or the Ubuntu Guide.

For general information on Wubi see the Ubuntu Windows Installer Download page. You might also be interested in the Ubuntu Forums Installations & Upgrades section.

Warning

Wubi uses a virtual disk that is sensitive to forced shutdowns. If Ubuntu appears to be frozen please refer to: How to reboot cleanly even when the keyboard/mouse are frozen

Installation

How do I download Wubi?

Download Wubi from the Ubuntu Windows Installer Download page; this will download the latest version. You can download other versions from the Ubuntu pages on releases.ubuntu.com, e.g. 12.10, look for wubi.exe at the bottom of the page. Wubi is also included on Ubuntu Desktop and Kubuntu CDs.

How do I install Ubuntu?

Run Wubi, insert a password for the new account, adjust other settings such as the disk space, and click "install".

The installation process from this point on is fully automatic.

The installation files (approximately 700MB) will be downloaded and checked, after which you will be asked to reboot.

Do so and select Ubuntu at the boot screen. The installation will continue for another 10 to 15 minutes and the machine will reboot again.

That's it. Now you can select Ubuntu at the boot screen and start using it.

Screenshot of the installation screen

The standard installation has default settings that should work on most hardware.

How do I select whether to run Windows or Ubuntu?

You can choose to run Windows or Ubuntu at the system boot screen.

Screenshot of the boot screen

How do I install Wubi on a machine with no Internet connection?

Wubi also works with physical Ubuntu Desktop Live CDs. Wubi.exe is available in the root folder of the CD.

If you do not have a CD, try to find a computer with Internet access, and download both Wubi.exe and the required Desktop ISO from the same location (the release has to match):

Copy both files into the same folder on the machine with no Internet access and run the Wubi executable.

Where do I find older versions of Wubi?

Older versions of Wubi can be found on the SourceForge page.

How can I use a manually downloaded ISO?

You need to download the DESKTOP CD ISO of the appropriate version. Place the ISO in the same folder where you have wubi.exe and then run Wubi. For example, Wubi 11.10 requires the 11.10 DESKTOP ISO, available here.

Note that you need a DESKTOP CD ISO. A DVD ISO may not work (except for Edubuntu). Alternate ISO files are not supported.

Why is the AMD64 version of Ubuntu being downloaded and installed?

The machine you are trying to install Ubuntu on is 64 bit. The AMD64 installation is appropriate for all 64 bit architectures, no matter if they are AMD or Intel.

Can I force Wubi to download and install a 32 bit version of Ubuntu?

Yes. Either pre-download the appropriate 32 bit ISO manually and place it in the same folder as Wubi.exe or start Wubi from the command prompt with the "--32bit" argument.

To modify arguments without using the command prompt, right-click Wubi.exe and select "Create Shortcut". Then right-click the shortcut, select Properties, and modify the Target line, for example: "C:\Documents and Settings\<user>\Desktop\wubi.exe" --32bit

Can I force Wubi to install if I have less than 256MB of memory?

Yes. start Wubi with the argument "--skipmemorycheck". The installer may not work in such conditions.

Can I force Wubi to install even if I have less than 5GB of free disk space?

No. From release 11.10, 5GB is required as a minimum including enough space to store the ISO. On older releases, start Wubi with the argument "--skipspacecheck". Even on older releases, you'll still require 3GB of space plus room for the ISO. Pushing this limit too hard may cause errors.

Can I force Wubi to skip the md5 checks?

Yes. Start Wubi with the argument "--skipmd5check".

Which Operating Systems are supported?

Windows 7, Vista, XP, and 2000 are known to work with Wubi. Windows 98 should also work, but has not been thoroughly tested. Windows ME is not supported. Linux is supported through Lubi.

What happens if the installation is interrupted?

If the installation is interrupted for any reason, you will have to run Wubi.exe again from within the Windows installation (which in turn may force you to uninstall first).

Upgrading

Upgrading from 12.04 to 12.10 is supported. FIXME other

Upgrading from releases 10.04 and later is supported. Please review the applicable release notes before hand. Ensure you have sufficient free space, and consider backing up the \ubuntu\disks directory (from Windows) in case there are any errors, or you prefer to revert to the old release.

Uninstallation

How do I uninstall Wubi?

Run the uninstaller in "Control Panel > Add or Remove Programs" for Windows XP or lower or "Control Panel > Programs and Features" for Windows Vista or Windows 7. Alternatively, you can run: C:\ubuntu\Uninstall-Ubuntu.exe.

wubi-uninstall.png

If the uninstaller fails, try downloading and running Uninstall-Ubuntu.exe.

How do I manually uninstall Wubi?

Remove C:\ubuntu and C:\wubildr*

In Windows XP you need to edit C:\boot.ini and delete the Ubuntu/Wubi line. Alternatively you can modify the boot menu via Control Panel > System > Advanced > Startup and Recovery and pressing "Edit". For Windows 98 you have to edit C:\config.sys and remove the Wubi block. For Windows Vista/7, you can use the built-in bcdedit command or install EasyBCD to edit the boot menu. To use bcdedit, run cmd.exe as an administrator, then enter bcdedit to show all boot entries, note the {GUID} specified for the Ubuntu entry, and then remove it: bcdedit /delete {GUID}

To remove Wubi from the add/remove list, delete the registry key: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wubi

An easy method of removing this registry key is to paste the following text into a plain editor such as Notepad, close and save the file as something like removeWubiKey.reg (you may wish to go to Folder Options > View and disable the "Hide file extensions for known file types" option to check that the .reg extension has been applied correctly). Then you can perform the rest automatically by opening the file in the normal Windows manner, or choosing the "Merge" option from the right click context menu. Note: The formatting is rather strict, so copy the text exactly for best results. You may need to be logged in as the administrator to delete the key, depending on the version of Windows you are using. User Account Control in Vista may also ask for permission, in the typical fashion.

REGEDIT4

[-HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wubi]

After deleting the registry key, Ubuntu may still appear in the program list. If this is the case, you may be asked if you would like to remove the item from the list.

How do I reinstall Wubi?

Run Wubi.exe again. Wubi will detect that there is an existing installation and you will be offered an option to uninstall. You may want to backup the installation files (the ISO) in order to avoid having to download them again. Note that when you reinstall, the system virtual drive (root.disk) is reset.

How can I make a backup of my Wubi install?

The easiest method is to to simply copy the root.disk to an external medium. In the event that something goes wrong, copy the root.disk back to the Ubuntu folder on the Windows drive. Note that this is not the most efficient method (since it copies the whole root.disk rather than specific data/settings) but it is effective.

Unsupported set-ups

Software raid arrays

Although installing Wubi to RAID is not officially supported there have been reports of users who have done so successfully. This has not been thoroughly tested and users who experience problems with installing to RAID should address their concerns on the Ubuntu Forums. Additionally, users who have computers with software RAID metadata, where the RAID has not enabled, may need to delete the RAID metadata before installing Wubi.

Encrypted disks

Encrypted disks are not supported.

Windows ME

Windows ME is not supported.

Proxy server

Wubi does not support http proxies, which will result in the download failing. You will have to download the ISO manually as explained above and place it in the same directory as Wubi.exe.

DVD and Alternate ISO

DVD and Alternate ISO/CDs are not supported. The ISO must be a 10.04/11.10/12.04/12.10 CD Desktop ISO.

Troubleshooting

Cannot access the CD

This problem sometimes occurs when a drive/disk is already in use or not finalized. If this is not the case, please check that your hardware is supported by both Ubuntu and Wubi.

If problems still persist after checking the above, please follow instructions on how to download Wubi and make it use an ISO file instead of physical media.

Windows Missing hal.dll

You can get this error if you are using Windows XP and you've manually edited the file C:\boot.ini or you've deleted the C:\wubildr.mbr file. If you've deleted the C:\wubildr file then you should be able to boot Windows normally, in which case simply copy \ubuntu\winboot\wubildr.mbr back to C:\wubildr.mbr (also copy the wubildr if it is missing).

If you've manually edited the file and it is corrupt or missing then you will not be able to boot Windows. See the following link on how to fix: http://support.microsoft.com/kb/330184

Cannot boot into Ubuntu

Never try to correct Wubi boot problems by reinstalling Grub2. This will prevent Windows from booting and will not fix the Wubi install.

Ubuntu cannot be booted if Windows has not been shut down cleanly. If Wubi fails to start:

Make sure you did not install on a RAID array or in an encrypted disk. Also make sure you did not install using an Alternate or DVD ISO.

Other boot or video problems

Some hardware is not fully compatible and Wubi will freeze upon booting (ACPI) and/or you may experience video problems. Those are not Wubi specific issues. There are generally special parameters that are required to enable workarounds for such hardware. Refer to this support thread for more information.

Installation error while formatting the swap file

If the installation fails while formatting the swap virtual disk it means that your drive is excessively fragmented. Uninstall, run jkdefrag on the target drive and then run Wubi again.

Cannot uninstall Ubuntu

If you used Wubi rev. 505, the uninstaller may fail if you installed on a drive other than the C drive. In such cases use Uninstall-Ubuntu.exe. Wubi rev. 506+ does not have this issue.

Cannot download the ISO file

This normally happens when you are behind a proxy server; sometimes the server might be down temporarily. In either case you can download the ISO manually as explained above.

Video Problems after second reboot

If you experience problems after installation, press "Ctrl+Alt+F2" and run:

sudo dpkg-reconfigure xserver-xorg

Select the VESA driver and leave all other options at default. Then reboot. That will allow you to boot into a safe graphics mode (limited resolution) you should then be able to install the appropriate drivers or try other solutions as needed.

Corrupted NTFS filesystem

All reported cases of damaged filesystems were from users who hard rebooted (pulling the plug).

When you hard reboot, there is always a chance of damaging your filesystem, whether you use Wubi or not.

New users, unfamiliar with a new operating system, tend to hard reboot more often than necessary when they encounter problems.

If Wubi becomes damaged as a result of a hard reboot, there is a chance that Windows may also become corrupted since the principle behind Wubi is that of a virtual disk within the host operating system.

Sometimes people blame Wubi for these issues even though a quick Google search will reveal numerous cases of NTFS corruption without users having ever installed Wubi or ntfs-3g (and a full software industry lurking on that…).

If the NTFS filesystem becomes corrupted you need to run chkdsk /r from the Windows Recovery Console on the Windows CD (or other recovery CD available on the web) or in the msdos console (if you can boot into Windows).

At the moment there is no fsck for NTFS on the Linux side, otherwise it would be possible to fix these errors automatically within Linux itself, without having to rely on Windows tools.

The best advice is to simply avoid hard rebooting, whatever OS you may be using.

Wubi Support Forum

If none of the above sections or advice help with your problem, feel free to ask for support on the Ubuntu Forums in the Installations & Upgrades section; don't forget to let them know that you're using Wubi by prefixing your thread title with [wubi]. It helps a lot if you can provide relevant logs when asking for support and will also speed up the process significantly.

Note that you can install in "Verbose Mode" so that the logs will give much more detailed information. You will have to uninstall, reinstall, press "ESC" at boot after selecting "Ubuntu", and choose "Verbose Mode". There are different Wubi logs:

Bugs are tracked in https://bugs.launchpad.net/wubi.

Misc.

Inclusion into official Ubuntu

Wubi was born as an independent project and hence the 7.04 and 7.10 versions were unofficial. Wubi 8.04 and later versions are, however, official as well as being fully supported. Wubi has been shipped within the Ubuntu Live CD since the 8.04 release.

How do I make Ubuntu the default boot option?

Ubuntu is not installed as the default boot option, you have to select it in the Windows boot menu. To change that, in Windows XP go to Control Panel > System > Advanced Startup and Recovery and edit the "Default Operating System". In Windows 7, go to Control Panel > System and Security > System > Advanced system settings (on the left). Then click Settings under Startup and Recovery. If you want, you can change the timeout as well. Be aware that changing the timeout to zero (0) may cause issues booting into Windows. It is preferable that the value be set at 10 or higher.

Can I back up the installation files?

Yes; just copy C:\ubuntu\disks\root.disk somewhere else (in 7.04 the relevant files are called C:\wubi\disks\*.virtual.disk). Old installation files can be mounted within Ubuntu and any relevant data can be copied over the new installation.

How do I install multiple distros?

You can install your favorite distro from within Wubi (see the advanced settings) and then once you are in Ubuntu, you can install the other desktop environments as normal packages. Each desktop environment is available as a single package (e.g. kubuntu-desktop). You will not have to reboot to change the desktop, simply log-off and choose the desktop environment in the options at login.

Improving disk performance

Poor disk performance is usually due to a fragmented drive or to a low amount of memory (frequent swapping).

You can use jkdefrag to defragment from within Windows.

  1. download jkdefrag http://www.kessels.com/JkDefrag/

  2. unzip
  3. run: jkdefrag c:\ubuntu (or c:\wubi in 7.04 and above)

What happens if I have another bootloader?

Wubi only changes the Windows bootloader. Chances are that your bootloader will chainload into the Windows bootloader. For instance, if you have Grub already, you will have to select Windows there, and then you will see Windows and Ubuntu. The chain of events goes like this:

GRUB > NTLDR/BCD > GRUB4DOS > KERNEL

How big should the the virtual disks be?

The default size is calculated automatically based on your free space. There are options to change this in the settings. The space is not actually fully used; a barebone installation takes less than 3GB including all of the preinstalled software (office suite, games, graphics applications, etc...), but if the virtual disks were 2GB to 3GB, you would soon run out of space once you start installing extra software. 8GB should be enough in most cases. Remember that on FAT filesystems the virtual disks cannot be larger than 4GB (Wubi will split larger allocations over several virtual disks). Remember also that Wubi requires a larger free space than the one required by the virtual disk themselves, that is because it has to grab an ISO (700MB) plus some headroom. So Wubi will not install if you have less than 5GB free.

How do I migrate to a real partition, and/or get rid of Windows entirely?

Refer to the following guide: https://help.ubuntu.com/community/MigrateWubi

Note that LVPM and the attached wubi-move-to-partition script only work on older releases, 8.04 or earlier, which are no longer supported. There are still many references to these, but they will not work on current Ubuntu releases.

How do I resize the virtual disks?

Refer to the following guide: https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk

Note that LVPM only works to resize older releases of Ubuntu (those using grub-legacy).

As an alternative, you can use the following script to move /home to a dedicated virtual disk.

Download wubi-add-virtual-disk, open a terminal and run:

sudo sh wubi-add-virtual-disk /home 15000

Where the first argument is the directory to move to a new dedicated disk, and the second argument is the size in MB.

You should now reboot. If you are happy with the result, you can now remove /home.backup. To undo the changes remove /home, copy rename /home.backup to /home and remove the /home line in /etc/fstab.

Note that contrary to previous information, this script is not suitable for moving /usr.

Experienced users may be able to do this manually, at own risk, following a process similar to that outlined in the file. (Do not rename /usr until the very last moment, as rsync is installed there.)

To move /usr try enter recovery mode after you run

sudo sh wubi-add-virtual-disk /usr 15000

and copy all folders in /usr.backup into new /usr and then fix sudo with

chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo

How do I increase my swap space?

The following will increase your swap to 2 GB. Replace count= with the number of kilobytes you want for your swap file.

sudo su
swapoff -a
cd /host/ubuntu/disks/
mv swap.disk swap.disk.bak
dd if=/dev/zero of=swap.disk bs=1024 count=2097152
mkswap swap.disk
swapon -a
free -m

The final free statement will verify that your new swap file has the correct space. If everything worked, issue the following command and you are done. If it didn't work, then remove swap.disk and move swap.disk.bak back to swap.disk and try again.

rm swap.disk.bak

How do I create a virtual disk in Ubuntu?

Open a terminal (Applications -> Accessories -> Teminal), and enter these commands (this will create a 10 GB extra.virtual.disk, adjust line 2 to change these):

cd /host/ubuntu/disks
dd if=/dev/zero of=extra.disk bs=1MB count=10000 seek=1
mkfs.ext3 -F extra.disk

How do I create a virtual disk in Windows?

You can use qemu-img for that. Another dirty (but working) trick is to copy any other file of the desired size to C:\wubi\disks and rename it "root.disk", "home.disk", "swap.disk" or "extra.disk". That's the Wubi equivalent of buying (and installing) a new hard disk.

If you are running Windows XP (may work in Windows 2000 and Vista as well) you can create a file by using the fsutil that is included with Windows. The command format is fsutil file createnew filename filesize where filename is the file you wish to create and filesize is the size of the file to be created in bytes.

How do I access the Windows drives?

The Windows partition where you installed Wubi is available as /host within Ubuntu (Places > Computer > File System > Host) All the other partitions will be available under Places > Removable Media

How can I access the Wubi files from Windows?

There are a few Windows applications that can mount ext2-based file systems. See for instance:

The relevant Wubi files you need to access are located under C:\ubuntu\disks\

How can I access my Wubi install and repair my install if it won't boot?

Boot the Ubuntu Desktop CD, or another LiveCD, then mount the windows partition:

sudo mkdir /win
sudo mount /dev/sda1 /win

Replace sda1 with the appropriate device (a = disk, 1 = partition number), then mount the virtual disk therein

sudo mkdir /vdisk
sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk

Now the content of the virtual disk will be visible under /vdisk. 7.04 users will have to install ntfs-3g first and specify it as fstype to gain r/w access.

To check the filesystem you can use (make sure the root.disk is not mounted):

sudo fsck /win/ubuntu/disks/root.disk

How to reboot cleanly even when the keyboard/mouse are frozen

There are normally several ways to reboot cleanly using key combinations such as:

The last one is the most effective, but you could try the other commands first.

Wubi Customization

Can you add Ubuntu-flavor-XYZ to Wubi?

If you want your distribution included into the official release of Wubi, it first requires approval. A live CD ISO must be available to do that (Wubi uses an ubiquity based installer).

How do I compile Wubi from source?

Wubi can be easily rebranded and modified. Get the Wubi source code and modify the files in the ./data directory as you see fit. In particular you may want to change isolist.ini and setting.nsh, you might also want to change english.nsh (to alter the localised strings) and the artwork (image names have to match the headers in isolist.ini).

To compile on a Debian based system, run:

sudo apt-get install gettext build-essential grub-pc mingw32 #Is needed to compile Wubi
make

Note that you need the following:

Can I use Wubi for non-Ubuntu based distributions?

It should be fairly straightforward to modify the frontend (feel free to ask if you need any help), as shown above. Your Linux distribution must have a mechanism to do unattended installation using a preseed file. Wubi takes advantages of debian-installer/ubiquity presiding. If you use a different mechanism, you will have to modify src/wubi/installer_preseed.nsh. The make prerequisite scripts may need to be updated as well, since they are Debian specific.

Note that upstream files (Linux-side) need to be changed since normal distributions are generally not capable of targeting and booting (and rebooting) off of a loop device. This task was originally accomplished by the Lupin project, but since 7.10 a lot of functionality has been moved upstream. Hence you might want to have a look at:

Where is the source code?

What is the license?

The code is distributed under GPL version 2 and above, however, the Linux kernel itself is licensed under the GPL version 2 only.


CategorySpec

WubiGuide (last edited 2014-04-03 16:15:12 by xnox)