Sunday, January 2, 2011

Upgrade to Natty 11.04 Alpha 1 with Wubi

An alternative to installing Wubi 11.04 Natty Alpha 1 from scratch - which is a convoluted process at the moment... is to upgrade from a current Maverick install. This bypasses the bad wubildr and Ubiquity installer issues. It does take a little bit longer to get setup, but it's quicker to repeat the upgrade.

Warning: with Alpha testing, something that works one day, may break the next. Please don't attempt this unless you have a dedicated test machine. The following example installs Wubi to the same partition as Windows (C:) - there is a difference, see note at bottom.

Step 1 - Install Wubi 10.10 Maverick
I picked 6GB for my install size.
Run all available updates.
Boot back into Windows and backup the root.disk and c:\wubildr (for repeat testing)

Step 2 - Download the daily 11.04 Natty Alternate CD
Since you'll probably want to repeat the upgrade at some point, it's a good idea to use zsync to keep your .iso up to date. If this is a once off, you could skip this step and just run the update online, but it takes much longer, in my experience than just downloading the alternate CD.

To download the 32-bit alternate CD:
See this for more info on zsync:

Step 3 - Upgrade to Natty
Boot into the Wubi maverick install and run the upgrade from the alternate CD:
sudo mount -o loop natty-alternate-i386.iso /mnt
sudo /mnt/cdromupgrade

When you start the upgrade it asks you whether to check the internet for the latest packages - it's not really necessary since you have the latest daily image - and there's less chance of catching a buggy update - plus it's much quicker running just off the alternate image.

During the upgrade you get prompted a few times, but nothing exciting happened. I noticed by watching the grub.cfg file get regenerated (at least) 3 times and seeing the exception output, that the /boot/grub folder remains empty until the final time, when grub-install runs. This updates the wubildr and also places all the grub modules in /boot/grub. At the end the grub.cfg is regenerated in the same way that breaks wubi installs on 10.04.1 and upgrades to 10.10.

Step 4 - Reboot into Natty
The Wubi install didn't shut down when I requested a restart - it needed a little push (ALT+SysRq R-S-U-B). On restart, as expected due to the grub2/Wubi problems already covered in other posts, Wubi doesn't boot (but I had to try). I ended up at a grub prompt (not a rescue prompt), which is easy to boot from. I then chose the Classic desktop to login to, and had to click on multiple "Reload" buttons to fix the broken panel objects.

Welcome to Natty!!!

Step 5 - A new Grub2 wrinkle
So the accepted fix with Wubi installs is to clean out the /boot/grub directory and regenerate grub.cfg. This does spit out one error (on 10.10) but it's not an issue - about a missing /boot/grub/video.lst. However, with Natty, now Grub checks the syntax of the grub.cfg and rejects it if it finds errors. So the empty load_video function causes a syntax error.

You can get around this by leaving video.lst in /boot/grub, but that just spits out errors and reboots your machine when trying to boot your install. So... instead you have to manually rename to grub.cfg. Alternatively you can patch /etc/grub.d/00_header. What a pain! There must be an easier way to do this!!!

The instructions to patch grub, and the new command to manually rename follow:
sudo mv /boot/grub /boot/grubold
sudo mkdir /boot/grub
sudo cp /boot/grub/grubenv /boot/grub
sudo update-grub
sudo mv /boot/grub/ /boot/grub/grub.cfg

That's about it. Natty boots fine after that, apart from having to click RELOAD on all the panel objects each time. Don't forget to select the "Classic" desktop unless you have a decent test machine that can handle Unity.

PS another nice thing is the Firefox beta. It looks very similar to Chrome - which is good for Firefox.

NOTE: if you install Wubi to a partition other than Windows, there is no way to update the wubildr file that is required to boot the Wubi install. Likely the upgrade will fail as the grub.cfg file has changed radically (I haven't tested it yet, but it pays to be cautious) and my previous test showed that the Maverick wubildr did not work. There are ways to generate a new wubildr file if you need to, but that's not covered in this article.

No comments:

Post a Comment