My hard drive got corrupted at some point after mounting an mtpfs system. I would ask how to fix that, but I'm not confident about the partition and file system types.
My OS is new Fedora Core 23, but the partition was originally created under FC 20, likely as whatever it defaults to.
cat /proc/version Linux version 4.2.3-300.fc23.x86_64 firstname.lastname@example.org) (gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC) ) #1 SMP Mon Oct 5 15:42:54 UTC 2015
The fdisk program reports the following partitions as below. As one might imagine, I'm most interested in /dev/sdb3, but that's the most corrupted. I'm not sure why /dev/sdb2 reports "Microsoft basic data", but at least it can be mounted and read, whereas the /dev/sdb3 partition cannot be mounted.
sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.27). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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: gpt Disk identifier: 59CA4127-4BEE-40F4-A514-9DA368C81665 Device Start End Sectors Size Type /dev/sdb1 2048 411647 409600 200M EFI System /dev/sdb2 411648 1435647 1024000 500M Microsoft basic data /dev/sdb3 1435648 1953523711 1952088064 930.8G Linux filesystem sudo mount /dev/sdb3 /mnt/sdb3 mount: /dev/sdb3 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sdb3, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.
I didn't see anything related to mounting, partitions or related in dmesg or the systemd log via journalctl.
Apparently, the superblock couldn't be found:
sudo dumpe2fs /dev/sdb3 dumpe2fs 1.42.13 (17-May-2015) dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb3 Couldn't find valid filesystem superblock.
My questions are: What filesystem is /mnt/sdb3 really? How could I find out (is there a magic number or eyecatcher I could locate and dump somewhere)?
Once I know this, I could probably change the partition type accordingly. The TestDisk utility would be more helpful if I could only know what the filesystem is, such as a dos partition scheme with /dev/sdb3 being ext4 for example.
Update: I think I encrypted it back when I set it up. I viewed the /dev/sdb3 partition in a hex editor and also piped a good portion of it through strings and didn't recognize anything. There's a bunch of what looks like repeating patterns. Also, my old grub.cfg has these lines:
linuxefi /vmlinuz-3.19.8-100.fc20.x86_64 root=/dev/mapper/fedora_ralph-root ro rd.lvm.lv=fedora_ralphdfl/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora_ralphdfl/root rd.luks.uuid=luks-a0d2613e-ce2a-4a6b-96cf-b999b3a36ab8 rhgb quiet LANG=en_US.UTF-8
Unfortuantely, it's not being recognized as an encrypted drive: cryptsetup -v luksDump /dev/sdb3 Device /dev/sdb3 is not a valid LUKS device. Command failed with code 22: Invalid argument
Getting the old passphrase is doable though. At this point, would I be better off taking it to a data recovery company? I can take a loss of much of it, but there's a few key files I'd really like to get back.
Thank you in advance.