Wednesday, 17 June 2009

Wubi

Well, you may think I'm selling out if I mention Windows, but sometimes we have to admit the PC ecosystem has other operating systems than just Linux :-)

Wubi is an installer that allows Windows users to install and un-install Ubuntu just like a Windows application. Wubi does require Ubuntu partitions to be added and does not install a new boot loader. However, it does allow Ubuntu to be dual-booted on the Windows PC and run just like a conventionally installed Ubuntu system.

There is a little magic going on. Wubi creates a large file on the Windows NTFS partition which contains Ubuntu in the form of ext3 filesystem. When Ubuntu boots up, it mounts the NTFS partition using NTFS-3G (via fuse, "file system in user space") and then loop mounts the file on the NTFS drive that contains the ext3 Ubuntu file system.

To make sure dirty pages are written back to disk for file system consistency Wubi does some vm tweaks. This is required just because Wubi uses stacked file systems (NTFS-3G+fuse, loop) and dirty pages sometimes hang around a while in memory.

The Wubi installer is on the Ubuntu ISO image, so a Windows user can load a Ubuntu Live CD and Windows will auto-run the Wubi installer. This allows Windows users to install Ubuntu and give it a try!

Postscript: I've added more Wubi notes in this newer blog article.

2 comments:

  1. I think Wubi is a great idea for anyone trying out Linux. It takes away the hassle of repartitioning and, while I hope they won't, makes uninstalling easy. It's a much better advertisment that using the LiveCD thanks to the faster disk access.
    Re Selling out. As someone who uses both Windows and Linux, I really appreciate the recognition of Windows by Linux, mounting partitions and including Windows in the bootloader. The way Windows ignores Linux can get very annoying. And people are far more likely to try Linux (and hopefully convert) if it's easy for them to do so.
    It's useful to hear a little more about how it works.
    Tim

    ReplyDelete
  2. Hi Tim,

    The feature I like about Wubi is that if Ubuntu works as installed by Wubi then you know it will work on your machine when installed the usual Ubuntu way.

    I agree it's faster than the Live-CD image. However, one can run quicker one converts a Live-CD image to a USB pen-drive bootable image. This can be done using System->Administration->USB Startup Disk Creator on a Ubuntu System. Provide it with a fat formatted USB pendrive and a Jaunty ISO and it will create a bootable USB pendrive for you. Use a 1GB pendrive and make sure it's a fast one! :-)

    Enjoy!

    ReplyDelete