How do I recover documents from a broken Ubuntu installation?












6















I installed Ubuntu on a hard drive that had Windows XP installed so I could dual-boot the two operating systems. Everything was fine but now I can't boot into XP or Ubuntu. I had some important documents in the Ubuntu partition and the hard drive is still working, so how can I recover those files from a working Ubuntu installation? Where should I look for the broken Ubuntu installation?










share|improve this question

























  • Depends on how Ubuntu was installed. If it's on a dedicated partition, you could use a live CD/USB and copy the files over. However, if you installed Ubuntu inside Windows, I don't know the way.

    – mikewhatever
    Nov 9 '11 at 22:33











  • Yeah i installed ubuntu inside Windows and thats the problem.

    – Daniel Mesa
    Nov 10 '11 at 0:02











  • Then need to use in my answer ==PRepearing LiveCD/USB== & == A Recovering bootloader==

    – Kangarooo
    Nov 12 '11 at 14:27













  • Related: Recovering user files with a Live CD

    – Eliah Kagan
    Nov 4 '17 at 13:31
















6















I installed Ubuntu on a hard drive that had Windows XP installed so I could dual-boot the two operating systems. Everything was fine but now I can't boot into XP or Ubuntu. I had some important documents in the Ubuntu partition and the hard drive is still working, so how can I recover those files from a working Ubuntu installation? Where should I look for the broken Ubuntu installation?










share|improve this question

























  • Depends on how Ubuntu was installed. If it's on a dedicated partition, you could use a live CD/USB and copy the files over. However, if you installed Ubuntu inside Windows, I don't know the way.

    – mikewhatever
    Nov 9 '11 at 22:33











  • Yeah i installed ubuntu inside Windows and thats the problem.

    – Daniel Mesa
    Nov 10 '11 at 0:02











  • Then need to use in my answer ==PRepearing LiveCD/USB== & == A Recovering bootloader==

    – Kangarooo
    Nov 12 '11 at 14:27













  • Related: Recovering user files with a Live CD

    – Eliah Kagan
    Nov 4 '17 at 13:31














6












6








6








I installed Ubuntu on a hard drive that had Windows XP installed so I could dual-boot the two operating systems. Everything was fine but now I can't boot into XP or Ubuntu. I had some important documents in the Ubuntu partition and the hard drive is still working, so how can I recover those files from a working Ubuntu installation? Where should I look for the broken Ubuntu installation?










share|improve this question
















I installed Ubuntu on a hard drive that had Windows XP installed so I could dual-boot the two operating systems. Everything was fine but now I can't boot into XP or Ubuntu. I had some important documents in the Ubuntu partition and the hard drive is still working, so how can I recover those files from a working Ubuntu installation? Where should I look for the broken Ubuntu installation?







11.10 filesystem data-recovery






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 '11 at 23:50









Anonymous

8,34952731




8,34952731










asked Nov 9 '11 at 21:44









Daniel MesaDaniel Mesa

3112




3112













  • Depends on how Ubuntu was installed. If it's on a dedicated partition, you could use a live CD/USB and copy the files over. However, if you installed Ubuntu inside Windows, I don't know the way.

    – mikewhatever
    Nov 9 '11 at 22:33











  • Yeah i installed ubuntu inside Windows and thats the problem.

    – Daniel Mesa
    Nov 10 '11 at 0:02











  • Then need to use in my answer ==PRepearing LiveCD/USB== & == A Recovering bootloader==

    – Kangarooo
    Nov 12 '11 at 14:27













  • Related: Recovering user files with a Live CD

    – Eliah Kagan
    Nov 4 '17 at 13:31



















  • Depends on how Ubuntu was installed. If it's on a dedicated partition, you could use a live CD/USB and copy the files over. However, if you installed Ubuntu inside Windows, I don't know the way.

    – mikewhatever
    Nov 9 '11 at 22:33











  • Yeah i installed ubuntu inside Windows and thats the problem.

    – Daniel Mesa
    Nov 10 '11 at 0:02











  • Then need to use in my answer ==PRepearing LiveCD/USB== & == A Recovering bootloader==

    – Kangarooo
    Nov 12 '11 at 14:27













  • Related: Recovering user files with a Live CD

    – Eliah Kagan
    Nov 4 '17 at 13:31

















