I managed to create an image of a 1000 GB ext4 partition on a dying HDD using ddrescue. The image is almost complete: only an area of about ~34 MB could not be read surprisingly close to the &quot;middle&quot; of the disk: 498396 MB - 498430 MB. I can mount the image, the filesystem is clean and I can see and open my files. Since the partition was almost full, I am curious which files' contents were affected and thus damaged/lost due to the unreadable area. In other words, I want to get the list of files that are physically located entirely or partially in this area. I would prefer a solution which uses basic Linux commands and utilities that can be found in a common rescue environment (I'm using UBCD right now for this), but a computer running Ubuntu Server with internet connection is also available and I can mount the image there if additional packages are needed to do this.
122359
May you have ever used filesystem defragmentation tools (like Norton SpeedDisk or Piriform Defraggler) on Windows, you have probably seen such a diagram:    It displays a filesystem sectors map, painting (as for this particular example) sectors (sets of sectors actually, to fit the whole partition in the screen) occupied by non-fragmented (contiguous) files in blue, the opposite in red and free sectors in white (and some more colours for some more particular cases which can happen to be of interest). You can click on a "sector" and see what particular files "live" there.  Is there such a visualization tool for Linux?
36855
Yesterday, my laptop caught a virus which caused massive damage. Since them, I have been trying to recover important files before reformatting my computer, a task the virus has not made easy.   Restoration points predating the attack have been deleted.  Most of my folders show empty.  My Start menu is essentially empty, with the exception of Trillian and Mirror's Edge. The same goes for my Desktop, which only has programs which were installed after the attack.  Searching for files through my computer is pretty much useless, as it only rarely brings up anything. I suspect most of my files have not been deleted. While my folders show empty, uTorrent still does display them and I can open them from here. Unfortunately, when I select Open Containing Folder, the folder still shows as completely empty even if I'm currently watching a video from that very folder. Further adding evidence to the not-deleted-just-missing theory, the data recovery software I'm using (Restoration) cannot find only find an handful of the missing files.   If they were deleted, I could do a forensic recovery to get them back but since they're probably still somewhere on my computer, just out out of my reach, I can't find them.   Under those circumstances, is there a way I can recover those files?
7065
I was trying to resize my EXT4 partition and something went wrong. I lost it. The space in once consumed is now being represented as Unallocated. How do I recover the partition?
64238
I only have access to the server via a terminal and I can't use graphical tools such as GParted! I want to create a new partition from a part of the root (about 768mb) for swap.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda         20G  1.3G   18G   7% / udev             10M     0   10M   0% /dev tmpfs           199M  4.9M  194M   3% /run tmpfs           100M   12K  100M   1% /run/user tmpfs           5.0M  4.0K  5.0M   1% /run/lock
73657
After I used dd to make a USB drive from an Ubuntu ISO, I am unable to format it for normal use. I ran: sudo dd if=&quot;ubuntu-16.04-desktop-amd64.iso&quot; of=&quot;/dev/sdb&quot; bs=4M  In order to create a bootable USB drive. However, after I was done with it, I wanted to format it as FAT32 and use it like a normal USB drive. No problem, should be easy, right? WRONG. I have tried:  Using the included Disks application to format it. It threw an error about corrupt GPT tables and wouldn't give me an override option. Using Gparted the erase the current partition table and write a new MBR table [completed successfully] After that I created a FAT32 partition spanning the entire volume, and remounted. [Showed up in Files, good so far] Attempted to copy a file to it. It thre an error saying the medium was read-only. Erased the partition table again in Gparted and this time created an NTFS partition spanning the entire disk. [Same RO error when attempting to copy a file onto it] Repeated the procedure trying this time with EXT4 [Same RO error] Repeated procedure trying a GTP table instead of an MBR table. {Same error]  Finally, I tried running: sudo hdparm -r0 /dev/sdb  And remounted. Still the same error. Keep in mind that I remounted it after formatting it each time. I am at a total loss. Has dd bricked my USB drive?
9721
I was installing ubuntu 12.04 on my system. There were 4 partitions on my system and I selected one of the four partition for the installation and chose the option of resizing the partition. Initially my partition was of size 100+GB and i created another partition out of it of size 15GB (EXT4). Now the moment I changed this partition structure my original partition got lost along with its data and I am left with 50GB partition and 50GB unallocated free space.   Now the data that I have lost is meant a lot to me and I want to recover that data. So is there any way I can recover it? And I haven't checked "format" option while resizing the partition.
69470
I created an ext4 partition to back-up my files to, and partitioned it for 102GB in Gparted using a live USB. After I booted into Ubuntu, I opened Disk Utility, and it said that the partition was actually 108GB. Confused, I opened the mounted partition in Nautilus, and it said the partition was only 98GB.  Which is correct? Did I partition it wrong?
46123
Using Ubuntu 11.10, I accidentally deleted a file that was approximately 700 MB. I tried to find it in the in following locations, but couldn't:  /home/user/.local/share /home/user/ &lt;-- there was no folder .Trash /home/user/Desktop/ &lt;-- there was no folder .Trash   So where did .Trash go in Ubuntu 11.10 onward? I use the Gnome environment.
33874
Note: While I agree that this question basically is a duplicate of the above question, I feel @alienth's answer (below) is more concise, so I suggest you take a look at it before going to the other question.  I periodically backup/image/clone my entire ubuntu system drive to another drive with:  dd if=/dev/sda of=/media/disk1/backup.iso   It works great when I need to restore the drive after an experiment, drive failure, etc.  However I'd now like to mount a partition from within that .iso (i.e. what would have been /dev/sda1 when I was dd'ing the drive).  If I'd backed up with:  dd if=/dev/sda1 of=/media/disk1/backup.iso   then the .iso would be easily mountable using ubuntu's mount volume utility.  But the utility doesn't work for an iso of the entire drive.  Is there a way to just mount sda1 from the original iso?
11526
Yesterday I decided to upgrade my laptop hard drive to an SSD. I was previously running Ubuntu 14.04 on the HDD that came with it. I have installed Ubuntu 14.10 on the SSD.  I would like to mount the old HDD so that I can copy over all my files. So I purchased an enclosure that lets me treat it like an external USB drive. I put the HDD into the enclosure and plugged it in. It is detected and it sees all of the volumes. But it only mounts the boot volume for read/write.  The HDD is 750GB and the SSD is 120GB. When I inspect it in the "Disks" utility I see both hard drives and can easily tell the difference between the two. When I inspect the HDD I see: Partition 1 Ext2 (boot volume), Extended Partition 2, and Partition 5 LVM2 PV.  So clearly it can see the volumes as well. It reports that the disk is ok but has one bad sector. The drive is not encrypted. I am not sure why it shows two volumes of the same size. Probably has to do with it being an LVM volume.  How do I get it to let me read the files from my old installation of Ubuntu?  $ sudo fdisk -l Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x7f79a18e  Device     Boot  Start       End   Sectors   Size Id Type /dev/sda1  *      2048    499711    497664   243M 83 Linux /dev/sda2       501758 468860927 468359170 223.3G  5 Extended /dev/sda5       501760 468860927 468359168 223.3G 8e Linux LVM  Disk /dev/mapper/ubuntu--vg-root: 215.6 GiB, 231479443456 bytes, 452108288 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/ubuntu--vg-swap_1: 7.8 GiB, 8317304832 bytes, 16244736 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x0004f632  Device     Boot  Start        End    Sectors  Size Id Type /dev/sdb1  *      2048     499711     497664  243M 83 Linux /dev/sdb2       501758 1250263039 1249761282  596G  5 Extended /dev/sdb5       501760 1250263039 1249761280  596G 8e Linux LVM
52152
I recently wiped my computer to have 14.10 as my only OS. It has 160 GB of storage. That was a month ago. Now, I keep getting prompts that the storage is almost full. And when I look it says I only have 543 MB free. How is this possible? I haven't torrented any large files. I do have Variety to autodownload wallpapers and not erase though.  Filesystem Size Used Avail Use% Mounted on  /dev/sda1  146G  138G  554M  100%  /  none 4.0K 0 4.0K 0% /sys/fs/cgroup  udev 742M 4.0K 742M 1% /dev  tmpfs 151M 1.1M 150M 1% /run  none 5.0M 4.0K 5.0M 1% /run/lock  none 752M 540K 751M 1% /run/shm  none 100M 80K 100M 1% /run/user –  er –
85798
Well, I have accidentally deleted my Ubuntu drive. I just want to recover all the contents of /home.   Is there a way to do it? I referred to , where I need to specify the extensions of files. And in my case, I don't know actual extensions. So, is there any utility which can let me recover my /home folder alone?  I have not even formatted that drive or touched it at all. So no write has been done on that drive.  If you have suggestions on how to recover, please tell me.
16720
It seems like to deleted too much files by rm -r and now I have the error of "the system is running a low-graphic mode" in Ubuntu and I have to work in Windows because of that.  However I can load it in recovery mode. I need to copy the files from Downloads folder to a flash drive. Downloads folder has them as I can see by ls command.   When I plug in a flash drive, there will be some messages saying that everything is ok (as I understood) and it's plugged. But when I go to /media/my_name and do ls then I don't see anything. I don't see anything in /run/media/my_name either(I'm not sure if should though).  I can't connect to the Internet for some reason. Ubuntu was installed by wubi.exe file.  How do I save the content of my Downloads folder to a flash drive?
57263
I am trying to perform a recovery operation on a btrfs image file that I have extracted using  # dd if=/dev/sda1 of=/mnt/sda1.img   The file seems to be properly extracted:  $ file sda1.img  sda1.img: DOS/MBR boot sector   Reading it with parted is a bit opaque though  $ sudo parted sda1.img GNU Parted 3.2 Using /run/media/robert/exthdd2/sda1.img Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p                                                                 Model:  (file) Disk /run/media/robert/exthdd2/sda1.img: 240GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:   Number  Start  End  Size  Type  File system  Flags   Trying to mount it results in an errors  $ sudo mount -o loop -t btrfs sda1.img /mnt/ mount: mount /dev/loop0 on /mnt failed: Operation not supported   However, I can run a btrfs check on the image file, so it's not broken ...  What can I do to mount such an image file?
88969
An external 3½" HDD seems to be in danger of failing — it's making .  I've acquired a replacement drive, and want to know the best strategy to get the data off of the dubious drive with the best chance of saving as much as possible.  There are some directories that are more important than others.  However, I'm guessing that picking and choosing directories is going to reduce my chances of saving the whole thing.  I would also have to mount it, dump a file listing, and then unmount it in order to be able to effectively prioritize directories.  Adding in the fact that it's time-consuming to do this, I'm leaning away from this approach.  I've considered just using dd, but I'm not sure how it would handle read errors or other problems that might prevent only certain parts of the data from being rescued, or which could be overcome with some retries, but not so many that they endanger other parts of the drive from being saved.  I guess ideally it would do a single pass to get as much as possible and then go back to retry anything that was missed due to errors.  Is it possible that copying more slowly — e.g. pausing every x MB/GB — would be better than just running the operation full tilt, for example to avoid any overheating issues?  For the "where is your backup" crowd: this actually is my backup drive, but it also contains some non-critical and bulky stuff, like music, that aren't backups, i.e. aren't backed up.  The drive has not exhibited any clear signs of failure other than this somewhat ominous sound.  I did have to fsck a few errors recently — orphaned inodes, incorrect free blocks/inodes counts, inode bitmap differences, zero dtime on deleted inodes; about 20 errors in all.  The filesystem of the partition is ext3.
105327
I have one hard drive. It's partitioned into 4 partitions, one of them is encrypted by Windows 7 Bitlocker, then I used Acronis Disk Director to merge both partitions during the process PC power off now the encrypted partition and when I try to enter the partition I have a message to format it, the other partition seems to contain 20 MB but when I open it I found nothing.  all data in this partition is so important to me , so please if anyone can help me recover my data I will be thankful
33464
I'm an idiot, I was writing an image to a USB drive using dd when instead of typing /dev/sdb I typed /dev/sdd and wrote the 135mb image to my 750gb External Hardrive full of files. Is there ANY possibility of recovering the files or did dd completely zero out the drive? Please help, as this is one of the lowest points of my life EVER.  dd finished writing the 135mb image in 5 seconds, so I didn't have a chance to stop it. By the time I knew what happened to was too late. The command was as follows:   sudo dd if=generic.img of=/dev/sdd bs=1M   EDIT2: The External Harddrive's filesystem was FAT32(I've had the drive for awhile and FAT32 was the most Universal FS at the time). I also have a 2TB drive I just got which I was planning on moving most of the files to from the 750gb, If needed I can use it to transfer the Recovered files to.