WubiGuide

Revision 166 as of 2008-09-08 17:14:01

Clear message

Contents

  1. Introduction
    1. What is Wubi?
    2. How to use this guide
  2. Installation
    1. How do I install Ubuntu?
    2. How do I select whether to run Windows or Ubuntu?
    3. How do I install on a machine with no internet connection?
    4. Where do I find older versions of Wubi?
    5. How can I use a manually downloaded ISO?
    6. Why is the AMD64 version of Ubuntu getting downloaded and installed?
    7. Can I force Wubi to download and install a 32 bit version of Ubuntu?
    8. Can I force Wubi to install even if I have <= 256MB of memory?
    9. Can I force Wubi to install even if I have < 5GB of free disk space?
    10. Can I force Wubi to skip the md5 checks?
    11. What Operating Systems are supported?
    12. What happens if the installation gets interrupted?
  3. Upgrading
  4. Uninstallation
    1. How do I uninstall Wubi?
    2. How do I manually uninstall Wubi?
    3. How do I reinstall Wubi?
  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. Cannot boot into Ubuntu
    3. Other boot or video problems
    4. Installation error while formatting the swap file
    5. Cannot uninstall Ubuntu
    6. Cannot download the ISO file
    7. Problems upgrading from 7.04 to 7.10
    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 create a virtual disk in Ubuntu?
    11. How do I create a virtual disk in Windows?
    12. How do I access the Windows drives?
    13. How can I access the Wubi files from Windows?
    14. How can I access my Wubi install and repair my install if it won't boot?
    15. How to reboot cleanly even when the keyboard/mouse are frozen
  9. Wubi Customization
    1. Can you add Ubuntu-flavor-XYZ to Wubi?
    2. Can I recompile my own version of Wubi to support my Ubuntu-based distro?
    3. Can I use Wubi for non-Ubuntu based distributions?
    4. Where is the source code?
    5. What is the license?

Introduction

wubi_logo.png

What is Wubi?

Wubi is an officially supported Ubuntu installer for Windows users that can install and uninstall Ubuntu as any other Windows application, in a simple and safe way.

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 like the official Ubuntu documentation or ubuntuforums or ubuntuguide.

For general information on Wubi see the Wubi official website. You might also be interested in the Wubi Forum.

Installation

How do I install Ubuntu?