Depends on how Ubuntu was installed. If it's on a dedicated partition, you could use a live CD/USB and copy the files over. However, if you installed Ubuntu inside Windows, I don't know the way.

– mikewhatever
Nov 9 '11 at 22:33





Depends on how Ubuntu was installed. If it's on a dedicated partition, you could use a live CD/USB and copy the files over. However, if you installed Ubuntu inside Windows, I don't know the way.

– mikewhatever
Nov 9 '11 at 22:33













Yeah i installed ubuntu inside Windows and thats the problem.

– Daniel Mesa
Nov 10 '11 at 0:02





Yeah i installed ubuntu inside Windows and thats the problem.

– Daniel Mesa
Nov 10 '11 at 0:02













Then need to use in my answer ==PRepearing LiveCD/USB== & == A Recovering bootloader==

– Kangarooo
Nov 12 '11 at 14:27







Then need to use in my answer ==PRepearing LiveCD/USB== & == A Recovering bootloader==

– Kangarooo
Nov 12 '11 at 14:27















Related: Recovering user files with a Live CD

– Eliah Kagan
Nov 4 '17 at 13:31





Related: Recovering user files with a Live CD

– Eliah Kagan
Nov 4 '17 at 13:31










4 Answers
4






active

oldest

votes


















4














Go to another computer, simply download an actual Ubuntu image and make a bootable USB stick described on homepage from ubuntu.com. Boot from these USB stick and choose "Try Ubuntu". Now put a clean second USB stick or HDD into another USB port and save your documents from your computer HDD.



PS: It does not work, if you have encryption enabled by installation.






share|improve this answer
























  • I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

    – Daniel Mesa
    Nov 9 '11 at 23:00



















2














You might have somehow crashed the GRUB bootloader.



I'll explain how to recover, saving both systems, and also how to get files from in case recovery fails.



But for both you'll first need a live CD/USB



Preparing LiveCD/USB



From another computer make a Live CD or USB by simply following these steps.




  1. Download an Ubuntu image


  2. Write it to a CD or USB as described


  3. Boot from the live CD/USB on the problem computer. You may need to access the BIOS by pressing an F key (eg F2), Esc or Del and change boot order to prefer CD or USB.



Recovering bootloader





  1. In terminal execute



    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
    sudo apt-get install boot-repair
    boot-repair



  2. Press Recommended repair and when finished try booting your system from the hard disk again.



    See boot repair | Ubuntu help wiki




Copying files




  1. Mount the partition that contains /home/


  2. Copy your whole username folder to some other place, not on the hard disk or the live USB system. Ypu need to copy the whole directory rather than just the contents because it will contain also hidden files that include browser bookmarks and other settings you might want to keep for backup.







