How-to: Recover files from Wubi install with LiveCD

Discussion in 'General PC Help Center' started by Coolname007, Nov 12, 2009.

Thread Status:
Not open for further replies.
  1. Coolname007

    Coolname007 New Member

    Joined:
    Dec 15, 2008
    Messages:
    2,903
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Nowhere
    For those of you with Wubi problems, here's how to mount your root.disk, and recover your files using a LiveCD:

    1. 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.
    2. Your computer should now boot from the CD.
    3. In the Ubuntu setup program, select the preferred language you use, then select the "Try Ubuntu with No Change To My Computer" option.
    4. Once at the Ubuntu desktop, in a Live session, open up Applications->Accessories>Terminal.
    5. Now run:
    Code:
    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
    Code:
    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.
     
  2. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    Wlecome back, you missed your [thread=5527]BD thread[/thread] BTW :smile:
     
  3. swethakarima

    swethakarima New Member

    Joined:
    Feb 26, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    i am unable to recover my files in ubuntu

    sudo fdisk -l
    sudo mkdir /win
    sudo mount /dev/sda1 /win
    sudo mkdir /vdisk
    sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk
    /win/ubuntu/disks/root.disk no such file or directory found

    Addendum:

    sudo fdisk -l

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xeb1710f3

    Device Boot Start End Blocks Id System
    /dev/sda1 1 5 40131 de Dell Utility
    /dev/sda2 6 1918 15360000 7 HPFS/NTFS
    Partition 2 does not end on cylinder boundary.
    /dev/sda3 * 1918 11924 80373588 7 HPFS/NTFS
    ubuntu@ubuntu:~$ sudo mkdir /win
    ubuntu@ubuntu:~$ sudo mount /dev/sda1 /win
    ubuntu@ubuntu:~$ mk dir /vdisk
    bash: mk: command not found
    ubuntu@ubuntu:~$ mkdir /vdisk
    mkdir: cannot create directory `/vdisk': Permission denied
    ubuntu@ubuntu:~$ sudo mkdir /vdisk
    ubuntu@ubuntu:~$ sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk
    /win/ubuntu/disks/root.disk: No such file or directory
    ubuntu@ubuntu:~$ sudo fsck /win/ubuntu/disks/root.disk
    fsck 1.41.3 (12-Oct-2008)
    e2fsck 1.41.3 (12-Oct-2008)
    fsck.ext2: No such file or directory while trying to open /win/ubuntu/disks/root.disk

    The superblock could not be read or does not describe a correct ext2
    filesystem. If the device is valid and it really contains an ext2
    filesystem (and not swap or ufs or something else), then the superblock
    is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
     
    Last edited: Feb 26, 2010
  4. Coolname007

    Coolname007 New Member

    Joined:
    Dec 15, 2008
    Messages:
    2,903
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Nowhere
    Hello Swetha.
    As you can see by the bolded line, sda1 is not the correct partition to mount. Its a Dell Utility partition. You need to enter the id of the partition you have installed Wubi to. Try sda3, and then if that doesn't work, sda2.
     
  5. meatwad513

    meatwad513 New Member

    Joined:
    Mar 18, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Lifesaver

    You are a MIRACLE sent from above for posting this, thanks so much. I'm a PC tech and I was cleaning off a flash drive that had been infected with that lil win32:grinning:elf a-hole, so I was cleaning it out by copying my whole flash drive to my Wubi partition, then running Avast on the files, as well as MBAM and SAS through Wine. Well halfway through copying the stuff back after getting clean, Ubuntu went kapooey. It wouldn't boot back in after a restart, but this right here got me up and running again.

    So, thanks so much! My stuff is clean and back on my flash drive. It was all expendable stuff (I use Dropbox for mission-critical stuff) but there was just a sheer amount of stuff that I would've preferred not to re-download all over again. If I could even find them! (portable apps, etc.)
     
  6. Coolname007

    Coolname007 New Member

    Joined:
    Dec 15, 2008
    Messages:
    2,903
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Nowhere
    Glad you found my tutorial useful. :smile:
     
  7. Haralampos

    Haralampos New Member

    Joined:
    Feb 5, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Problem with Dual Boot Ubuntu Wubi

    Hello I have a problem which is i installed UBUNTU 12.04 with Wubi, but know It doesn't begin

    I get a magenta screen and it stops. I have booted from a USB with Wubi and works fine.

    BUT I can't find my old files.

    I ve tried your steps but It doesn't find any sda1 only sdb1,sdb2,sdb3.

    Could you please help me?

    Where are my files?

    Also I don't find these files through Windows.
     
  8. Coolname007

    Coolname007 New Member

    Joined:
    Dec 15, 2008
    Messages:
    2,903
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Nowhere
    Hello Hara...
    As mentioned in post #1 in this thread, you need to specify the correct hard drive and partition numbers corresponding to those of your Windows partition which hosts Wubi-installed Ubuntu.
    Obviously, in your case, sda1 is not correct.
    The easiest way to figure that out is by typing (and pressing Enter after):

    Code:
    sudo fdisk -l
    
    in your Ubuntu command-line Terminal from your Ubuntu installation CD. This will print a list of the detected hard drives, and the partitions/volumes of each hard drive in your system with the sdxy syntax.
    Your Windows partition will likely have an NTFS filesystem, which means it will show up in the fdisk output with "HPFS/NTFS" at the end of the line for that one. Now, let me explain how fdisk numbers
    hard drives and partitions:

    Hard drives (and these will follow the same order setup in your BIOS) are counted beginning at the letter 'a', then 'b', and 'c', and so forth, in alphabetical order.
    Partitions of hard drives are numbered starting at 1, and numbered according to the MBR partition table of the respective hard drive. Normally, the MBR partition
    table will contain partition entries corresponding to the same order the partitions exist physically on the hard disk, but it doesn't have to. Sometimes, one may edit the
    order with a 3rd party boot management program, which means they can be in any order at any time. It just depends on how you have your system setup. With that
    being said, basically fdisk provides a way to tell the way Ubuntu is seeing the system, so you can then figure out how to tell Ubuntu (or the Live version of it, anyway)
    to mount your Windows partition, so you can then access it, and get at the files stored inside of your root.disk, which is basically a virtual (i.e. fake) hard drive that is in
    reality a file stored on your Windows partition. But because Windows can't access what's inside that file, this requires using Ubuntu's LiveCD to access it when you can't boot
    into Wubi-installed Ubuntu.

    Now, I'm guessing since, you mentioned "sdb1, sdb2, and sdb3", you have at least 2 hard drives in your system, and possibly multiple NTFS partitions. So, you probably can't use
    only the filesystem in your case to easily determine which id is correct for your Windows host partition for your Wubi Ubuntu. So, in your case, I would suggest posting a screenshot
    of your Disk Management screen from Windows, to give me an idea of what your system looks like from Windows point of view, in addition to the fdisk command's (mentioned above) output.
    I should then be able to surmise correctly, what Ubuntu is calling your Windows partition.

    Cheers. :grinning:
     
    Last edited: Feb 7, 2013
  9. asianmartt

    asianmartt New Member

    Joined:
    Jul 1, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Boot your PC, enter your BIOS by squeezing the key it instructs you to squeeze at the first sprinkle screen you come to at startup, put the CD/DVD drive first in the boot grouping, embed your LiveCD, then spare the progressions, and way out your BIOS. Your PC ought to now boot from the CD. In the Ubuntu setup project, select the favored dialect you utilize, then select the "Attempt Ubuntu with No Change To My Computer" alternative. 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 circle/win/ubuntu/circles/root.disk/vdisk

    where the "x" and the "y" in "sdxy" is supplanted with the right HDD letter (beginning at an obviously), and the right segment number (beginning at 1), of the Windows parcel your Wubi introduce is on. The primary summon will have given you the area. When running those summons, open up Places>Computer>Filesystem>vdisk, and you ought to discover the substance of your root.disk in there. Presently you can reinforcement your information to outside media, and reinstall Ubuntu with Wubi on the off chance that you like.

    You can likewise take a stab at running the sudo fsck/win/ubuntu/circles/root.disk charge to alter any filesystem mistakes that may be meddling with the boot, if that is the issue.

    Trust it makes a difference.

    Proprietor

    alejandro remarked on Sep 3, 2011

    From this
     
  10. Ex_Brit

    Ex_Brit Moderator Staff Member

    Joined:
    Jun 19, 2006
    Messages:
    3,775
    Likes Received:
    15
    Trophy Points:
    38
    Gender:
    Male
    Occupation:
    Air Canada (Rtrd: 2001)
    Location:
    Toronto
    As this thread is very old I am locking it.
     
Thread Status:
Not open for further replies.

Share This Page