Thursday, May 28, 2009

Wubi: The Windows Ubuntu Installer

if you want to try Linux for the first time,
or are switching back to Linux after using Windows for a while,
Wubi is the perfect solution. It allows you to install Ubuntu
Linux as if it was a normal Windows program.

What Wubi Is

What Wubi Isn’t

Installing Wubi

Wubi is really easy to install:

  1. Go to the Wubi website, and click the big “Download Now” button. (Direct link)
    • At the time of writing, the latest release was 9.04, “Jaunty Jackalope”
  2. Run the file you downloaded
    • You will be presented with a screen like this:
    • Wubi Main Window

      Wubi Main Window

  3. Enter a new username and password, click Install, and that’s it!
  4. You’ll get a progress screen while it installs
    • Wubi Install Progress

      Wubi Install Progress

  5. Reboot your computer when asked
    • Wubi Reboot Window

      Wubi Reboot Window

How Wubi Works

Getting the CD Image

Of course, you could have gathered all that from their website. The really interesting part is how it actually works.

Wubi requires an [K/X]Ubuntu Live CD to install. It searches like this:

It needs:

If it can’t find that, it’ll download the correct version from the Ubuntu servers.

It won’t burn it to CD or anything like that.

Actual Installation

Once it has the CD image, it doesn’t actually do that much. It does, first of all, make a directory on the root of the drive on which you chose to install it.
For example, if I chose “C:” as my installation drive, it would make a
“C:\ubuntu” folder.

The basic tree it would create is this:

ubuntu/
disks/
root.disk
install/
ubuntu-9.04-desktop-amd64.iso
wubildr

The file root.disk will contain all the Ubuntu data - the user data,

the configuration, the programs. At this stage it’s empty.
The method Wubi uses to actually create the virtual disk
is actually quite neat, and almost instant.

Next, it’ll add an entry to the Windows boot.ini or the
BCD menu file pointing to that “wubildr” file, which,
like “ntldr”, is responsible for starting off the boot process.

Finally, it’ll eject the Ubuntu CD (if present), and ask you to reboot the system.

Post-Reboot

Once you reboot the machine, you will get a menu like this:

Vista Boot Menu showing Ubuntu

Vista Boot Menu showing Ubuntu

When you select “Ubuntu”, the Jaunty loading screen will come up:

Jaunty usplash Booting Screen

Jaunty "usplash" Booting Screen

Wait a couple of minutes, and a little window with
a progress bar will pop up. This is the actual install
procedure. It starts by mounting a few disks:

After that, it uses a similar technique to the live installer. Traditionally, Linux distributions with package managers created their blank file system, and executed their package managers with some flags to tell it where to install the packages to. It did this with every package. Now, LiveCD installers don’t do this†, they basically just ‘extract’ an image over to the hard disk.

Technically, this is done when producing the Live CD, but anyway…

Finally, it reads the installation parameters and uses that to set up your user, time zone (obtained from the host), and any accessibility options specified on the Windows side.

Exploring The Wubi Source Tree

This is almost getting to short essay length! So I’ll split this off into a separate article, which should be here soon!


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]