You are not logged in.
Pages: 1
Well, I screwed up one of the HDDs that I have installed, causing the computer to not be able to recognize the filesystem type. The HDD was on sdb and had two partitions, one NTFS for Windows, and another Fat32 that I was storing media on. I did some reading around and found testdisk and I was able to get back into the Windows partition, but I've no idea how to find the media one. Does anyone have any ideas? This media one is the most important one for me to recover.
I tried photorec too, which comes with testdisk, but it was only pulling stuff from the windows partition, not the other one.
Offline
could you say what you did to screw it up?
Also if you have the space do a dd copy to a file and then mount the file and try to recover from the file, that way if you make a mess of it the origonal drive is still un touched.
Offline
I hard reboot the computer while it was loading. I had an HDMI cable plugged in and forgot, so the loading was all being done on the TV which it is attached to, and which I couldn't see, so I couldn't choose the Windows partition from GRUB when it came up.
Will dd copy both partitions? I don't even know if that media partition is availble, what's the easiest way to check that?
Offline
I always save a copy of the MBR in case something goes wrong. Once deleted the partition table and couldn't get my partitions back, but I had a copy of it. It's also useful if you thing some malware is in the MBR (specially since you use Windows too).
Backup and restoration
Because the MBR is located on the disk it can be backed up and later recovered.
To backup the MBR:
dd if=/dev/sda of=/path/mbr-backup bs=512 count=1
Restore the MBR:
dd if=/path/mbr-backup of=/dev/sda bs=512 count=1
Warning: Restoring the MBR with a mismatching partition table will make your data unreadable and nearly impossible to recover. If you simply need to reinstall the bootloader see GRUB or Syslinux.
To erase the MBR (may be useful if you have to do a full reinstall of another operating system) only the first 446 bytes are zeroed because the rest of the data contains the partition table:
dd if=/dev/zero of=/dev/sda bs=446 count=1
If it ain't broke, you haven't tweaked it enough...
Offline
I always save a copy of the MBR in case something goes wrong.
Bit too late for that advice. And MBR is not the only thing available these days..
What you want is testdisk, you just have to force it to look for other patitions. I can't tell how as I don't have it handy right now.
It would however be a good idea to do all this recovering on a dd backup. Yes, dd can copy all partitions. In fact it is partition-agnostic. As long as you do a dd of the entire harddrive (i.e. /dev/sdb) all the raw data from it will be copied regardless it's logical purpose.
The best thing to do would be just figuring out MBR settings (block size, alignment, partition start and partition size), force-writing it back to the MBR using fdisk and then mounting the partition. All this, of course, on a dd copy.
Also check this out: http://tldp.org/HOWTO/Partition/recovering.html
-m.
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
I found no viable way of recovering my partitions since I never run unencrypted systems. It seems impossible for all recovery software to distinguish between random data and encrypted partitions. So basically my scheme is:
* 1 GB for /boot - Unencrypted
* 60 GB for / - Encrypted
* 8 GB for /swap - Encrypted
* The rest (around 860 GB) for /home - Encrypted
I store both 'MBR' and '/boot' on my encrypted /home, this way I can recover them later if I want to.
If it ain't broke, you haven't tweaked it enough...
Offline
There is another link: https://wiki.archlinux.org/index.php/File_Recovery
Caution:
i) Be sure, what you are doing.
ii) Backup everything.
iii) dd your whole hdd/ssd (you need same amount or bigger hdd/ssd for this kinda stuff).
iv) photorec (sometimes with large amount of data, it may be cumbersome to find what you really looking for) whereas, testdisk is pretty easy as you can recover not only media files but folders and other stuff too exactly in the same manner as it is in the hdd.
To use testdisk, all you need to start testdisk:
testdiskQuick search / Deeper search -> select the deleted partition -> browse the list of files and select by options given below -> select the folder to recover the files -> Hurray
Or if you are not sure what to do and you need your data badly, then i suggest you to find some professionals nearby your area and *pay* them.
Last edited by arcon (2013-09-25 13:28:32)
The short cuts are only short because they don't actually go anywhere. -- Trilby
Nothing feels better than being understood -- awayand
A pathetic dreamer ![]()
Offline
I always save a copy of the MBR in case something goes wrong. Once deleted the partition table and couldn't get my partitions back, but I had a copy of it. It's also useful if you thing some malware is in the MBR (specially since you use Windows too).
This is good advice; however, most newer computers use the GUID Partition Table (GPT), not MBR, so backing up the MBR won't be of much use with them. To create a backup of a working GPT, I recommend using gdisk; its "b" option will back up the GPT data to a file. You can then restore the data using the "l" option on the recovery & transformation menu.
Of course, this doesn't help Somnus. I'm posting it just in the hope that somebody will follow this advice and be saved Somnus's pain in the future.
As to Somnus's problem, if you've recovered one partition, it's conceivable that you'll be able to recover the other just by creating a new partition in a suitable spot. If the recovered partition is the first one on the disk, and if they were both primary partitions, use fdisk (or gdisk if the disk was GPT) to create a new partition beginning on the first sector after the end of the existing partition. If the second partition was a logical partition, then I recommend creating a new primary partition with a gap of 2048 sectors. (I don't recommend creating a new logical partition because that requires writing data to the disk in an area that might hold filesystem data if you guess wrong about the partition sizes.) If the recovered partition is at the end of the disk, create your new primary partition beginning with sector 2048.
Once you create the partition, you can try mounting it. If that fails, though, do not use "fsck" or other recovery tools on the partition -- at least, not in a mode that changes data in the partition. A failure to mount the partition could indicate filesystem damage, but it could also be that you guessed wrong about where the partition begins. If you guessed wrong and use "fsck" to "fix" the data, you'll end up doing more damage. You could use "fsck" in a mode that scans but does not write data to see if it seems to think there's a real filesystem in the partition. Read the "fsck" man page (or, better, the "dosfsck" man page, since it's a FAT partition you're trying to recover) to learn about its options. I don't recall what they are, offhand.
This approach of guessing about where the partition begins is an act of desperation, but it sounds like you're at that point....
Offline
Pages: 1