Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've bricked my Ubuntu Wubi installation and as a result I can't get to the log-in screen. The computer sits at a blank, off-black (that kinda deep red/brown) screen after I've selected which Kernel to boot.

Is there any way I can install a fresh copy of Ubuntu via Wubi and then mount the old image?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Ideally you'd use a live CD - since you might be able to repair the current Wubi install. If you need data off it you could also try ext2read, which gives read-only access to the root.disk from Windows.

If you decide to access via a new Wubi install, it's critical to copy the *.disk files outside the \ubuntu directory before installing, since the first step of the Wubi install is to remove any existing install - and that deletes everything. Normally (on NTFS) there is only the root.disk that you care about, but if you install on a FAT32 partition or created a separate virtual disk for /home you can have others.

Let's say you moved (quicker than copy) the root.disk to \ubuntubackup\root.disk. Then when you install a fresh Wubi on the same 'drive', you can mount the old one as follows:

sudo mount -o loop /host/ubuntubackup/root.disk /mnt

Then you can use nautilus (or some other file browser) to view the files e.g. from a command prompt you could enter: nautilus /mnt/home

Attempting repairs

Wubi problems are often caused by hard reboots, perhaps after an apparent freeze. Forced shutdowns can damage any filesystem, but Wubi is more sensitive since it's whole partition is virtual, the root.disk. The steps to fix are:

  • Run chkdsk /f (or /r) from Windows. The corruption can be on NTFS and/or on the ext3/4 filesystem within the root.disk. In your case, you get past the grub menu, so it's probably only the ext3/4 filesystem, but I might run chkdsk anyway.
  • After chkdsk check that the root.disk is still there. This may sound strange, but Windows will sometimes move files it repairs to a hidden \found.000 directory. It may rename the root.disk to chk0000.chk so look for it by size (5-30GB). See this for more info.
  • Now run fsck on the root.disk. You'll need to boot an Ubuntu CD or USB for this. Then mount the host NTFS partition. E.g. if your root.disk is on /dev/sda3:

    sudo mount /dev/sda3 /mnt

    sudo fsck /mnt/ubuntu/disks/root.disk

Other possibilities

  • You could try booting an older kernel.

  • Boot in recovery mode.

  • Check there's enough free space to boot (by mounting the root.disk from the live CD and then freeing up space if required, or resizing on the fly).

share|improve this answer
    
Thanks for the tip. As an aside, do you have any links to diagnosing why it won't boot? –  Greg B May 3 '12 at 7:16
    
That depends on how it broke in the first place, but I'll add some general steps to my post above. –  bcbc May 3 '12 at 7:20
    
I've recently seen a post on problems booting after updating Oneiric kernels. So make sure you check the older kernels. If you don't see the grub menu at boot time, hold down the SHIFT key immediately after selecting Ubuntu from the Windows Boot Manager. Then you can look under Previous Linux Versions for older kernels. –  bcbc May 3 '12 at 19:13
add comment

You could possibly use wubi. Boot into the fresh Ubuntu and click 'Try Ubuntu' then you might be able to mount the old Ubuntu. I'm not sure you could boot into the old image though. but if you mount the old system you could possibly backup some files if you wanted.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.