I backed up and zero outed mbr and kept back up on same disk
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Since the OP only zeroed out the MBR the file-system is untouched. The fun thing is that Testdisk should be able to recover the disk, since you have made a backup copy of the MBR. Did you make a deep scan with Testdisk?
I see where I went wrong here, I completely overlooked the byte size and count arguments. Without those two arguments then I would be correct as the entire /dev/sda disk would have been overwritten but only the first 512byte block wouldve been over outputted to by the dd command here.
Again, sorry to the OP not sure why I didnt see that the first time through, been a long day heh
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Isn't it possible to just create a partition starting at the beginning of the disk with a length which is approximately the same as it was? 99 chances out of 100 you get the beginning of the partition right and you can mount the file system. Of course it would produce errors when checking the fs, but maybe you are able to get the mbr image file.
Should be possible, if you can figure out if the partition should begin at sector 63 (partitioned by older Windows versions and older versions of Linux) or sector 2048. And of course assuming that the partition with the MBR copy on it was the first partition in the disk.
I tried testDisk:
It detects partition table type as EFI GPT
This likely means all the old presumptions about partition location are invalid.
I'm mildly surprised the OP could actually zap the dummy MBR that gpt uses for compatibility. "dd" is kinda stupid that way - it does what its told to do.
If testdisk won't find your files, you might have to resort to a scraper like photorec or foremost. Ugly, very ugly.
If the disk was, at some time in the past, partitioned with GPT, then there would be a backup GPT at the very end of the disk. If you've zeroed out the MBR and its primary partition table, testdisk is going to see that old backup GPT and think that was how the disk was last partitioned.