share|improve this answer

































    2














    My Ubuntu 16.04 crashed during file editing. After power cycle, it kept flopping between login password and reboot console printout. I inserted a bootable USB stick with Ubuntu 18.04 and chose "Try Ubuntu". The way to find where the old data/documents is



    Ctrl+Alt+T to open a terminal.



    Issue "lsblk" to see the partitions:



    ubuntu@ubuntu:~/Documents$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    ...
    sda 8:0 0 74.5G 0 disk
    ├─sda2 8:2 0 37.3G 0 part
    ├─sda5 8:5 0 3.7G 0 part
    ├─sda6 8:6 0 29.8G 0 part
    └─sda7 8:7 0 3.7G 0 part [SWAP]
    sdb 8:16 1 1.9G 0 disk
    └─sdb1 8:17 1 1.9G 0 part /cdrom
    sdc 8:32 1 2G 0 disk
    └─sdc1 8:33 1 2G 0 part


    or graphically by using
    ubuntu@ubuntu:~/Documents$ gparted



    From the size, you can tell the old data is either in /dev/sda2 or /dev/sda6.



    Make a directory sda2 under /media and mount /dev/sda2 at /media/sda2/ for sda2:



     ubuntu@ubuntu:/dev$ sudo mkdir /media/sda2
    ubuntu@ubuntu:/dev$ sudo mount /dev/sda2 /media/sda2
    ubuntu@ubuntu:/dev$ ls sda2
    Document


    Do the same thing for sda6 until you find the old data.



    ubuntu@ubuntu:/media$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    ...
    sda 8:0 0 74.5G 0 disk
    ├─sda2 8:2 0 37.3G 0 part /media/sda2
    ├─sda5 8:5 0 3.7G 0 part
    ├─sda6 8:6 0 29.8G 0 part /media/sda6


    Then you can tarball and zip the data with



    % tar -czvf oldData.tgz Document


    Saving the .tgz file to a locally inserted USB flash drive is not possible since Ubuntu 18.04 is not installed yet. So I used Firefox to upload it to Google Drive. From there, I downloaded it to my Windows PC. After unzip and extract, I found the unsaved data/files were indeed gone due to the crash, but the rest is safe. Now I can start to install Ubuntu 18.04 knowing that the old data has been saved.






    share|improve this answer

































      1














      Apparently, you can recover files from a wubi installation. It requires some command line work, but nothing too difficult. You'll need to boot from an Ubuntu live CD, and then run the following in a terminal window:



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


      Now, check the file browser, your wubi installation should be available there.



      In the third command, the x and y are most probably a and 1, which gives /dev/sda1. Make sure to adjust according to where the wubi installation is.



      Source: http://neosmart.net/forums/showthread.php?t=5004






      share|improve this answer
























      • not good idea to use time to install couse Ubuntu live session can be used with CD or USB

        – Kangarooo
        Nov 10 '11 at 2:42













      • What? What time are you talking about?

        – mikewhatever
        Nov 10 '11 at 20:00











      • 2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

        – Kangarooo
        Nov 12 '11 at 14:25











      • Are you high???

        – mikewhatever
        Nov 12 '11 at 14:42











      • No im am not high so youre alone on that..

        – Kangarooo
        Nov 12 '11 at 20:25











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f77666%2fhow-do-i-recover-documents-from-a-broken-ubuntu-installation%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      Go to another computer, simply download an actual Ubuntu image and make a bootable USB stick described on homepage from ubuntu.com. Boot from these USB stick and choose "Try Ubuntu". Now put a clean second USB stick or HDD into another USB port and save your documents from your computer HDD.



      PS: It does not work, if you have encryption enabled by installation.






      share|improve this answer
























      • I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

        – Daniel Mesa
        Nov 9 '11 at 23:00
















      4














      Go to another computer, simply download an actual Ubuntu image and make a bootable USB stick described on homepage from ubuntu.com. Boot from these USB stick and choose "Try Ubuntu". Now put a clean second USB stick or HDD into another USB port and save your documents from your computer HDD.



      PS: It does not work, if you have encryption enabled by installation.






      share|improve this answer
























      • I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

        – Daniel Mesa
        Nov 9 '11 at 23:00














      4












      4








      4







      Go to another computer, simply download an actual Ubuntu image and make a bootable USB stick described on homepage from ubuntu.com. Boot from these USB stick and choose "Try Ubuntu". Now put a clean second USB stick or HDD into another USB port and save your documents from your computer HDD.



      PS: It does not work, if you have encryption enabled by installation.






      share|improve this answer













      Go to another computer, simply download an actual Ubuntu image and make a bootable USB stick described on homepage from ubuntu.com. Boot from these USB stick and choose "Try Ubuntu". Now put a clean second USB stick or HDD into another USB port and save your documents from your computer HDD.



      PS: It does not work, if you have encryption enabled by installation.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 9 '11 at 22:46









      Steven Peter BeerSteven Peter Beer

      76847




      76847













      • I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

        – Daniel Mesa
        Nov 9 '11 at 23:00



















      • I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

        – Daniel Mesa
        Nov 9 '11 at 23:00

















      I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

      – Daniel Mesa
      Nov 9 '11 at 23:00





      I have done that, but i do not know where to search my old documents because there are no actual ubuntu folders like home/ i do not know how to visibilize those folders that use ubuntu's file system, not the ntfs one. P.S I'm new to ubuntu, so this may seem a stupid question

      – Daniel Mesa
      Nov 9 '11 at 23:00













      2














      You might have somehow crashed the GRUB bootloader.



      I'll explain how to recover, saving both systems, and also how to get files from in case recovery fails.



      But for both you'll first need a live CD/USB



      Preparing LiveCD/USB



      From another computer make a Live CD or USB by simply following these steps.




      1. Download an Ubuntu image


      2. Write it to a CD or USB as described


      3. Boot from the live CD/USB on the problem computer. You may need to access the BIOS by pressing an F key (eg F2), Esc or Del and change boot order to prefer CD or USB.



      Recovering bootloader





      1. In terminal execute



        sudo add-apt-repository ppa:yannubuntu/boot-repair
        sudo apt-get update
        sudo apt-get install boot-repair
        boot-repair



      2. Press Recommended repair and when finished try booting your system from the hard disk again.



        See boot repair | Ubuntu help wiki




      Copying files




      1. Mount the partition that contains /home/


      2. Copy your whole username folder to some other place, not on the hard disk or the live USB system. Ypu need to copy the whole directory rather than just the contents because it will contain also hidden files that include browser bookmarks and other settings you might want to keep for backup.







      share|improve this answer






























        2














        You might have somehow crashed the GRUB bootloader.



        I'll explain how to recover, saving both systems, and also how to get files from in case recovery fails.



        But for both you'll first need a live CD/USB



        Preparing LiveCD/USB



        From another computer make a Live CD or USB by simply following these steps.




        1. Download an Ubuntu image


        2. Write it to a CD or USB as described


        3. Boot from the live CD/USB on the problem computer. You may need to access the BIOS by pressing an F key (eg F2), Esc or Del and change boot order to prefer CD or USB.



        Recovering bootloader





        1. In terminal execute



          sudo add-apt-repository ppa:yannubuntu/boot-repair
          sudo apt-get update
          sudo apt-get install boot-repair
          boot-repair



        2. Press Recommended repair and when finished try booting your system from the hard disk again.



          See boot repair | Ubuntu help wiki




        Copying files




        1. Mount the partition that contains /home/


        2. Copy your whole username folder to some other place, not on the hard disk or the live USB system. Ypu need to copy the whole directory rather than just the contents because it will contain also hidden files that include browser bookmarks and other settings you might want to keep for backup.







        share|improve this answer




























          2












          2








          2







          You might have somehow crashed the GRUB bootloader.



          I'll explain how to recover, saving both systems, and also how to get files from in case recovery fails.



          But for both you'll first need a live CD/USB



          Preparing LiveCD/USB



          From another computer make a Live CD or USB by simply following these steps.




          1. Download an Ubuntu image


          2. Write it to a CD or USB as described


          3. Boot from the live CD/USB on the problem computer. You may need to access the BIOS by pressing an F key (eg F2), Esc or Del and change boot order to prefer CD or USB.



          Recovering bootloader





          1. In terminal execute



            sudo add-apt-repository ppa:yannubuntu/boot-repair
            sudo apt-get update
            sudo apt-get install boot-repair
            boot-repair



          2. Press Recommended repair and when finished try booting your system from the hard disk again.



            See boot repair | Ubuntu help wiki




          Copying files




          1. Mount the partition that contains /home/


          2. Copy your whole username folder to some other place, not on the hard disk or the live USB system. Ypu need to copy the whole directory rather than just the contents because it will contain also hidden files that include browser bookmarks and other settings you might want to keep for backup.







          share|improve this answer















          You might have somehow crashed the GRUB bootloader.



          I'll explain how to recover, saving both systems, and also how to get files from in case recovery fails.



          But for both you'll first need a live CD/USB



          Preparing LiveCD/USB



          From another computer make a Live CD or USB by simply following these steps.




          1. Download an Ubuntu image


          2. Write it to a CD or USB as described


          3. Boot from the live CD/USB on the problem computer. You may need to access the BIOS by pressing an F key (eg F2), Esc or Del and change boot order to prefer CD or USB.



          Recovering bootloader





          1. In terminal execute



            sudo add-apt-repository ppa:yannubuntu/boot-repair
            sudo apt-get update
            sudo apt-get install boot-repair
            boot-repair



          2. Press Recommended repair and when finished try booting your system from the hard disk again.



            See boot repair | Ubuntu help wiki




          Copying files




          1. Mount the partition that contains /home/


          2. Copy your whole username folder to some other place, not on the hard disk or the live USB system. Ypu need to copy the whole directory rather than just the contents because it will contain also hidden files that include browser bookmarks and other settings you might want to keep for backup.








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 13 '18 at 16:05









          Zanna

          50.7k13136241




          50.7k13136241










          answered Nov 10 '11 at 3:01









          KangaroooKangarooo

          2,91942234




          2,91942234























              2














              My Ubuntu 16.04 crashed during file editing. After power cycle, it kept flopping between login password and reboot console printout. I inserted a bootable USB stick with Ubuntu 18.04 and chose "Try Ubuntu". The way to find where the old data/documents is



              Ctrl+Alt+T to open a terminal.



              Issue "lsblk" to see the partitions:



              ubuntu@ubuntu:~/Documents$ lsblk
              NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
              ...
              sda 8:0 0 74.5G 0 disk
              ├─sda2 8:2 0 37.3G 0 part
              ├─sda5 8:5 0 3.7G 0 part
              ├─sda6 8:6 0 29.8G 0 part
              └─sda7 8:7 0 3.7G 0 part [SWAP]
              sdb 8:16 1 1.9G 0 disk
              └─sdb1 8:17 1 1.9G 0 part /cdrom
              sdc 8:32 1 2G 0 disk
              └─sdc1 8:33 1 2G 0 part


              or graphically by using
              ubuntu@ubuntu:~/Documents$ gparted



              From the size, you can tell the old data is either in /dev/sda2 or /dev/sda6.



              Make a directory sda2 under /media and mount /dev/sda2 at /media/sda2/ for sda2:



               ubuntu@ubuntu:/dev$ sudo mkdir /media/sda2
              ubuntu@ubuntu:/dev$ sudo mount /dev/sda2 /media/sda2
              ubuntu@ubuntu:/dev$ ls sda2
              Document


              Do the same thing for sda6 until you find the old data.



              ubuntu@ubuntu:/media$ lsblk
              NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
              ...
              sda 8:0 0 74.5G 0 disk
              ├─sda2 8:2 0 37.3G 0 part /media/sda2
              ├─sda5 8:5 0 3.7G 0 part
              ├─sda6 8:6 0 29.8G 0 part /media/sda6


              Then you can tarball and zip the data with



              % tar -czvf oldData.tgz Document


              Saving the .tgz file to a locally inserted USB flash drive is not possible since Ubuntu 18.04 is not installed yet. So I used Firefox to upload it to Google Drive. From there, I downloaded it to my Windows PC. After unzip and extract, I found the unsaved data/files were indeed gone due to the crash, but the rest is safe. Now I can start to install Ubuntu 18.04 knowing that the old data has been saved.






              share|improve this answer






























                2














                My Ubuntu 16.04 crashed during file editing. After power cycle, it kept flopping between login password and reboot console printout. I inserted a bootable USB stick with Ubuntu 18.04 and chose "Try Ubuntu". The way to find where the old data/documents is



                Ctrl+Alt+T to open a terminal.



                Issue "lsblk" to see the partitions:



                ubuntu@ubuntu:~/Documents$ lsblk
                NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                ...
                sda 8:0 0 74.5G 0 disk
                ├─sda2 8:2 0 37.3G 0 part
                ├─sda5 8:5 0 3.7G 0 part
                ├─sda6 8:6 0 29.8G 0 part
                └─sda7 8:7 0 3.7G 0 part [SWAP]
                sdb 8:16 1 1.9G 0 disk
                └─sdb1 8:17 1 1.9G 0 part /cdrom
                sdc 8:32 1 2G 0 disk
                └─sdc1 8:33 1 2G 0 part


                or graphically by using
                ubuntu@ubuntu:~/Documents$ gparted



                From the size, you can tell the old data is either in /dev/sda2 or /dev/sda6.



                Make a directory sda2 under /media and mount /dev/sda2 at /media/sda2/ for sda2:



                 ubuntu@ubuntu:/dev$ sudo mkdir /media/sda2
                ubuntu@ubuntu:/dev$ sudo mount /dev/sda2 /media/sda2
                ubuntu@ubuntu:/dev$ ls sda2
                Document


                Do the same thing for sda6 until you find the old data.



                ubuntu@ubuntu:/media$ lsblk
                NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                ...
                sda 8:0 0 74.5G 0 disk
                ├─sda2 8:2 0 37.3G 0 part /media/sda2
                ├─sda5 8:5 0 3.7G 0 part
                ├─sda6 8:6 0 29.8G 0 part /media/sda6


                Then you can tarball and zip the data with



                % tar -czvf oldData.tgz Document


                Saving the .tgz file to a locally inserted USB flash drive is not possible since Ubuntu 18.04 is not installed yet. So I used Firefox to upload it to Google Drive. From there, I downloaded it to my Windows PC. After unzip and extract, I found the unsaved data/files were indeed gone due to the crash, but the rest is safe. Now I can start to install Ubuntu 18.04 knowing that the old data has been saved.






                share|improve this answer




























                  2












                  2








                  2







                  My Ubuntu 16.04 crashed during file editing. After power cycle, it kept flopping between login password and reboot console printout. I inserted a bootable USB stick with Ubuntu 18.04 and chose "Try Ubuntu". The way to find where the old data/documents is



                  Ctrl+Alt+T to open a terminal.



                  Issue "lsblk" to see the partitions:



                  ubuntu@ubuntu:~/Documents$ lsblk
                  NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                  ...
                  sda 8:0 0 74.5G 0 disk
                  ├─sda2 8:2 0 37.3G 0 part
                  ├─sda5 8:5 0 3.7G 0 part
                  ├─sda6 8:6 0 29.8G 0 part
                  └─sda7 8:7 0 3.7G 0 part [SWAP]
                  sdb 8:16 1 1.9G 0 disk
                  └─sdb1 8:17 1 1.9G 0 part /cdrom
                  sdc 8:32 1 2G 0 disk
                  └─sdc1 8:33 1 2G 0 part


                  or graphically by using
                  ubuntu@ubuntu:~/Documents$ gparted



                  From the size, you can tell the old data is either in /dev/sda2 or /dev/sda6.



                  Make a directory sda2 under /media and mount /dev/sda2 at /media/sda2/ for sda2:



                   ubuntu@ubuntu:/dev$ sudo mkdir /media/sda2
                  ubuntu@ubuntu:/dev$ sudo mount /dev/sda2 /media/sda2
                  ubuntu@ubuntu:/dev$ ls sda2
                  Document


                  Do the same thing for sda6 until you find the old data.



                  ubuntu@ubuntu:/media$ lsblk
                  NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                  ...
                  sda 8:0 0 74.5G 0 disk
                  ├─sda2 8:2 0 37.3G 0 part /media/sda2
                  ├─sda5 8:5 0 3.7G 0 part
                  ├─sda6 8:6 0 29.8G 0 part /media/sda6


                  Then you can tarball and zip the data with



                  % tar -czvf oldData.tgz Document


                  Saving the .tgz file to a locally inserted USB flash drive is not possible since Ubuntu 18.04 is not installed yet. So I used Firefox to upload it to Google Drive. From there, I downloaded it to my Windows PC. After unzip and extract, I found the unsaved data/files were indeed gone due to the crash, but the rest is safe. Now I can start to install Ubuntu 18.04 knowing that the old data has been saved.






                  share|improve this answer















                  My Ubuntu 16.04 crashed during file editing. After power cycle, it kept flopping between login password and reboot console printout. I inserted a bootable USB stick with Ubuntu 18.04 and chose "Try Ubuntu". The way to find where the old data/documents is



                  Ctrl+Alt+T to open a terminal.



                  Issue "lsblk" to see the partitions:



                  ubuntu@ubuntu:~/Documents$ lsblk
                  NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                  ...
                  sda 8:0 0 74.5G 0 disk
                  ├─sda2 8:2 0 37.3G 0 part
                  ├─sda5 8:5 0 3.7G 0 part
                  ├─sda6 8:6 0 29.8G 0 part
                  └─sda7 8:7 0 3.7G 0 part [SWAP]
                  sdb 8:16 1 1.9G 0 disk
                  └─sdb1 8:17 1 1.9G 0 part /cdrom
                  sdc 8:32 1 2G 0 disk
                  └─sdc1 8:33 1 2G 0 part


                  or graphically by using
                  ubuntu@ubuntu:~/Documents$ gparted



                  From the size, you can tell the old data is either in /dev/sda2 or /dev/sda6.



                  Make a directory sda2 under /media and mount /dev/sda2 at /media/sda2/ for sda2:



                   ubuntu@ubuntu:/dev$ sudo mkdir /media/sda2
                  ubuntu@ubuntu:/dev$ sudo mount /dev/sda2 /media/sda2
                  ubuntu@ubuntu:/dev$ ls sda2
                  Document


                  Do the same thing for sda6 until you find the old data.



                  ubuntu@ubuntu:/media$ lsblk
                  NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                  ...
                  sda 8:0 0 74.5G 0 disk
                  ├─sda2 8:2 0 37.3G 0 part /media/sda2
                  ├─sda5 8:5 0 3.7G 0 part
                  ├─sda6 8:6 0 29.8G 0 part /media/sda6


                  Then you can tarball and zip the data with



                  % tar -czvf oldData.tgz Document


                  Saving the .tgz file to a locally inserted USB flash drive is not possible since Ubuntu 18.04 is not installed yet. So I used Firefox to upload it to Google Drive. From there, I downloaded it to my Windows PC. After unzip and extract, I found the unsaved data/files were indeed gone due to the crash, but the rest is safe. Now I can start to install Ubuntu 18.04 knowing that the old data has been saved.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 12 at 9:21









                  mature

                  2,0841728




                  2,0841728










                  answered Jan 29 at 7:45









                  user918908user918908

                  211




                  211























                      1














                      Apparently, you can recover files from a wubi installation. It requires some command line work, but nothing too difficult. You'll need to boot from an Ubuntu live CD, and then run the following in a terminal window:



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


                      Now, check the file browser, your wubi installation should be available there.



                      In the third command, the x and y are most probably a and 1, which gives /dev/sda1. Make sure to adjust according to where the wubi installation is.



                      Source: http://neosmart.net/forums/showthread.php?t=5004






                      share|improve this answer
























                      • not good idea to use time to install couse Ubuntu live session can be used with CD or USB

                        – Kangarooo
                        Nov 10 '11 at 2:42













                      • What? What time are you talking about?

                        – mikewhatever
                        Nov 10 '11 at 20:00











                      • 2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

                        – Kangarooo
                        Nov 12 '11 at 14:25











                      • Are you high???

                        – mikewhatever
                        Nov 12 '11 at 14:42











                      • No im am not high so youre alone on that..

                        – Kangarooo
                        Nov 12 '11 at 20:25
















                      1














                      Apparently, you can recover files from a wubi installation. It requires some command line work, but nothing too difficult. You'll need to boot from an Ubuntu live CD, and then run the following in a terminal window:



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


                      Now, check the file browser, your wubi installation should be available there.



                      In the third command, the x and y are most probably a and 1, which gives /dev/sda1. Make sure to adjust according to where the wubi installation is.



                      Source: http://neosmart.net/forums/showthread.php?t=5004






                      share|improve this answer
























                      • not good idea to use time to install couse Ubuntu live session can be used with CD or USB

                        – Kangarooo
                        Nov 10 '11 at 2:42













                      • What? What time are you talking about?

                        – mikewhatever
                        Nov 10 '11 at 20:00











                      • 2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

                        – Kangarooo
                        Nov 12 '11 at 14:25











                      • Are you high???

                        – mikewhatever
                        Nov 12 '11 at 14:42











                      • No im am not high so youre alone on that..

                        – Kangarooo
                        Nov 12 '11 at 20:25














                      1












                      1








                      1







                      Apparently, you can recover files from a wubi installation. It requires some command line work, but nothing too difficult. You'll need to boot from an Ubuntu live CD, and then run the following in a terminal window:



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


                      Now, check the file browser, your wubi installation should be available there.



                      In the third command, the x and y are most probably a and 1, which gives /dev/sda1. Make sure to adjust according to where the wubi installation is.



                      Source: http://neosmart.net/forums/showthread.php?t=5004






                      share|improve this answer













                      Apparently, you can recover files from a wubi installation. It requires some command line work, but nothing too difficult. You'll need to boot from an Ubuntu live CD, and then run the following in a terminal window:



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


                      Now, check the file browser, your wubi installation should be available there.



                      In the third command, the x and y are most probably a and 1, which gives /dev/sda1. Make sure to adjust according to where the wubi installation is.



                      Source: http://neosmart.net/forums/showthread.php?t=5004







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Nov 10 '11 at 0:59









                      mikewhatevermikewhatever

                      23.9k76986




                      23.9k76986













                      • not good idea to use time to install couse Ubuntu live session can be used with CD or USB

                        – Kangarooo
                        Nov 10 '11 at 2:42













                      • What? What time are you talking about?

                        – mikewhatever
                        Nov 10 '11 at 20:00











                      • 2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

                        – Kangarooo
                        Nov 12 '11 at 14:25











                      • Are you high???

                        – mikewhatever
                        Nov 12 '11 at 14:42











                      • No im am not high so youre alone on that..

                        – Kangarooo
                        Nov 12 '11 at 20:25



















                      • not good idea to use time to install couse Ubuntu live session can be used with CD or USB

                        – Kangarooo
                        Nov 10 '11 at 2:42













                      • What? What time are you talking about?

                        – mikewhatever
                        Nov 10 '11 at 20:00











                      • 2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

                        – Kangarooo
                        Nov 12 '11 at 14:25











                      • Are you high???

                        – mikewhatever
                        Nov 12 '11 at 14:42











                      • No im am not high so youre alone on that..

                        – Kangarooo
                        Nov 12 '11 at 20:25

















                      not good idea to use time to install couse Ubuntu live session can be used with CD or USB

                      – Kangarooo
                      Nov 10 '11 at 2:42







                      not good idea to use time to install couse Ubuntu live session can be used with CD or USB

                      – Kangarooo
                      Nov 10 '11 at 2:42















                      What? What time are you talking about?

                      – mikewhatever
                      Nov 10 '11 at 20:00





                      What? What time are you talking about?

                      – mikewhatever
                      Nov 10 '11 at 20:00













                      2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

                      – Kangarooo
                      Nov 12 '11 at 14:25





                      2 days ago. Check ubuntu.com/download/ubuntu/download there u can see that u can use USB Live without intallation. And wubi is slow & installed. You dont need to install OS to recover files and u dont need to install in Windows partition to make slow system in system- like Inception.

                      – Kangarooo
                      Nov 12 '11 at 14:25













                      Are you high???

                      – mikewhatever
                      Nov 12 '11 at 14:42





                      Are you high???

                      – mikewhatever
                      Nov 12 '11 at 14:42













                      No im am not high so youre alone on that..

                      – Kangarooo
                      Nov 12 '11 at 20:25





                      No im am not high so youre alone on that..

                      – Kangarooo
                      Nov 12 '11 at 20:25


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f77666%2fhow-do-i-recover-documents-from-a-broken-ubuntu-installation%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      Touch on Surface Book