Saturday, August 13, 2011

Oneiric Alpha3 Wubi

I've been running Oneiric with Wubi since early on in the development cycle - but it was an upgraded Natty. I finally got around to doing some installation testing on Oneiric - a week or so after the Alpha3 was released.

The first thing I tried was just running off the latest daily ISO. I downloaded the latest wubi.exe from here and let it download the ISO. It took a long time, probably because the bittorrent download isn't very fast when there aren't many seeds. I guess it's faster to download through the browser. At any rate, a couple of hours later, I did the install (wubi.exe and the oneiric iso in the same folder) and let it run. Once I rebooted to complete the install, it failed. Apparently the kernel and initrd on the ISO were bad as it couldn't mount my windows partition. There was a helpful message to run chkdsk /r and reboot twice into Windows, but that was wishful thinking. This is part of alpha testing - probably if I tried on Monday it would work. I'll find out later and create a bug if it doesn't.

So I decided to drop back to the alpha3. The only issue with this is that the ISO is oversized so it won't fit on a CD (and I downloaded it on another machine). So rather than burn a DVD I reused an Ubuntu USB stick I had sitting around. Note, I just copied the ISO to the root of the USB - installing Wubi from an Ubuntu USB doesn't work (in most cases), but it's okay if you just copy the ISO to the root. Note: if you're trying to install an older version of the ISO like this you have to disable your internet connection or wubi.exe will try to download the latest available ISO.

Anyway - the install went fine. The only issue was that it took a long time 'detecting file systems'. I had a peek in the logs and it seemed that it was trying to mount the root.disk, but whether this was the cause of the delay I cannot say. I'll dig into that in more depth later.

Then I ran all updates (250MB since Alpha 3 was released) - because there are some cool changes to Unity that I read about and I wanted to check out.

I've been running Oneiric on my another computer (i3, 4GB RAM) and it's been great. For the alpha test I used an older machine (core 2 duo, 1GB RAM) and it's very sluggish. But it works okay, and Unity 3D is working on the X1300 ATI card.

So in summary, Oneiric Alpha 3 worked fine with Wubi. The more testing the better - so try it out, file some bugs, help make it better for everybody. If you have questions, post them at

Tuesday, August 2, 2011

Missing the root.disk

I wrote earlier about the Mystery of the disappearing root.disk. I've seen a number of additional cases since that post - and not all have been catastrophic, so thought I'd discuss what the steps are to attempt recovery.

My belief is that this problem is largely the result of manually shutting down your computer when the Wubi install is hanging. But there have been cases where corruption has occurred without manual poweroffs and I've noticed that some files I delete from within Wubi are 'recovered' later by Windows.

But it is important for users to resist the urge to 'hit the restart/power button' when the Wubi install is hanging. For any OS this is a bad idea and can lead to problems. For Wubi installs it can be fatal. Instead refer to the Wubi Guide for other options.

The first thing you'll notice may be Windows running an automatic CHKDSK or when you try to boot Ubuntu you end up at a GRUB> prompt.
Then when you boot Windows and look in the C:\ubuntu\disks directory you'll notice the root.disk is missing. In some cases, the \ubuntu\disks directory is missing completely or is corrupted.

Running chkdsk
Depending on the problem, Windows may have run an automatic chkdsk or you may need to run it manually. It's not always necessary, but it will never hurt, so the first thing is to run it.
Go to My Computer on XP or Computer on Vista/7, right click the drive you installed Ubuntu on e.g. right click on C:, select Properties, select the Tools tab, then under Error-checking click Check now. Select to Automatically fix file system errors or Scan for and attempt recovery of bad sectors (I usually don't use this, but if you hard drive has problems it's a good idea). When the drive you installed on is C: the computer will tell you it has to schedule the scan for the next time you start your computer. Reboot to complete.

Locate recovered files/directories
The first thing to do is to look for the \found.000 folder on the drive in question i.e. C:\found.0000. This is hidden by default and (on my Windows 7 install) I also had to tell Windows not to "Hide protected OS files" just to see it. You may also have to recover from an administrator command prompt on Win7 (see below).

So now you look for your root.disk (or other .disk files) and copy them back to the \ubuntu\disks folder. If the entire \ubuntu\disks folder is missing, you'll likely find a dir0000.chk directory and within that the root.disk, swap.disk and empty \boot\grub folders. Copy this back to \ubuntu renaming the directory to disks.

If you're missing the root.disk but there is no file of that name, it may have been renamed chk0000.chk. Rename this to root.disk and copy back to \ubuntu\disks.

If the corruption was minor, then likely everything will work fine. If the corruption is major Windows may not even recover the root.disk at all.

Win7/Vista command line instructions
Hit the START key, enter CMD, then look above and right click on CMD.exe and select "Run as Administrator", as shown below. From Windows 8, type "CMD" on the Metro page, right click, and then look on the bottom for "Run as administrator.

Check for the hidden recovery directories: dir /a:h

Check each \found.??? directory:
C:\>cd \found.000
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/07/2011  02:02 PM    15,000,000,000 file0000.chk
               1 File(s) 15,000,000,000 bytes
               0 Dir(s)  222,258,069,504 bytes free

C:\found.000>move file0000.chk \ubuntu\disks\root.disk
        1 file(s) moved.

Or if the whole \ubuntu\disks folder is missing:
C:\>cd \found.000

 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/10/2012  04:51 PM    <DIR>          .
19/10/2012  04:51 PM    <DIR>          ..
19/07/2011  02:02 PM    <DIR>          dir0000.chk
               0 File(s)              0 bytes
               3 Dir(s)  222,258,069,504 bytes free

C:\found.000>dir dir0000.chk
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000\dir0000.chk

19/10/2012  04:51 PM    <DIR>          .
19/10/2012  04:51 PM    <DIR>          ..
24/02/2012  12:22 AM    <DIR>          boot
06/11/2012  09:28 AM    13,000,000,000 root.disk
15/11/2011  09:28 PM       268,435,456 swap.disk
               2 File(s) 13,268,435,456 bytes
               3 Dir(s)  127,904,968,704 bytes free

C:\>move dir0000.chk \ubuntu\disks
        1 dir(s) moved.

I hope this helps you to recover your files. Remember to backup important data on your Wubi install. There's no reason to install important personal files on a root.disk - you can access them easily on the /host partition.

Updated 2012-11-06: added some more screenshots, enhanced DOS commands