date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,515,038,215,000
I'm trying to use GNU ddrescue to recover raw data from a failing SSD. System is Debian Stretch. Thus far, I have this info out of it: dmesg [Sun Sep 8 15:04:20 2019] sd 7:0:0:0: [sdd] 468862128 512-byte logical blocks: (240 GB/224 GiB) [Sun Sep 8 15:04:20 2019] sd 7:0:0:0: [sdd] Write Protect is off [Sun Sep 8 15...
I did not notice the importance of the drive's name: SATAFIRM S11 After a bit of searching, it turned out there might be a way of restoring the SSD drive, but probably not the data. The program is designed to restore the health of disks on the Phison 3111 (S11) controller, for example, Smartbuy Revival2, Kingston ...
ddrescue: Unaligned read error. Is sector size correct?
1,515,038,215,000
I needed to reinstall ubuntu on my hard drive because I think I corrupted some files and it wasn't booting up (I know, it was very stupid). I tried to reinstall from a LiveCD by checking the "keep the files" option. Unfortunately, I did this kind of carelessly, where when it asked me for the username and password for ...
Using a Live CD was the only thing I hadn't tried and turned out that worked. I'm not sure why it was necessary though. It was only a directory that was encrypted, so it feels like it should have been able to decrypt it. Anyway, if you are stuck like I was, then that should probably do it.
Cannot recover encrypted files on Ubuntu
1,515,038,215,000
I've wiped my NTFS partition table using gparted by clicking on "Device->Create Partition Table... and then apply" by accident. In this topic "I've wiped my partition table using gparted, is there a way to recover my partition?" It says I could use testdisk to recover it. I did a "quick search", it found something but...
Windows checkdisk saved my life (I should have used with it before using testdisk). Used "chkdsk E: /F /R" in cmd.
I've wiped my partition table using gparted and testdisk did nothing
1,515,038,215,000
I accidentally deleted ALL files for my web server yesterday, and for some silly reason I have not made a backup in the last three months... Shame on me, I know. The files were deleted with a bad rm command, and the system was immediately shut down after I noticed. The files are mostly HTML, CSS and JavaScript, with o...
If you are using ext3 or ext4 based filesystem you can use extundelete. And then do: extundelete /dev/sda4 --restore-all (assuming the filesystem was on sda4), this should get your files back in the correct directory hierarchy. If you have to install, or download and compile that, don't do that on the disc that has t...
Find newest version of file recovered by PhotoRec, or suggest other recovery program
1,409,938,628,000
I split a partition in two with fdisk, but after rebooting I've got partition in FAT filesystem (was ext4). What's can be wrong? And how to fix it or get data from bad partition? I hope this is possible. List of commands what I did: resize2fs /dev/sda3 300G fdisk /dev/sda //here I remove sda3 partition and create 2 ne...
For some reason, fdisk create wrong partition offset (thanks to @frostschutz). And testdisk couldn't found anything what I need with [Intel] and not created with vista options (he found only sda2 partition). When I put Yes for his question about vista, he was find needed partition with Deep search. They was cannot be ...
restore filesystem after fdisk
1,409,938,628,000
I accidentally run the following command as root chown mike -Rf / backups the point is that I added a space between / and backups my mistake, I stopped the command after 1-2 seconds, how can I recover from this? I have problems with DirectAdmin right now for example when accessing it I recive the error: Unable to dete...
There is no way to change this back without reverting to your backup as the system does not keep track of revision of ownership. Best is to make a backup now, so any further changes can be rolled back. Reinstalling the packages on your system probably resolves most of the ownership problems. On Debian/Ubuntu I would ...
Accidental chown under / as root
1,409,938,628,000
Accidentally /usr/ directory got deleted, in Cent OS 8. For recovering CentOS, I have found this link which needs live CentOS 8 installed in USB drive. However CentOS 8 doesn't have live ISO release as per this discussion. In MS-Windows, I get errors when trying to install DVD iso to USB drive using Rufus and also Et...
Re-Installation. All your installed programs rely on data in /usr, so you can't simply reinstall. Your idea about using a live CD/DVD goes in this direction. You use them to FIX the problem. This would be the reinstallation of all programs, which won't work. Since this would be invoked within a chroot, it doesn't matt...
Accidentally deleted /usr/ directory in CentOS 8
1,409,938,628,000
I was copying a very big file and I accidentally stopped it. Can I resume copying data without need to delete copy and copy data again? Command I used: pv original.data > copy.data
Continue with dd: dd if=original.data of=copy.data ibs=512 obs=512 seek=NNN skip=NNN status=progress You have to get byte count in the copy.data. Then replace NNNs with byte count divided by 512 (value set to ibs and obs).
Continue copying file
1,409,938,628,000
Is there a way to recover an overwritten LUKS partition? Consider the following case: I had a (external) hard drive (not SSD) which is completely LUKS encrypted containing an ext4 file system with some (important) data (in my case images and videos). The passphrase is known. I don't have a LUKS header backup. Now I ac...
I'm afraid there's no chance without a header backup. The passphrase is only useful when a LUKS header is available that has that passphrase in a keyslot. Without that, there's pretty much no way to recover the volume key. Part of the LUKS design is that if the LUKS header is erased (and any backups) then it's forensi...
Recover overwritten LUKS partition
1,409,938,628,000
I am thinking how to recover .tar.gz HOME backup into almost a new Debian system safely (some files can exist and should be preserved so rsync -u). My main PC broke so I have to use a backup Debian system but I need my HOME backups (only the following home files) of the main system. Characteristics of the system $H...
Why get rsync involved when you can use tar? If you created the backup with this command: tar czf /media/masi/ext4Masi/backup_home_20.12.2016.tar.gz $HOME/ you can then restore the files without overwriting existing files like this: tar xzfC /media/masi/ext4Masi/backup_home_20.12.2016.tar.gz / --keep-newer-files T...
How to recover home backup into almost new Debian?
1,409,938,628,000
I just installed Manjaro on to a externalized usb hard drive. After I was done, I tried to boot from my previously working Mint distro (no full-disk luks) on my internal hard drive. The lvm volume groups had disappeared!? [crow ~]$ sudo lvm vgscan [sudo] password for crow: Reading all physical volumes. ...
It appears that the header did get cleared off your physical volumes. Thankfully, LVM stores a fairly large header, including multiple backups of the metadata, in plain text. So you can find the plain-text metadata using, e.g., sudo strings /dev/sdb5 | less and use that metadata to restore the physical volume. Note th...
can you recover lvm metadata without access to /etc/lvm/?
1,409,938,628,000
I have had taken backups by TimeMachine and now my Macbook Air 2013-mid finally died so I have to rescue files in Debian 8.1. However, it seems that no backups of so directories have been taken. I have backups which have these permissions and owners ls -ls /media/masi/disc2/ drwxrwxr-x 1 root root 48...
The latest version of the HFS+ utilities on Debian are, as far as I can tell, from 2006 and lacking a maintainer. Apple released Time Machine in 2007, and when they did they introduced some quite significant changes to HFS+ (particularly to do with hard links to directories). It is highly likely that the HFS+ tools on...
To recover OSX data in Debian
1,409,938,628,000
I work in IT. Sometimes we're asked to get data off of drives that have failed. We have various SATA-to-USB, ATA-to-USB, etc. adapters for this task. But, sometimes they report the wrong block size to the computer (or maybe they're not reporting any block size at all, and my Linux laptop is just assuming the wrong siz...
You can use losetup to create a loop device with a different logical sector size. -b, --sector-size size Set the logical sector size of the loop device in bytes (since Linux 4.14). The option may be used when create a new loop de‐ vice as well as stand-alone command to modify secto...
How can you force the Linux kernel to use a specific block size for a disk?
1,409,938,628,000
I've accidentally overwritten /usr/etc with a random config file using sudo cp ~/.nzbget /usr/etc. Yes I know I should have backed it up etc, etc, etc... Now the important stuff, I've seen extundelete, is it possible to recover the previous 'version', ie: the real /usr/etc. /usr/etc is not on a specific partition, s...
/usr/etc is usually unused on most systems. Configurations for programs from package managers and so on are expected to go to /etc, while configurations for custom (manually compiled) programs should go to /usr/local/etc. The only time when you need /usr/etc is when you manually compile a program with --prefix=/usr, i...
How to restore /usr/etc
1,409,938,628,000
I accidentally deleted the dir, /path/to/dir, and all its contents from an application. However, I still have a terminal window open, still cd-ed in /path/to/dir! Q: Is there any way to recursively recover /path/to/dir? Note that lsof gives me this: $ lsof | egrep '/path/to' bash 3113 hs cwd ...
Unfortunately you cannot do what you seek. While the directory may be held open, the files that reside within the directory are not part of the directory itself. The directory simply stores the file names. In addition to this, with the files having been deleted, the directory has already been modified to remove those ...
Linux: Recovering a deleted dir that another terminal is still cd'ed into
1,409,938,628,000
Somehow my .vdi (Linux guest OS) file got corrupted. Now I have some files in it (Inside the vdi file) and I want to recover those files. How can I do that?
Assuming you're on a Linux host as well (you didn't mention that). You can always try the Network Block Device (NBD) option:- sudo modprobe nbd max_part=16 sudo qemu-nbd -c /dev/nbd0 <path to your vdi file> ls -lh /dev/nbd0* <lists all the partitions on the vdi> Choose which of the partitions you want to mount (eg 1s...
Linux: Recover files from .vdi file
1,409,938,628,000
I have a corrupted NTFS partition. I am trying to use ddrescue on the same from ubuntu 20.10 liveUSB. The command I am planning to use is this sudo ddrescue -n -r 1 -c 16 /dev/sda4 /media/restored.img ~/status.log I have very limited knowledge about file systems, partitions and how ddrescue works. And I learn from ol...
As cas explained in comments, dd rescue cannot just rescue image files (or any specific file type), it is used for making image copies of block devices. If block device is not corrupt then it can also copy a particular file from block device just like dd command. What you can use is testdisk command. Run sudo testdisk...
Is it possible to ddrescue only image files (jpg, png, etc.)
1,409,938,628,000
My both hard drives where all my data is stored are failing. My system insconstently refuses to load the disks and mount the partitions. I moved one hard drive to other computer where it is recognized with less trouble but the partition has many errors, and I still get E/S errors on dmesg for that drive. The partition...
Don't panic It appears you are trying to failing hard drives with dirty ext4 filesystems on them. Do you have backups? Restore from backups if you have them. If you don't have backups, you must tread very carefully here. The first thing to do is to take your hands away from the keyboard and develop a game plan. An...
Please help me rescueing a failing hard drive
1,409,938,628,000
I applied the following wrong Sed command to my nginx configuration: sed 's/php7.2-fpm/php7.4-fpm/g' /etc/nginx/sites-enabled/default > /etc/nginx/sites-enabled/default And the entire file is gone. I have no backups. Is there a way to restore the original file? Re-configuring everything will take me days.
Exploring the running Nginx process If Nginx is still running (don't restart it!), you can ask it to dump its configuration. I have no experience with Nginx, so this is just something I read on the web, I don't know how much information you can recover this way or what might go wrong if you try it. /usr/sbin/nginx -c ...
Restore deleted version of nginx configuration
1,409,938,628,000
I am looking for options regarding recovering deleted files (don't recall if corrupted applied). Filesystem for the corrupted files are VFAT-formatted on a USB, though I run a Linux system (but can use Windows if necessary). The original files were created using Windows. The corrupted files I have found (so far) are i...
I suspect the comment you’re referring to is this one: See PhotoRec, it fits your requirements and is available packaged in most Linux distributions. For more advanced recovery, see also Foremost. These tools are file recovery tools, designed to retrieve deleted files; they won’t help you fix corrupted file contents...
Recovery software for corrupted files when running a linux system?
1,409,938,628,000
Is there a way to restore a folder or better the containing files and folders of the folder which was replaced by a empty one with the same name? FileSystem: Ext4 OS: openSUSE 42.1 If it is possible, what is the easiest way? Can I do this from the running system itself?
Don't do it from the running system, you should run a live cd or usb, mount the hard drive in read only, then try ext undeleted, or don't mount anything and try foremost or photorec. The more you use the system the less likely it is that you will recover your data. good luck
Recover files inside a folder which was replaced by an empty one. (openSUSE, Ext4)
1,409,938,628,000
During the course of some testing, I ran the bast script for file in *; do mv -v "$file" "$file#_*" done or something along those lines. The plan was to remove a prefix from directory names but I accidentally ran it in my home directory rather than in the test directory I had created... My understanding is that...
I'm not totally sure what you did there, but if the command in your question is the one you ran, you should just be able to reverse it: for f in * do echo mv -v "$f" "${f%"#_*"}" done Please don't remove the echo from that command until you're sure it works, but, just to explain why I think it will, here's what I did...
Recover files after moving directory names?
1,409,938,628,000
a part of out homework assignment is to recover deleted files from the partition with the ext4 file system. I've tried using the extundelete tool, by following this tutorial. The tool recovered a lot of files, which couldn't be opened, so I guess this doesn't do me any good. Is there any other tool I could try, to rec...
If you use software that risk modifying the deleted partition you should first make an image of the disk using dd, dd_rescue or the like. When it comes to tools you could try out TestDisk and PhotoRec. TestDisk, now at version 6.13 has had support for ext4 since version 6.11. TestDisk is gained towards partition recov...
Recovering files from partition (ext4)
1,409,938,628,000
I recently powered on some old notebook with Linux Mint 11 (Katya) installed, and I thought I remembered my user password, but turns out I didn't. So I reset that password using the instructions here. After doing that, I could login successfully with my new password, but right after that I got a series of error messag...
It is absolutely essential that you record your randomly generated mount passphrase, without which it's impossible to recover your data. I can't stress that more strongly :-) You should write this down, or print it out and store it somewhere safe. Alternatively, you might consider using the zEscrow service from Gazza...
I reset my password and now I can login, but without nautilus or program menu
1,409,938,628,000
I got a couple of old disks I'm trying to copy over to a HDD. Some of the disks worked fine and I was able to copy them using just mount and rsync, however as is it with old disks, some of the disks were failing to mount. I tired using dd to make an image of them and then ran photorec to get the files out. This worked...
Use ddrescue (In Debian and Ubuntu: use aptto) install the package gddrescue. Read a good tutorial via the command info ddrescue before starting to recover. Clone to one drive and write a log file to another drive. The first step is to use a fast process to clone what is easy to read. Then a slow process can usuall...
dd stops copying mid-way through a CD
1,409,938,628,000
I delete a file from disk, then do some write operations on the same disk, and then run a recovery program to recover the said file. Is there any way to check the integrity of the file? Let the recovered file be an bitmap image. In my understanding since the data blocks that store the image pixel data may be overwritt...
Some file systems have metadata blocks with checksums. With a lot of luck, these might still be intact, but typically, the metadata would be gone, so all you have is the intrinsic ability of the file itself to detect error. First things first: images are relatively large files, and deleted files without remaining meta...
How to tell the integrity of a recovered file, specifically if pixel data of recovered image is corrupted
1,409,938,628,000
I am trying to create a new partition fdisk -W /dev/mapper/nvmeVg-var but keep getting fdisk: unsupported wipe mode nvmeVg-var is a part of an lvm When I fdisk /dev/mapper/nvmeVg-var I get The device contains 'ext4' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for m...
As this is part of LVM you should use command lvcreate to create volume/"pattition" in this volume group. And then create filesystem, mount, etc
fdisk: unsupported wipe mode
1,409,938,628,000
I've made a small mistake, I've removed my boot partition by mistake. Using testdisk I was able to recover the boot partition without problem but I either misused it or did not understand and only write partition table with my boot partition. So now my / and swap partition are missing from my system. I've found this a...
Finally I've used testdisk to solve the issue I've identify my other partition : #main partition /sys/class/block/nvme0n1p2/start 618496 /sys/class/block...
Recover partition table from running system and encrypted disk
1,595,103,387,000
I'm trying to recover data from damaged 3TB drive. I'm using ddrescue to make an image of it, but it takes forever while there are lots of read errors. I was wondering if I can have some luck with first 200GB (with large wholes in it) that I already copied. I read the partition table with gdisk and found the offset of...
If the image size is too small, you can use fallocate or truncate to make it larger, or use dmsetup to create a linear device mapping to create a virtual larger device. $ ls -lh somefile -rw-r--r-- 1 user user 200G Sep 9 13:27 somefile $ truncate -s 2T somefile $ ls -lh somefile -rw-r--r-- 1 user user 2.0T Sep 9 13:...
Recover data from truncated partition image
1,595,103,387,000
I accidentally deleted my /lib/modules/<kernel version directory>. Here's the full output of sudo rm -rfv /lib/modules/4.14.98+ : pastebin Is there a way to restore the modules keeping the system online? It is a raspberry pi sitting on an internal network.
You can use dpkg --search /lib/modules/<kernel version directory> to find what packages this directory (and inside) belong to, then use apt-get --reinstall install <list from before> to reinstall any affected package missing, thus restoring missing content. In one liner this should be (remove the -d once sure of the e...
Deleted /lib/modules/<kernel version> by mistake. How to recover?
1,595,103,387,000
So I'm having a problem with kimsufi server. I was installing windows by using this command: wget -O- ...url.../server.gz | gunzip | dd of=/dev/sda And I messed up and accidentally ran that command on already existing windows installation, now I can't use RDP anymore, I guess it's all gone now, it somehow wrote over ...
I recovered the partly overwritten partition with testdisk. In case someone has the same problem, here's the solution (use testdisk): Intel/PC Partition > Analyse > Quick search > And there I found the deleted partition [1.8 TB] > Enter to continue > [Write] (Write partition structure to disk) > And now the partit...
How to recover overwritten partition?
1,595,103,387,000
I tried to read some videos from the memory card of my digital camera. It wasn't possible to access the DCMI Folder, because there was no directory attribute. The expecting DCIM folder was a 0-byte file. After typing "ls -l" I get a list of folders/files on the memory card and the first colum of the DCIM-Folder was ...
The filesystem is damaged. Just because you've identified one byte that's damaged doesn't imply that the rest is fine, in fact it's rather the opposite. There's a good chance that making the directory entry back into a directory will make the filesystem invalid, or will make the directory contain junk. The first thing...
destroyed folder now without directory attribute
1,595,103,387,000
Just as an example, this is one typical output line. ...........................[12767109](+112394240){X [12792709] X}[12818309](+209715200) I have gone through the DESCRIPTION OF OUTPUT in safecopy's manpage but I still am not quite sure what exactly it means. For example, if (+112394240) is "the number of blocks ...
Q#1: Interpreting output The output seems fairly straightforward. It isn't blocks (or bytes) but rather current block and bytes. . Between 1 and 1024 blocks successfully read. [xx](+yy){ Current block and number of bytes continuously read successfully up to this point. X Read ...
How to interpret the output of safecopy
1,595,103,387,000
I've been backing up old IDE hard drives onto a new USB drive this afternoon. One, a 2002 120gb Western Digital, has been a bit of a problem. I have connected it (as with the other hard drives) to the IDE port on the motherboard, and when I power on the computer, it makes clunky/whirry sounds which I'd prefer not to h...
Any noises other than the normal hum from a HDD is bad news. This typically the result of either bearings that have or are disintegrating over time, or from the head as it's banging into the guards on either side as it searches in vain for specific sectors. If it's, by some miracle still operating, I would attempt to ...
Clunking hard drive, some info appears in dmesg but none in fdisk -l, what are my options?
1,595,103,387,000
is it possible, to backup on regular basis inode table (including all inode information) on ext2/3/4? If yes, how to do it, or which program to use?
You probably want this: e2image - Save critical ext2/ext3/ext4 filesystem metadata to a file
backup inode table on ext2/3/4
1,595,103,387,000
I was moving a directory on my parents computer using a teamviewer session. The session responds slow and somehow, when I was moving the directory (location: /sdb/synchronisatie/nel/) something went wrong I guess but now the directory is gone! And I cannot find it anywhere... I'm sure I've used 'paste' but I think no...
From your description it sounds like you likely dragged your files into another directory. To locate them you can wait a day and there's typically a cron job that runs on most distros that does a index of the files on your system using slocate. Once this completes you can locate your files using the locate command: $ ...
lost directory cannot find it with testdisk
1,595,103,387,000
I am playing with LVM and while doing lvreduce. I now get this error: [root@localhost raja]# e2fsck -f /dev/vg1/lvol2 e2fsck 1.41.12 (17-May-2010) e2fsck: Superblock invalid, trying backup blocks... e2fsck: Bad magic number in super-block while trying to open /dev/vg1/lvol2 The superblock could not be read or does no...
If the filesystem is really on that device, running mkfs.ext4 with the same arguments plus a -n will give you a list of superblocks that you can use as alternates. Eg: # mkfs.ext4 -n /dev/vg1/lvol2 ... Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208...
e2fsck giving some error
1,595,103,387,000
Ok. Please don't judge me. I had no coffee yet when I did this... I tried to format a new USB drive and the drive didn't mount and I didn't think straight... long story short, I did parted -s /dev/sda1 mklabel gpt where sda is, of course, my main (boot) drive. The output of that command was Error: Partition(s) 1, 2, 3...
You inadvertently created a partition table inside the partition /dev/sda1 and this was your bios_grub partition. This will have removed/damaged grub's core image, so rebooting will likely result in grub not working. If you reboot anyway, you might end up in a very limited grub rescue> prompt. The partition headers yo...
Recover from parted -s /dev/sda1 mklabel gpt
1,595,103,387,000
My external SSD used to mount seamlessly until a recent incident. Since then, the SSD is recognized by the system, but when trying to mount, the following error message is displayed: "Unable to access "MyDevice" An operation is already pending". fdisk -l outputs Device Start End Sectors Size Type /dev/...
[ 4062.536026] print_req_error: critical target error, dev sdb, sector 479993 [ 4062.536036] Buffer I/O error on dev sdb2, logical block 215801, async page read says basically that your disk drive is dying. Sorry. You may try installing gddrescue package containing GNU ddrescue program and use it to retrieve as much...
Unable to access "MyDevice" An operation is already pending error message when mounting SSD
1,595,103,387,000
I have a 1TB External drive that was formatted HFS+ for use with a Macintosh Apple Computer. The drive is completely full. I'm using Linux to try to recover all the files, or to repair the disk and then mount it and retrieve everything. I tried gddrescue, but that was taking too long to finish. At 0.06% of the recover...
I was able to image the disk with testdisk which produced a similar result to what ddrescue normally would, if that would have been successful. Then I used hfsprescue on the image created by testdisk. The process couldn't have been easier, following those two steps. I recovered 99.99% of my files, including the direct...
How to recover HFS+ Partition Catalog (Possible failing drive)
1,595,103,387,000
I have a python file named initialization.py. When trying to copy-paste contents into a blank file, I used ctrl + x to copy/cut, closed the original file, and accidentally used ctrl + x again in the blank document of my text editor, then proceeded to save the blank document with the same filename initialization.py. So...
Mistakes like this is why I wrote a script to automatically backup all of the small text files on my machine every 10 minutes. (also useful if you want to view the previous version of a file) What you're asking is a data recovery question now: Do NOT use the drive for anything else. If it's your main system drive, tu...
Accidentally overwrote .py file, can the original be retrieved?
1,595,103,387,000
I have a luks encrypted SD Card and I want to recover all deleted files from it. I have been truing with extundelete using the following commands: extundelete --restore-directory RecoverDir/ /media/user/Cardname/ extundelete: "/media/user/Cardname/" is a directory. You need to use the raw filesystem device (or a copy ...
You've basically tried all of the combinations except the right one. Here's what needs to be true for the tool to have a hope of working: Run extundelete as root Have the LUKS container mounted Point extundelete at the device file corresponding to the LUKS device (the one you pass with mount to mount the filesystem) ...
Recover files from a luks partition with extundelete
1,595,103,387,000
Long story short, for my first thread here, I have a software RAID5 array set up as follow: 4 disk devices with a linux-RAID partition on each. Those disks are: /dev/sda1 /dev/sdb1 /dev/sdd1 /dev/sde1 /dev/md0 is the raid5 device with a ciphered LVM on it. I use cryptsetup to open the device, then vgscan and lvcan -a...
So, I managed to get a full recovery, thanks to this link What I did is as follow: I replaced the faulty disk and restarted the server. Then, I formatted the new disk as a Linux-RAID partition type. # mdadm --examine /dev/sda1 /dev/sdb1 /dev/sdd1 /dev/sde1 Then, based on the link above, I (re)created the array, ba...
MDADM - Disaster recovery or move on from the state I put my RAID5 array into
1,595,103,387,000
I was installing windows and I accidentally deleted the 2TB LUKS encrypted hard drive where I store my important things. So after realizing my mistake I immediately rebooted into a live Ubuntu disk and installed Ubuntu on my SEPARATE hard drive just to have a system to work on. I searched around and found out about te...
Based on the screenshot and our discussion, it looks like testdisk discovered your LUKS header and put it in it's own partition, leaving the rest of the LUKS container in the unallocated space. The LUKS header is stored at the beginning of the partition (or disk when not using partitions); unless you use a detached he...
How to recover LUKS encrypted hard drive?
1,595,103,387,000
Tried foremost but as far as i can see it only recovers the files itself. Is there some tool which reproduces the directory tree? I mean according to path of a file. does the ext4 filesystem even keep path when removing the file?
There's extundelete, magicrescue and testdisk, and more. Of these, extundelete best suits your requirement. Explore the --restore-directory /some/path option. You can at least get your files named correctly, as they were named before your mistake. You can also limit the restoration within a date range.
what is a good tool to restore files within their path when you rm -r from root? [closed]
1,595,103,387,000
I was running out of space in my volume group (VG) called "linuxvg" and therefore chose to add one more physical volume (PV) to it, called /dev/sda11 (already existing in partition table). I simply ran: pvcreate /dev/sda11 pvextend linuxvg /dev/sda11 The problem is that /dev/sda11 was also my root partition a...
A given partition can only be used for one thing at a time, as you’ve realised. You pretty much need to restore from backups at this point, or reinstall from scratch. (You could try PhotoRec but unless you specifically have data you need to recover, it’s probably not worth it; I doubt it would recover your binaries an...
Does pvcreate erase data when applied to existing partition?
1,595,103,387,000
I would like to mount an Apple iPad to my Linux device, to make a jpeg or ddrescue recovery on it. How I would do this with an Apple device?
You can't access the block device on Apple directly, it is forbidden by the OS, on which you don't have a root access, despite that you've purchased it and it is yours. To be able to do these, you have to jailbreak it (I intentionally don't use the word "crack", because it is your property). It is hard. Although the O...
How to mount an Apple device from Linux?
1,595,103,387,000
I just accidentally erased my home directory using the rm command. I am being pointed towards photorec and testdisk to recover the files. However, I have a backup, about 2 or 3 weeks old I think, and I was wondering if either photorec or testdisk are able to recover files by dates (last modification) since I am readin...
photorec can't recover files by date, but it does recover the metadata of a file if found with it (found it here in the section recovery completed). So after recovering all your data, sort your files by date to find the last ones. In the link they said that photorec will recover the metadata if found. So he might not ...
Can TestDisk or PhotoRec recover files by dates?
1,595,103,387,000
A few days ago our Ceph Cluster died - nobody knows why, but it seems that the monitors just got deleted. When trying to re-add them to the ceph.conf we get timeouts when starting ceph and these errors: 7f1b04382700 0 -- :/3908692206 >> 172.16.50.2:6789/0 pipe(0x7f1b0005a060 sd=3 :0 s=1 pgs=0 cs=0 l=1 c=0x7f1b0005e35...
After some more prayers I actually got it: I specified a wrong block size and I changed to copying with offsets instead of inserting "0-blocks". To extract images from OSDs only (nothing else working): https://gitlab.lbader.de/kryptur/ceph-recovery/tree/master Now I am able to extract the VMs from the OSDs and copy th...
Recover VM Images from dead ceph cluster
1,457,380,261,000
I tried to compress a directory using tar -zcvf output.gz input_dir. I suppose I should have used a .tgz extension for compressing. How do I untar output.gz? I tried both tar zxvf output.gz, which didn't yield anything, and gunzip output.gz, which resulted in a corrupted archive. Is there a proper way of extracting ou...
tar -zcvf output.gz input_dir Wrong! tar -zcvf output.tar.gz input_dir or tar -zcvf output.tgz input_dir Good. Then estract with tar -xvf output.tgz or tar -xvf output.tar.gz You can omit z on modern distro,if doesn't work or using old distro use z switch
Extract files from a corrupted .gz file
1,457,380,261,000
I'm trying to recover some lost files by grep-scanning a hard disk. (The OS is Darwin 11.4.2. The file system is HFS.) How can I determine where a file (or contiguous chunk thereof) begins and ends on disk? I'm thinking of something along the lines of a generic beginning-of-file (BOF) and end-of-file (EOF) sequence...
No general-purpose filesystem uses beginning-of-file or end-of-file sequences. They would be extremely impractical: what if a file contains these character sequences? Most basic filesystems divide the storage into fixed-size blocks, and maintain a list of blocks for each file. The file size is kept separately, and how...
How are files or chunks delimited on disk?
1,457,380,261,000
I'm running Photorec on an external HD connected via USB and it's taking too long, with the estimated remaining time constantly increasing. Is there a way to create a disk image from that external drive, split it in smaller parts, copy each part to my internal SSD (one at a time) and run Photorec on it? I don't have m...
You could, but if any file crosses the split boundary, you won't be able to recover it. Of course, you could go for overlapping splits to avoid that problem (overlap size being at least the maximum file size you're expecting to recover). However, it's questionable at best whether you would actually see the desired spe...
Can I split a disk image and run Photorec on each part individually?
1,457,380,261,000
I'm running Ubuntu 14.04 Trusty Tahr in a Microsoft Hyper-V virtual machine on Windows Server 2012 R2. I've stopped the VM, replaced an EXT4-formatted virtual disk volume (/dev/sdb) with a new (unformatted) disk volume and restarted the VM. I see the following messages: Filesystem check or mount failed. A maintenanc...
OP and I worked through this; see comments & chat for details. First, to find the problem process and location, this line in /etc/init/mountall-shell.conf /sbin/sulogin was changed to /usr/bin/ltrace -S -f -o /root/sulogin-ltrace.log /bin/sulogin Excerpt from log: 837 crypt("password", "x") = nil 837 strcmp(nil, "x"...
What Causes Maintenance Shell Segmentation Fault?
1,457,380,261,000
I'm recovering a PV on a mdadm RAID 1 with a single VG containing several LVs. The underlying devices have several bad sectors (one just a few, the other really much) and a silly typo made it necessary to restore the LVM configuration by grepping through the devices. Luckily I found it and the restored configuration l...
For anyone who has a similar problem: I used e2sl [1] to actually find candidates for the filesystems directly from one of the RAID devices and mounted the filesystem using a loop device [2] skipping LVM and the software RAID. I had to fiddle a bit with the offset (The superblock position has an offset of 1KB to the s...
Restored VG has shifted volumes
1,457,380,261,000
First, I probably deserve this for not having a backup. My system was installed with Debian and Mint11. I recently installed Mint12 to play with. I expected all three to continue to work. I can no longer enter Mint11. I get an error saying it can't identify the specified partition. I think the cause is because in the...
FYI, use fdisk -lu instead. You appear to have a corrupt partition table that is claiming the partition extends beyond the end of the disk. That means that either the mint installer screwed it up, or the disk shrank slightly since then. Since it looks like the offending partition is just an extra swap partition ( s...
Raid5, what could happen? Partition corruption, now what do I do?
1,457,380,261,000
Many laptops are delivered with Windows 7 recovery partition (but without CD or DVD) which takes place on the harddrive that could contain some Linux distribution or serve for data storage. I don't want to format it because sister paid for this partition and has a license key. But she would like to backup it to some m...
Using tar and gzip is probably your best bet. You could use dd to do a block-by-block copy of it but this will obviously give you a file exactly the same size as the partition. Assuming the partition is /dev/sda2, something like:- mkdir /mnt/recovery mount -t ntfs /dev/sda2 /mnt/recovery cd /mnt/recovery tar -cvf - . ...
Create recovery medium from Windows 7 recovery partition
1,457,380,261,000
I had a RAID 5 (Linux software RAID) server which recently decided not to boot anymore. It seems to be a motherboard problem possibly due to not being protected by a UPS during a power failure. It managed to extend its slow death to the point of taking up plenty of my time without much reward but I know that the drive...
The short answer is: yes, it is possible. Linux software RAID writes some meta information on the devices such that you can easily plug them into another system (using another controller and so on) and use them there. Before doing any assembling, you can query the devices (status, look what Linux think what part of wh...
is it possible to recover a raid 5 array by using usb enclosures?
1,457,380,261,000
I am using an ubuntu live cd to help me recover some data off of a hard drive. I used lshw -C disk to find out which device I need to copy, /dev/sda in this case. I am using ddrescue -n to try and recover some data from a failing hard drive. It stops at 100GB of a 500GB hard drive. After it finishes sudo lshw -C disk...
It looks like the way in which your disk is failing is so bad that the kernel becomes unable to keep communicating with the disk. There are probably a lot of errors concerning the disk in /var/log/kern.log. If you post its contents here, people might have tips to help you recover more. (Post only the part from the fir...
"lshw -C disk" returns but prints nothing
1,457,380,261,000
Recently my computer's PSU died. I am not aware how exactly this happened, but I restored my computer's functionality. I run PopOS 22.04 LTS Linux, and my OS also became unbootable. I repaired it with a bootable USB. When booting in though, I discovered my 2TB Data HDD is also gone. Its partitions have been replaced w...
I decided to use R-Studio for Linux to recover my drives. I purchased another 2TB to move them onto, and to later use as a RAID 1 array. The software was amazingly able to find all my files with the exception of a few filenames. I guess recovering through TestDisk would've been possible but I am not knowledgeable enou...
ext4 partition on 2TB HDD gone and replaced with Windows FAT12 partition
1,632,217,102,000
Recently my PC running Debian crashed and I had to perform hard reboot. Since then I am not able to detect my 500GB Seagate HDD with around 6 partitions. At first it wasn't being detected in BIOS but after disconnecting all other HDDs it started appearing and Debian would display COMRESET (-errno=16). I connected it w...
This is showing a dead disk. You might be able to get SMART status but at this stage it's fairly academic. ("it displayed some read write failure" is of no use whatsoever. You need to be precise.) First of all, disconnect the disk and put it somewhere safe. The longer it's powered up the less time you might have left ...
Is it possible to recover my HDD
1,632,217,102,000
I've got a bunch of photos that were on an SD card. Most of them are corrupted now, I cannot open them in any program (Gwenview, Gimp, on windows too...) But every file browser still can correctly make most of their thumbnail. for instance : Gwenview with a photo selected that have a correct thumbnail I'm aware that...
I asked the very same question on askUbuntu, here is the best answer I had :) You can use ExifTool to recover from the thumbnails. You will only get a low resolution image by doing this but it may be all you can recover if the files are that badly corrupt. You can install it by putting sudo apt install libimage-exifto...
How to repair Corrupted jpeg file that still get their thumbail done correctly?
1,632,217,102,000
On my PC I had 2 operating sytems (ubuntu and windows) and for about 5 days I wanted to reinstall my Windows OS because of some bugs but instead of installing it on the partition where my old version of windows is I have installed it on the partitions where my Ubuntu OS was so my question is, is it possible to recove...
Considering you have over-written your Ubuntu partition with a Windows reinstallation, chances of recovering files are pretty low. With : A LOT of time a pretty large storage space on another drive another PC where you can plug your hard drive (stop writing on your Windows/Ubuntu drive NOW!!!) an indecent amount of ...
Is it possible to recover overwritten files from another operating System on the current operating system?
1,632,217,102,000
After I recovered my files with PhotoRec, I ran fdupes $ fdupes -rdNI --sameline /home/user > fdupes.txt. I couldn't use the option -d because round about 1.6 million files in my system have been recovered. I also ran fdupes several times until it found no more duplicates. The thing is that I got lots of entries in fd...
Here's a script in python3 I wrote: import os import sys import ast import time import signal n = 1 from = 'asdf' into = 'asdf' d = '/home/user/fdupes.txt' f = open ( d, "r" ) from = f.readline () into = f.readline () while '/' in from or '/' in into : if ( '[+] /home/user/recup/' in from ) and not ( 'recup' in in...
script for moving kept files deleted with fdupes or other deduplicating package
1,632,217,102,000
Re-post from Stack Overflow My PC on Debian (Jessie) doesn't work well any more and I only have the command line interface (and only can connect with root). I would like to copy my data on my external hard drive (I know I should have done backups before but I made a slip up when doing it) but I don't manage to do it....
I made following commands (without the results): # cd / # fdisk -l # blkid # mount /dev/sdb1 /media/username/exthd # cp -R /home/username/Documents /media/username/exthd # umount /media/username/exthd /dev/sdb1: my external hard disk as found thanks to fdisk and blkid commands. /media/username/exthd: where I want to ...
Get data from debian via external hard drive, command line and root user [closed]
1,632,217,102,000
I wanted to completely remove pcsxr and i type -find / *pcsxr* -delete and now my screen gone completely black. I don't know what to do and what i did wrong. I reboot now and I'm in boot menu and i think i deleted entire HDD. I had very important folder on desktop and i don't think i can do anything now.
Get a Linux live CD, boot it, mount the HDD, and look around. You may have deleted enough files to render the system unbootable, but that doesn't mean you deleted everything. Either way, don't kill yourself. No mistake is that bad. And from now own, make backups :)
Black screen after i ran command
1,632,217,102,000
I was running a monitoring program on a raspberry pi when the os became corrupted and the pi would not longer boot. I have a backup of /etc/mysql. In there is a file called DataLog.frm. Is there a way to rebuild the structure of the database from this file? I didn't backup /var/lib/mysql, which I believe is the actual...
In the mysql startup configuration file, say /etc/my.cnf there would be an entry with name datadir [ might vary from system to system, in your case it seems to be /etc/mysql check your mysql startup script in /etc/init.d if any, for the exact configuration file being used ] [mysqld] datadir=/var/lib/mysql So if your ...
How to restore Mysql database on linux?
1,632,217,102,000
We had a human accident at home and an external hard disk was copied a SD 32gb image card by mistake. The copy should be done to a SD image. I guess 32gb of the external drive were overwritten, but as far as my knowledge of digital forensics, the most of the information should be there. Can you please recommend me a g...
From my personal experience most filecarvers like to make assumptions based on which filesystems they detect. You could create a loop device with 32GB offset just to make sure your scanner/filecarver does not get sidetracked by seemingly valid data you're not interested in (i.e. skip the area you know was overwritten)...
How to scan a hard disk at low level to recover files in partially overwritten partition?
1,488,707,045,000
I have a hard drive which has suddenly developed unstable sectors. I am able to read it with dd_rescue, so I transferred it completely to another new drive of the same size. The Windows partition is bootable after the transfer, however, the Mac partition behaves weird. When I boot it for the first time, it boots just ...
I interrupted the second dd session after about 100Gb in the disk. Then I booted off an external OSX drive with DiskWarrior lent from a friend. From there I got a list of the overlapping files which were mostly cache files, so I went ahead and deleted them from the terminal. Then let DW rebuild the disk directory. Aft...
Migrating a failed hard drive — preventing fsck
1,488,707,045,000
I have a completely standard, single hard drive Fedora 23 desktop. The dual-boot installer set up the Linux partition as LVM, with root, swap and home logical volumes; root and home were both ext4. Having recently added an additional 4 GB of ram, I decided to expand the swap volume by shrinking the home volume by 4 G...
You don't have to run anything after resizing, but you cannot just resize the logical volume even if you have unmounted the filesystem on it. You have the resize the filesystem first (for ext4 you can use resize2fs), to make sure there are unused blocks in the logical volume that can be freed up (to transfer to swap)....
Ext4 corrupted and unrecoverable after LVM resizing + power failure
1,488,707,045,000
I tried to transfer ('cut and paste') about 2gb of files from my system (running Linux Mint 15, KDE 4.2) onto my USB stick (8gb capacity). The notifications manager indicated that the copy was complete, so I removed the USB drive and mounted it on my other computer. Then it showed that only one of the files had been w...
mv returns as soon as the files have been moved from the applications' point of view. If any program tries to read the files after mv returns, it will find them on the USB stick and not on the hard disk. However, it is possible that the content of the files and the updated directory on the USB stick are still in the d...
Recover Files Incorrectly Written to a USB?
1,488,707,045,000
Using Ubuntu 22.04 I had a folder with a bunch of files I wanted to change the file extension so I used: rename 's/\.zip$/\.cbz/' *.zip The command completed without throwing any errors, but I found about 2/3 of my files were missing after. I think it had to do with the names of some the files containing brackets or q...
$ touch {comic5,{a..d}}.zip './--e=BEGIN{unlink for <c*>}#.zip' $ ls a.zip b.zip comic5.zip c.zip d.zip '--e=BEGIN{unlink for <c*>}#.zip' $ rename 's/\.zip$/\.cbz/' *.zip $ ls a.zip b.zip d.zip '--e=BEGIN{unlink for <c*>}#.zip' Oops! All the files whose name starts with c have been removed. For the F...
Rename command seemed to remove a bunch of files. Can I recover them?
1,488,707,045,000
I've accidentally performed sudo rm -fr /dev Will I suffer from data loss or any side effects? I've rebooted the system and my data seems ok, but I'm afraid there is hidden or non-obvious loss of data that I simply haven't found out yet. EDIT: I've read this post but didn't get sure enough that no data loss happened;...
No. Look at the output of mount: you'll see that a devtmpfs (or devfs) filesystem is mounted there. In other words, all the device nodes you see there aren't stored anywhere "permanently". This is just a pseudo-filesystem that your software (the userland in cooperation with the kernel) populates with devices nodes tha...
Accidentally deleted /dev directory
1,488,707,045,000
I have a Debian box, where I am doing some data recovery using ddrescue on a sata ssd. The process has been running for 24 hours, and has 24 to go (at least) in any event, the PC has 16GB ram, and 10GB swap. For some reason, There is 8GB swap in use, and 2GB RAM in use. This seems like an inefficient use of resources....
Swap is being used instead of ram because the memory pushed to swap was inactive, not being used, and likely your ddrescue is pulling in a lot of data that is filling up cache in ram. This is not really an efficiency problem, it should be able to pull the data out of swap fairly quickly when it needs it. It is in swa...
why is all this swap space being used?
1,488,707,045,000
Is there any way to recover a few specific files from a deleted EXT4 partition. I deleted all partitions on my 480GB SSD. Afterwards, I created a 200 GB NTFS partition (which is mostly empty) and I have about 280 GB still unpartitioned. I didn't do a "wipe" (or whatever it's called), so it was a quick deletion pro...
You can use System rescue CD as a live cd https://www.system-rescue-cd.org/SystemRescueCd_Homepage you'll find the photoRec software in it, to recover lost data. You can also use the soft directly from windows: www.cgsecurity.org/wiki/PhotoRec Here some details on how to use photoRec http://www.cgsecurity.org/wiki/Pho...
Recover specific files from deleted EXT4 partition
1,488,707,045,000
I'm looking to recover data from 4 old HDDs set up in a software raid5 and it looks like a disk has failed. What I want to do is recover the raid so I can copy its data somewhere else. I have done some research and I believe I want to use mdadm to perform a resync, but at the end of the day I do not want to mess it up...
So... /dev/sdb1 hasn't been active in this array since 2015 (Update Time). The data on it should be outdated to the point of uselessness. Essentially you've been running a RAID-0 ever since. That leaves you the three other devices /dev/sd{c,d,e}1. Out of these, /dev/sdd1 failed recently. Since you already lost redunda...
Recovering a Failed Software Raid5
1,488,707,045,000
I'm running Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64) on Amazon AWS. I had a folder "foo" in the /mnt and after few modification I had to recover to previous backup of the instance . after restore "/mnt/foo" folder is missing , however when I tried "locate foo" it showed me on in "/mnt/foo" . then I di...
You propably mounted the partition /dev/xvdbover the original /mnt ? Try umount /dev/xvdb an see, if the folder is there. If so, move it to some other partition, then re-mount /dev/xvdb and move the folder back.
lost folder from /mnt and recovering
1,436,561,452,000
I don't know how to get the data recovery softwares as they're not in the Lubuntu Software Center nor Synaptic Package Manager. Recuva Diskdigger Testdisk R-Linux
Recuva : Recuva is not available in Lubuntu. Diskdigger : Can be installed in Lubuntu. Here is the oficial documentation for installation. testdisk : Available in the universe repository. You need to enable it first (if not done already). Run the following command to enable it (assuming you are using Lubuntu 14.04 an...
Installing in Lubuntu?
1,436,561,452,000
I just installed Linux Mint 17 and when it asked me where to install it I selected the option to overwrite the old Mint 14. Previously I had also windows with NTFS partition of 900GB. Not it is all formatted into ext4 and all the information of almost 800GB is lost. Please advise what I can do in this situation. It wa...
Well thanks @krowe. I'm on laptop so can't really use different hard drives. And this particular case was due to misleading information in the installation of Mint 17. Any way I have found a way to recover all the files i need and will drop a line here what is it all about. So first i found a live linux usb and star...
How to recover NTFS drive formatted in ext4?
1,436,561,452,000
Due to an accident specifying a block device, the first 32GB of a 4TB ext4 filesystem on a SATA disk was overwritten by the dd command with the contents of a USB flash drive. fdisk -l /dev/sda reports the following: Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors Units: sectors of 1 * 512 = 512 bytes S...
You should make a full "dd" copy of the partition to another device, just for safekeeping in case something goes wrong. In general, e2fsck should be able to recover from such an issue, subject to loss of the overwritten metadata. The superblock, root directory, journal, and other metadata would be lost. However, the...
First 32GB of a 4TB ext4 filesystem overwritten. How to recover?
1,436,561,452,000
I have an ssd that has had a hardware failure of some kind, I can rma it as it is still under warranty but their service does not include data recovery. I have collected my work files from it but my personal files and plugins are still there and I would like to recover them. The catch... Bandwidth and total copy size ...
Reports bad sectors everywhere (false) "sectors" is not a thing that exists on SSDs. "blocks" do, and if your drive reports them as bad that means, because there's nothing to fail mechanically: Asserted the address lines to get these bits of the block Read out the memory cells, which means "gotten a vector of volta...
Recover files from hardware failed ssd
1,436,561,452,000
I have two 1TB NVMe SSDs that was setup using LVM in a manner where the two drives were combined to make up (roughly) one single 2TB logical volume. The laptop that booted from these drives has been sent off for repairs and whether it can be fixed or not is uncertain. In the meantime, I'd like to recover the data and ...
You don't need a VM, if your second computer also runs Linux, then you just need to install LVM (package is usually called lvm2), if you don't have it already installed and connect both drives (I don't have personal experience with USB NVMe enclosures, but these look fine if you don't have an option to use an internal...
Recovering Data from 2 NVMe SSDs that Were Setup Using LVM
1,436,561,452,000
I recovered images from an android LOST.DIR folder. The data recovered successfully, now I'd like to set the modified timestamp of the file to be equal to the created on value of the binary data. I'm using Ubuntu 19.10 In this case, I'd like both modified and created on to equal 2019:06:03, the format doesn't matter...
You need an EXIF tool to retrieve the image creation timestamp, then use touch to set the filesystem timestamp accordingly. I just tried this shell script (e.g. ex.sh) under ArchLinux where I installed perl-image-exiftool #! /bin/bash for fn; do ls -l "$fn" touch -m -t "$(exiftool -createdate -d '%Y%m%d%H%M.%...
How to set modified file's metadata to equal the created_on value of recovered images?
1,436,561,452,000
I'd like to recover the contents of a directory from a Windows 7 machine with a corrupted hard drive. So far I've been able to boot up the machine with an Ubuntu live USB, and the Windows 7 drive is mounted but I cannot list all the contents of the subdirectory that I'd like to recover. I've also tried copying the dir...
While doing so would be cool and reduce stress on the already damaged drive, the tools freely available in Linux are not really good at handling damaged NTFS. The only practical thing you can do is copying the entire partition (or even the entire hard-drive) to a new one, then use Windows tools to examine it. I recomm...
Using Linux live USB to bit copy a single directory from a corrupted hard disk
1,436,561,452,000
I have lost dates (film files and docs) on my external hard disk with dd (hd was on ext4 format, 2TB and had only videos and some files). I "restore" them with PhotoRec, with bad quality... Because I will learn for my mistake, I will learn how to does an external hard disk safe.., so, next time, when similar mistake ...
In Arch's wiki you can find a list of utilities for recovery data. I recommend the use of ext4magic or extundelete, which are optimized for ext. In turn, there are various tools to automate your backup like tarsnap amd restic.
Recommendation for securing a external hard disk
1,436,561,452,000
sorry about my English... I have lost dates on my External hard disk with dd (I have on my External hard disk with ext4 format and have only videos and some Files), now to try the dates from my hard disk to recover. Here to find how to does it sudo ddrescue -f -r3 /dev/sdb1 memorycard.iso memorycard.log Why agc use ...
The man pages for ddrescue are here. The command options tell ddrescue to -f Force overwrite of block devices if you are not copying your data to a regular file. In this case the option will do nothing because you are making a copy to a regular img file. -r3 Retry any bad sectors 3 times /dev/sdb1 The path to the ...
ddrescue Understand
1,436,561,452,000
im unable to google this one out: which filesystems are available, which contain any form of a data loss prevention in case the medium (hdd) itself will become faulty? and potentially automatically fix the corrupted file/bit/bytes possible solutions i can think of (and the effect): internal raid to copy all data (pa...
Fault Tolerance is the phrase to use in your search; my search revealed OpenZFS has block-level cryptographic checksumming to accurately find corrupt data, BtrFS checksums on data and metadata (crc32c), and Microsoft ReFS with metadata checksumming. Replace HDDs with more reliable SSDs is another good idea. Combine t...
Which filesystems contain data loss prevention mechanism?
1,436,561,452,000
This morning, as usual, I mounted a 622 GB Windows (NTFS) partition on Linux for use. When I went on to unmount it through the graphical disks tool on GNOME, I accidentally formatted it, and now it’s an unallocated space on my hard drive. I had loads of important data in there. Is there any way to recover it?
You can use photorec/testdisk for this kind of tasks depending on how you degraded your partition. photorec is for data recovery while testdisk can be used to recover partitions. See here and here.
How to fix or retrieve data from an NTFS partition that was (re-)formatted with gnome-disk?
1,436,561,452,000
This might be a edge case, but here goes... I'm recovering data from a 2TB harddrive. It's mountable only if I use mount -r, and I'm using rsync --files-from to copy important directories. Every once in a while it fails and needs to be restarted (powercycled). I wish there was a way to cache the entire directory tree,...
The (meanwhile) only way I see to do that is independent of the used filesystem because it acts on the block layer. What one would want is a kind of lvmcache: Seit it up for the device, then read the filesystem metadata (find /path/to/mountpoint -perm 700 -printf "") so that it gets copied to the cache device and then...
Maintain filesystem separately from data
1,436,561,452,000
I am on Debian 8.6 and have 1x 4 member RAID6 2TB size in effect. Apart from backup system I now need to decide what filesystem to use. The purpose of this array is reliability, availability, and the possibility to recover deleted files.
Use ext4. The mature (and not stale) choices are basically ext4 and xfs. Redhat like XFS for it's scalability, performance. I have nothing against it but ext4 is more commonly used and hence slightly better understood (community documentation like StackExchange). Don't expect to recover unlinked files. There used t...
Linux filesystems recoverability
1,436,561,452,000
I wanted to create bootable usb (dd bs=4M if=input.iso of=/dev/sdc) but sdc is my hard disk with two partitions: 1 simply ext4 and 2 encrypted LUKS. After this action I got Windows installed on my hard disk. How to recover encrypted partition after run dd comand?
It depends whether you have overwritten the beginning of the encrypted partition. The beginning of the encrypted partition is where the key is stored¹. If you've lost that, the data is undecipherable, and the only solution is to restore from a backup. If you only overwrote the first 4MB of the disk, and if the non-enc...
How to recover encrypted partition after dd command [closed]
1,436,561,452,000
I'm currently in the business of recovering data from a damaged---and dying---hard-drive (check this question for background info). The damaged hard-drive is 250GB, and I intend to use dd or ddrescue to clone what is left of the disk (as suggested in How to clone a NTFS partition (WinXP) from a damaged disk to a new o...
Same size should be fine, however, I believe dd copies sector for sector, so when the source disk is only by one sector larger I think you will run into problems. Better just get a larger HDD. You can use Gparted to enlarge the original partition to fit even more files. http://ubuntuforums.org/archive/index.php/t-1572...
What is the minimum size for the medium used to clone a damaged hard drive?
1,436,561,452,000
I didn't lock the screen on my OpenSuse Linux and let my girlfriend do all evil things when I was sleeping. Is there a way to find out if she deleted any files from my PC? I was looking at the "Date Modified" timestamp of my folders and then I tried to delete something and that date didn't change. I was also looking a...
I don't work with OpenSuse, but as I know, there is no logs on trashcan. But if content of a directory change, His modification time have to change too. At all, there is a few possibility to restore something, but: You have to stop immediatly your disk activity (in root: mount -o remount,ro /home if /home is the moun...
How to find last deleted files on OpenSuse?
1,436,561,452,000
This question is following Unable to mount /home/ partition after reinstalling grub after reinstalling windows 7 where the diagnostic was that installing windows 7 deleted my /home partition, lovingly called /dev/sda3. Since almost nothing have been done with this computer since the incident, we can expect that the co...
Right off the bat make a dd disk image of the drive, and work with that instead of the drive itself. That lets you experiment. dd if=/dev/sda3 bs=1M > sda3.img Beyond that I'm not sure. I'd hit google. Might look at it later. edit; http://www.cgsecurity.org/wiki/TestDisk looks promising.
how to restore a logical partition to its original ext4 format
1,436,561,452,000
On my ubuntu system I ran a command and moved all my jpg files to a single file by mistake src_dir=$1 echo "src_dir: $src_dir" for f in $src_dir/*; do if [ -f $f ]; then new_dir=$(date -r $f +"%b_%Y") if [ ! -d $new_dir ]; then mkdir $new_dir fi echo "File: $f " ...
If recoverJpeg and scalpel can't find them, I'd say no. However, once upon a time, those files existed simultaneously, so their data occupied different places in the disk. Moving files inside the same mount point should be nothing more that removing the old inode on the source folder, and creating a new inode on the...
How can I recover moved jpg files
1,436,561,452,000
Currently I believe I'm experiencing drive (HDD) failure. It is a single partition drive for extra storage. When I attempt to mount it I get the following error: # mount /dev/sdc1 /mnt mount: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error In so...
For anyone who finds this question, I managed to resolve the issue without resorting to photorec or other salvaging tools. I made a full disk image, just in case, using ddrescue but ended up not needing it. Running badblocks and looking at SMART data I determined that there is 1 damaged sector which is somewhere in th...
How to browse an img from a broken drive (restore lost data)
1,436,561,452,000
The problem I erroneously removed several files from my /home/username with rm. I realized the mistake as soon as I hit enter, but the damage was done. I immediately created a full disk image with sudo dd if=/dev/sda of=/media/username/external_drive/image.iso and copied it to another PC and prepared to follow a very ...
I managed to restore many, maybe all, of the files I lost with photorec. I read about it in a forum page I can't find anymore and thought "let's just give it a try to this other tool as well". I ran $ sudo kpartx -a -v image.iso # map the disk image partitions add map loop0p1 (254:0): 0 997376 linear 7:0 2048 add map ...
Restore files removed with rm (even from a LUKS-encrypted disk)
1,436,561,452,000
I had a dual boot system with windows 10 and ubuntu 18. Recently the system failed, the motherboard probably got fried by lightning during a thunder storm and its not booting anymore, no fan, no lights, totally dead. So I salvaged the hard disk to recover the data from it. I plugged in the hard disk to a windows machi...
The Ubuntu partitions will be ext4, so you won't be able to see them on Windows. There is some software you can use to read ext4, but I have never found anything that worked satisfactorily. Your best chance is probably using a Linux live USB drive. Instructions for creating one with Ubuntu can be found here. Boot usin...
Dual boot system failed, ubuntu file system missing during hard disk data recovery
1,436,561,452,000
Origin From https://btrfs.wiki.kernel.org/index.php/FAQ#What_are_the_crash_guarantees_of_overwrite-by-rename.3F Overwriting an existing file using a rename is atomic. That means that either the old content of the file is there or the new content. A sequence like this: echo "oldcontent" > file # make sure oldcontent ...
By moving the sync after echo "newcontent" > file.tmp, you’re ensuring that the contents of both files are on disk. This removes the “files.tmp may be zero-length” variant. The remaining uncertainty, if a crash occurs after the sync, only concerns the directory entries, i.e. which file points where. After moving the s...
What are the crash guarantees of rename by an extra hardlink?
1,436,561,452,000
When copy and pasting commands with a space at the end it automatically runs the command without requiring the user to press enter. This is why I overwrote a large text file with a cp ./newfile ./oldfile command. How can I restore the oldfile after I aborted the command? The oldfile is on a hard drive encrypted with V...
The disk is encrypted so there's absolutely no point in looking on the disk for a plain text string. At best you need to search the mounted filesystem, as this is the decrypted layer, but any writes to it whatsoever are likely to overwrite your deleted data. Look at the output of this command to identify the filesyste...
How to recover an overwritten file from a mounted VeraCrypt encrypted disk?
1,436,561,452,000
I have a 3 drives RAID 5 on a CentOS NAS but 1 drive died. Since then, CentOS boot in emergency mode and I can't manage to get access to my data. I tried mdadm --assemble --scan and command returns mdadm: /dev/md2 assembled from 1 drive - not enough to start the array while I have 2 disks running. Is it possible to re...
It looks like you have an out-of-date RAID superblock. Did one disk fail (removed from the array) and then another one died? Does mdadm --assemble --force -v ... work? You should be able to rebuild the superblock with for example mdadm --create /dev/md0 --level=5 --raid-devices=3 --assume-clean /dev/sde1 /dev/sdf1 mis...
Can I re-assemble my RAID 5 on only 2 drives using mdadm to recover my data?