Run wubi, insert a password for the new account, and click "install". The installation process from this point is fully automatic. The installation files (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-15 minutes and the machine will reboot again. This is it. Now you can select Ubuntu at the boot screen and start using it.

wubi-123.png

The standard installation has default settings that will work for most people.

How do I select whether to run Windows or Ubuntu?

When you reboot you can choose to run Windows or Ubuntu.

boot-screen.jpg

How do I install on a machine with no internet connection?

Wubi works with a physical Ubuntu Desktop 8.04.1 Live CD. Wubi.exe is available on the CD itself.

If you do not have a CD, try to find a computer with internet access, and download both Wubi and the required ISO:

Then copy both files within the same folder on the machine with no internet acces. Then run the Wubi executable. If you have internet access on the machine where you plan to install Ubuntu, you only need Wubi (the first link), Wubi will automatically download the other file as required.

Where do I find older versions of Wubi?

Here: http://sourceforge.net/project/showfiles.php?group_id=198355

How can I use a manually downloaded ISO?

You need to download the appropriate ISO of the appropriate version. Place the ISO in the same folder where you have Wubi-X.XX.X.exe. Then run Wubi.

Note that you need a CD ISO. A DVD ISO may not work.

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

You probably have a 64 bit machine; the AMD64 installation is appropriate for all 64 bit architectures whether 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 with the "--32bit" argument.

Can I force Wubi to install even if I have <= 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 < 5GB of free disk space?

Yes start Wubi with the argument "--skipspacecheck". 3GB are needed though (plus the space for ISO), do not stretch that...

Can I force Wubi to skip the md5 checks?

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

What Operating Systems are supported?

Windows Vista, XP, and 2000 are known to be working fine with Wubi. Windows 98 should also work, but it has not been thoroughly tested. Windows ME is not supported. Linux is supported through Lubi http://lubi.sourceforge.net/.

What happens if the installation gets interrupted?

You will have to run Wubi again from within Windows (which in turns might force you to uninstall first).

Upgrading

Upgrading from 7.04 to 7.10 is NOT supported, due to the fundamental differences between 7.04 and 7.10. The best route is to uninstall and install Wubi-8.04 (you can save the old installation files and access them from 8.04) or move your 7.04 installation to a dedicated partition via LVPM, then upgrade using the standard upgrade-manager tool.

Upgrading from 7.10 to 8.04 might work, but it has not been tested yet.

Upgrading from 8.04 to 8.10 will be fully supported.

Uninstallation

How do I uninstall Wubi?

Run the uninstaller in add-remove programs. Or use C:\ubuntu\uninstall.exe.

wubi-uninstall.png

If the uninstaller fails (Wubi rev 505), try downloading and running Uninstall-Ubuntu.exe.

How do I manually uninstall Wubi?

Remove C:\ubuntu (C:\wubi in 7.04) and C:\wubildr*.

In Windows XP you need to edit C:\boot.ini and delete the Ubuntu/Wubi line. For Vista, you can use EasyBCD to edit the boot menu. 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.

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

How do I reinstall Wubi?

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

Unsupported set-ups

Software raid arrays

Software raid arrays 0 and 1 are not supported. They will be supported in the 8.10 release. Note that some "hardware" raids, are in fact software ones.

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 an 8.04 CD Desktop ISO (let Wubi get one for you). For Wubi 8.04.1 the 8.04.1 Desktop ISO is required.

Troubleshooting

NOTE: Wubi 8.04.1 is now available here: http://wubi-installer.org this addresses most of the following issues that emerged after the 8.04 release. So if you have installation problems with 8.04 it is recommended to try 8.04.1 first. Note that it requires a new 8.04.1 desktop ISO available from http://releases.ubuntu.com/8.04.1/, you will not be able to reuse the 8.04 CD/ISO with 8.04.1.

Cannot access the CD

This sometimes happens when a DVD media/drive is used and/or if the CD is corrupted and/or if the support is of poor quality and/or the CD/DVD is not finalized. Wubi does not require a physical CD, download wubi from http://wubi-installer.org and run it without the CD in the tray. If you have already downloaded the ISO file, place the ISO in the same directory as Wubi.exe.

Cannot boot into Ubuntu

Ubuntu cannot be booted if Windows has not been shut down cleanly, you have to clear the Windows filesystem from Windows (there is no chkdsk equivalent for Linux yet). If Wubi fails to start, boot into windows, run chkdsk /r from windows on the same drive where you have installed Ubuntu, shutdown cleanly and then try to boot into Ubuntu again.

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. If you press ESC at boot after selecting "Ubuntu" you will se a menu with more boot options. If the workarounds do the trick, we encourage you to notify the developers, so that a long-term solution can be investigated.

For more boot options, once in the grub4dos menu, hit 'e' to edit the first line. Next select the second line and hit 'e' again. Input 'irqpoll' towards the end of the bootline. Then hit 'enter' and then 'b' to boot. Another option that might help is 'all_generic_ide'.

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, then run wubi again.

Cannot uninstall Ubuntu

If you used Wubi rev 505, the uninstaller may fail if you installed on a drive different from C. In such case 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.

Problems upgrading from 7.04 to 7.10

Upgrading from 7.04 to 7.10 is NOT supported. Upgrading from 8.04 to later versions is fully supported.

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 graphic mode (limited resolution) you should then be able to install the appropriate drivers or try other solutions as appropriate.

Corrupted NTFS filesystem

All reported cases of damaged filesystems so far were from people that hard rebooted (pulling the plug).

When you hard reboot, you can always damage your filesystem whether you use wubi or not. What happens is that new users sometimes get stacked with wubi/ubuntu and since they do not know what to do they tend to hard-reboot more often than necessary. Sometimes they get lucky, sometimes they do not. Since wubi sits on top of ntfs of course when they do not get lucky, ntfs gets corrupted. Sometimes people blame Wubi for that even though a quick googling will show you that there are tons of people experiencing ntfs corruption without having ever used wubi or ntfs-3g (and a full software industry lurking on that...), most of them after a hard reboot...

If ntfs filesystem gets corrupted you have 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 errors automatically within Linux itself, as it happens for other filesystems, without having to rely on Windows tools.

Best advise is to simply avoid hard rebooting. Whatever the OS.

Wubi Support Forum

If none of the above helps, feel free to ask for help on http://www.ubuntuforums.org/forumdisplay.php?f=234. It helps a lot if you can provide relevant logs when asking for support. Logs also speed up the process considerably. Note that you can install in "Verbose Mode" so that the logs will be even more complete. You will have to uninstall, reinstall, press "esc" at boot after selecting "Ubuntu", and choose "Verbose Mode". That will provide more detailed information.There are different Wubi logs:

  • Windows side installation logs are in your user temp folder (%temp%)
  • For grub errors, immediately after reboot, press the insert key rapidly after selecting Wubi and/or press esc at the countdown after selecting "Ubuntu" and use "c" or "e" to enter the appropriate boot options manually
  • For installation boot logs or if you end up in a busybox console, see /casper.log. You can use the commands "cat" and "more" to read the file.
  • For installation logs see /var/log/syslog and /var/log/installer within Linux and C:\ubuntu\installation-logs.zip within Windows. If you do not have C:\ubuntu\installation-logs.zip, uninstall, reinstall, select "verbose mode" at boot (see above). When the installer stops press CTRL+ALT+F2 and run: "sudo sh /custom-installation/hooks/failure-command.sh". You can now reboot into Windows, the logs should be in C:\ubuntu\installation-logs.zip
  • Post installation logs are in /tmp and /var/log/syslog

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. But Wubi 8.04 is fully supported and it has been shipping within the Ubuntu Live CD with 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", if you want you can change the timeout as well.

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 low 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)

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 that:

