Friday, October 26, 2012

Tricking Wubi into installing Xubuntu 12.10

Xubuntu is no longer available on Wubi from release 12.10 and later - as I mentioned here: Xubuntu option to be removed from Wubi. However, there are some people that will want to try it out with Wubi anyway, so here's a way to do it.

Disclaimer: I don't recommend the technique I describe here, but it works fine if that's what you want to do.

It involves downloading two ISOs, one for Xubuntu and another one supported by Wubi. I'll choose lubuntu since it's the smallest.
  1. Dowload the smallest supported ISO: lubuntu-12.10-desktop-i386.iso
  2. Download xubuntu-12.10-desktop-amd64.iso (I want 64-bit, but you can use 32-bit too)
  3. Check the xubuntu md5sum (Wubi will check lubuntu, but you need to check xubuntu).
  4. Download wubi.exe for release 12.10
  5. Make sure wubi.exe and the lubuntu ISO are in the same folder. Run Wubi and select lubuntu
  6. When it tells you to reboot, select "Reboot later".
  7. Replace C:\ubuntu\install\installation.iso with the Xubuntu ISO (renaming to installation.iso)
  8. Mount the Xubuntu ISO and copy initrd.lz and vmlinuz from the /casper/ directory over the one in C:\ubuntu\install
  9. Edit the preseed.cfg file in C:\ubuntu\install\custom-installation\ so that it installs xubuntu-desktop instead of lubuntu-desktop
  10. Reboot the computer
  11. Select Lubuntu
  12. Watch Xubuntu install
  13. Reboot, select Lubuntu and boot into your new Xubuntu install.
You don't strictly need to predownload the lubuntu ISO but it's faster than letting Wubi do it. If you decide to use the Ubuntu ISO instead of lubuntu you do have to download the ISO beforehand (because Ubuntu defaults to the preinstalled diskimage and that won't work with this technique).

I used the C: drive for clarity - if you install to a different drive then modify as required.
If it bugs you, you can rename the Lubuntu menu entry to Xubuntu using bcdedit or easyBCD. 

Here are some screenshots for selected steps:

Step 3: Check Xubuntu MD5 sum

Step 5: Run wubi.exe with lubuntu in the same folder

Step 6: Select to reboot later

Step 7a: Delete the existing installation.iso

Step 7b: copy the Xubuntu ISO and rename to installation.iso

Step 8: Mount the xubuntu ISO and copy vmlinuz and initrd.lz

Step 9: Set it to install xubuntu-desktop

Step 11: Select Lubuntu

Step 12: Watch it install Xubuntu

Credit: I got this tip from here ironically to install lubuntu prior to it being supported by Wubi.

The original post had this line: "This technique will also likely work with other unsupported flavours e.g. ubuntu-studio". It does with one caveat. Ubuntu Studio doesn't include the package required by grub to generate the menu entries that can boot a loop mounted install (lupin-support). So it will install, but you have to manually boot it the first time from the grub prompt and then install lupin-support.

 Here's how to manually boot any Wubi install:
search -s -f -n /ubuntu/disks/root.disk
probe --set=diskuuid -u $root
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk ro quiet splash
initrd /initrd.img


  1. Thanks man!
    I wonder why it was removed? I've read because of workload, but adding an option and then just do whatever they did before doesn't seem that much of a hassle.

    I've personally never had a problem with wubi + xubuntu. And it's not because my hardware is dated that I need xubuntu, but I like the xfce much more than unity.

    1. Xubuntu lead developer: "no testers, and our experience is that wubi simply brings more problems". I think it's more about the 'more problems' than the testing workload. Not a whole lot of effort was made to get help e.g. ask the community or other testers. I also don't think there was much consideration as to how many users would be affected... (at least not that I noticed). You could go ask for it if you want it.

  2. Thanks for this. I was really bummed when I found out Xubuntu 12.10 wasn't available for Wubi. I could of used a VM to test it or a bootable USB, but I wanted to use Wubi. Once again, thank you for this.

  3. Hello, thank you to the tutorial, however I keep getting the following error when starting up to install xubuntu:
    - (initramfs) /scripts/casper-premount/20iso_scan: line 46: can't open /dev/sr0
    - Could not find the ISO \ubuntu\install\installation.iso

    Any ideas?

    1. This is usual if you select the "CD Boot helper". This requires the CD in the tray and will keep prompting with that message until you do. But this should only show up if you install from a CD. In this case if doesn't show the "Install inside Windows" option (2nd option), and you need to run: wubi.exe --force-wubi

  4. Just a note, if you can't mount an ISO (eg running XP without any special software), you can just rename the .ISO file to .ZIP and get access to the initrd.lz and vmlinuz files that way. thanks for the article!

  5. Worked for me, thanks!