0

After using GParted my files are still there, but the filenames disappeared. My files are not deleted, the problem is my file names changed and the files are still there in the lost+found folder, and I can't install grub because I can't mount /dev/sda6.

  1. no grub
  2. no data

enter image description here

enter image description here

enter image description here

Output of gparted:

Parted 0.19.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2
Check and repair file system (ext4) on /dev/sda6  10:20:41    ( SUCCESS )

calibrate /dev/sda6  00:00:00    ( SUCCESS )

path: /dev/sda6
start: 571932672
end: 958765055
size: 386832384 (184.46 GiB)
check file system on /dev/sda6 for errors and (if possible) fix them  10:20:34    ( SUCCESS )

e2fsck -f -y -v -C 0 /dev/sda6

How can I recover the missing filenames?

karel
  • 114,770

1 Answers1

1

You can't find the original name and location of a file in /lost+found because that's what lost+found is about: it's where fsck puts fragments of files that it hasn't been able to attach anywhere in the directory tree. If the location was known, fsck would have left the file where it was meant to be.

It's theoretically possible that fsck could have only partial information, such as the file name but not the directory location, but that doesn't happen with typical filesystems.

You may be able to find clues in the file itself. The file command will at least tell you what kind of file it is (if it recognizes it). For more information about the file command, open the terminal and type man file Some files carry additional information inside; for example JPEG and TIFF images may contain data, MP3 files may contain tags, etc.source

Even though you can see the files from lost+found, the filenames are lost and some of the files may be fragments of files or damaged files, interacting with the lost+found folder directly is not the best way to recover them. It's better to restore whatever missing files that you have backed up from their backups or else treat the files in lost+found as deleted files and try to recover them all together with their filenames using a recovery tool.

Try to recover the lost files with testdisk from the default Ubuntu repositories, and maybe you will be able get back the lost files and the original names of the files and folders too. First make a note of the partitions on your hard drive, so that you know which partition contains the missing files. Attach an external drive for storing the recovered data if you don't have another free partition to work with, and start testdisk from the terminal by typing testdisk . You will be presented with a series of menus that guide you step-by-step through the recovery process. Some of the menus have a Return to disk selection to return back to the first step if you think you may have made a mistake.

Credit goes to Gilles for the quoted text block.

karel
  • 114,770
  • no i used gparted check file ? – user591582 Sep 06 '16 at 22:52
  • ok i will try :) – user591582 Sep 06 '16 at 22:54
  • in my file i found the all file but different name ?? – user591582 Sep 06 '16 at 23:20
  • testisk not help ? – user591582 Sep 07 '16 at 01:43
  • my file its not delete the problem is my file change named and still there in lost&found ?? and i cant install grub becoz i cant mount sda – user591582 Sep 07 '16 at 01:59
  • 1
    The "Check" operation in Gparted does mostly the same thing as "fsck". It may also do other things, but it should not destroy anything. If the filesystem was corrupt for any reason fsck and Check moves lost files to "lost+found". After completion Check offers a detailed report. Did you notice something there, or did you save it? – David Andersson Sep 07 '16 at 06:05
  • 1
    GParted 0.19.0 --enable-libparted-dmraid --enable-online-resize

    Libparted 3.2 Check and repair file system (ext4) on /dev/sda6 10:20:41 ( SUCCESS )

    calibrate /dev/sda6 00:00:00 ( SUCCESS )

    path: /dev/sda6 start: 571932672 end: 958765055 size: 386832384 (184.46 GiB) check file system on /dev/sda6 for errors and (if possible) fix them 10:20:34 ( SUCCESS )

    e2fsck -f -y -v -C 0 /dev/sda6

    – user591582 Sep 07 '16 at 12:06
  • I asked the moderators to create a chatroom for this question where you can post unlimited comments and links to uploaded screenshots so that I can embed them as images. – karel Sep 07 '16 at 14:11
  • 1
    yes good idea one vote :) – user591582 Sep 07 '16 at 14:15
  • output gparted http://pastebin.com/Ki3zr26v – user591582 Sep 07 '16 at 14:34