GRUB > NTLDR/BCD > GRUB4DOS > KERNEL

How big should the the virtual disks be?

The default size is calculated automatically based on your free space, you can change that in the settings. The space is not actually fully used, a barebone installation take less than 3GB including all the preinstalled software (office suite, games, graphics applications, etc...), but if the virtual disks were of 2-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?

Existing Wubi/Lubi installations can be upgraded to an installation on a dedicated partition via LVPM. The main site for LVPM is at http://lubi.sourceforge.net/lvpm.html and the guide and support forum is at http://ubuntuforums.org/showthread.php?t=438591.

As an alternative, the following script can be used with Wubi 8.04.

Download wubi-move-to-partition

Open a terminal and run:

sudo sh wubi-move-to-partition /dev/sda9 /dev/sda10

Replace /dev/sda9 with the partition where you would like to migrate the Wubi installation to, and /dev/sda10 with the appropriate swap partition (you can omit the second argument completely, in which case no swap will be setup). The two partitions must already exist and be empty (you can use any partitioning tool such as gparted to create them in advance). Note that the script will install grub as main bootloader replacing the existing bootloader, and it may not be easy to undo the changes (if things do not work as expected you will have to boot from a Live CD and replace/edit the bootloader manually). Also note that if you have multiple hard-disks, the disk order might have to be adjusted manually.

How do I resize the virtual disks?

You can use LVPM, at http://lubi.sourceforge.net/lvpm.html

As an alternative, you can use the following script to move /home or /usr 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.

The 2 directories you are most likely to migrate are /home (if you have a lot of user data) and /usr (if you installed a lot of software).

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.

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
sudo dd if=/dev/zero of=extra.disk bs=1MB count=1 seek=10000
sudo mkfs.ext3 -F extra.disk

How do I create a virtual disk in Windows?

You can use qemu-img for that. Another dirty trick (but working) 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 Wink ;)

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 All the other partitions will be available under /media/

If you are using Wubi-7.04 (7.10 and 8.04 users can skip this), write support for ntfs is disabled by default, to enable it:

  1. Make sure you have internet access (see the network icon on the top right)
  2. Open the "Applications" menu and select "Add/Remove..."
  3. In the listbox on the right select: "Show All Available Applications"
  4. Search for "NTFS" and select "NTFS Configuration Tool". Click OK to install it
  5. Run the configuration tool under Applications > System Tools > NTFS Configuration Tool

  6. Select "Enable write support for internal device". Click OK to set it up.

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:

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:

  • CTRL + ALT+ F2 (get to a terminal, you can then run top/kill/pkill to discover and kill the offending process)
  • ALT+ SYSRQ + R then CTRL + ALT+ F2 (as above, but first try to regain control of the keyboard)
  • CTRL + ALT + Backspace (kills the graphic session and goes to a console, all graphical applications are terminated too)
  • ALT+ SYSRQ + R then ALT + Backspace (as above, but first try to regain control of the keyboard)
  • CTRL + ALT + DEL (reboot)
  • ALT+ SYSRQ + R then CTRL + ALT + DEL (as above, but first try to regain control of the keyboard)
  • ALT+ SYSRQ + R + S + U + B (forces a clean reboot even when the keyboard is not responding)

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, that needs to be approved. A live CD ISO must be available to do that (Wubi uses a ubiquity based installer).

Can I recompile my own version of Wubi to support my Ubuntu-based distro?

Yes, 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 the artwork (image names have to match the headers in isolist.ini).

To compile on a Debian based system run:

make prerequisites #only to be done once
make
make test #to test the installation within wine

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 preseeding, if you use a different mechanism, you will have to modify src/wubi/installer_preseed.nsh. The make prerequisite scripts might need to be updated a bit too since they are debian specific.

Note that upstream files (Linux-side) need to be changed as well since normal distributions are generally not capable of targeting and booting (and rebooting) off 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