Skip to content

Instantly share code, notes, and snippets.

@alejandro
Created September 2, 2011 19:55
Show Gist options
  • Save alejandro/1189708 to your computer and use it in GitHub Desktop.
Save alejandro/1189708 to your computer and use it in GitHub Desktop.
How-To Recover Files from failed Wubi with LiveCD (.disk files)

Boot your computer, enter your BIOS by pressing the key it tells you to press at the first splash screen you come to at startup, put the CD/DVD drive first in the boot sequence, insert your LiveCD, then save the changes, and exit your BIOS. Your computer should now boot from the CD. In the Ubuntu setup program, select the preferred language you use, then select the "Try Ubuntu with No Change To My Computer" option. Once at the Ubuntu desktop, in a Live session, open up Applications->Accessories>Terminal.

Run:

  • % sudo fdisk -l
  • % sudo mkdir /win
  • % sudo mount /dev/sdxy /win
  • % sudo mkdir /vdisk
  • % sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk

where the "x" and the "y" in "sdxy" is replaced with the correct HDD letter (starting at a of course), and the correct partition number (starting at 1), of the Windows partition your Wubi install is on. The first command will have given you the location. Once running those commands, open up Places>Computer>Filesystem>vdisk, and you should find the contents of your root.disk in there. Now you can backup your data to external media, and reinstall Ubuntu with Wubi if you like.

You can also try running the sudo fsck /win/ubuntu/disks/root.disk command to fix any filesystem errors that may be interfering with the boot, if that's the problem.

Hope it helps.

@alejandro
Copy link
Author

From this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment