0

I did something really stupid. I apologize!! I just wanted to learn laravel framework and installed.

The bad time came to use "gulp" command in terminal.

Next what all happened I don't know. My sudo stopped working network(wifi, LAN, Bluetooth, USB) also stopped working. In the middle often my hard disk(/dev/sda1) automatically shows full. Yesterday when I start computer shows graphics error.. pressing Ctrl+Alt+F1 got terminal and accidentally typed rm -rf /var/*

Please help me to get my data back please please..

9
  • Boot from LiveUSB and copy your files.
    – Pilot6
    Jan 25, 2017 at 19:42
  • I'm a newbie to Ubuntu. How to achieve that.. would you please tell me the procedure. Jan 25, 2017 at 19:44
  • 1
    Download an Ubuntu ISO, burn it to a USB and boot from it.
    – Pilot6
    Jan 25, 2017 at 19:47
  • As I said in question, My USB is not working and are you saying about reinstall? If yes then how to achieve it please. I'm really sorry because I'm a newbie to Ubuntu :( Jan 25, 2017 at 19:54
  • 1
    General instructions for data recovery process: help.ubuntu.com/community/DataRecovery Jan 25, 2017 at 20:26

1 Answer 1

0

These are detailed steps for performing the first suggestion provided by Pilot6 in the comment section of your question.

Boot from a LiveUSB or LiveDVD

You will need the type of media you used to install Ubuntu the first time. Find this USB or DVD disk and boot to it. Once the system has booted choose the option that says Try Ubuntu.

Mount the partition where Ubuntu is installed.

You can find where Ubuntu is installed by running the Gnome Disk Utility. Type disks in the Ubuntu launch button and click on the app.

Now look for your installation partition by clicking on one of the items on the left. Your installation will be on the /dev/sda drive by default. So select the one that has /dev/sda in the title bar of the application's window.

Now look at the descriptions under the Volumes section. Find the one that has Ext4 in the descript. That will be your installation partition.

Run these commands, one by one, to mount and copy the /var directory from your Live Session to your system.

Open a Terminal by typing terminal in the Ubuntu Launch button. Click on the Terminal app.

Perform these steps in the black screen (the terminal).

1) $ sudo mount /dev/sda# /mnt
   (Replace the # with the number where you have identified as the Ext4 partition
   of your /dev/sda drive)
2) $ mkdir /mnt/var
3) $ sudo cp /var/* /mnt/var/
4) $ sudo umount /mnt

Now close the running apps and reboot. The system will prompt you to eject the live media.

8
  • I want to achieve it through liveusb. right now I'm having 16gb pendrive, 1tb hardisk, not working laptop which is having my deleted data. which file I have to download from net..tell me the procedure step by step please... Jan 26, 2017 at 17:04
  • @YanaShetty Ubuntu 16.04 LTS direct download link]. Download the ISO image and burn it to your pendrive. You'll have to burn it from the computer you're using to type your messages. Then after you burn the image to the Pendrive, boot your computer to that drive. By the way, do you remember where the USB/DVD is that you originally used for installing Ubuntu? If you can find that one, that is the one you can conveniently use. After you boot to the Pendrive, follow the steps in the answer. Jan 26, 2017 at 17:56
  • My laptop is Compaq 325( AMD processor).which one I have to download from releases.ubuntu.com/16.04.1 Jan 26, 2017 at 18:11
  • The first one in the list. Jan 26, 2017 at 18:14
  • Thank you☺ I'm downloading now and once I copied to my pendrive and inserted into PC and what is the next step.. before loading is there to press esc or something. Please help I'm newbie to Ubuntu and I lost my data😓😓 Jan 26, 2017 at 18:26

Not the answer you're looking for? Browse other questions tagged .