Find the answer to your Linux question:
Results 1 to 2 of 2
A a major mistake has happened while attempting to clear out the MBR of one of the hard disks of my machine. Instead of clearing out the MBR of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    gcx
    gcx is offline
    Just Joined!
    Join Date
    Oct 2011
    Posts
    8

    Retrieve deleted MBR


    A a major mistake has happened while attempting to clear out the MBR of one of the hard disks of my machine. Instead of clearing out the MBR of the target hd I have cleared out the MBR of my TrueCrypt encrypted storage hd by using:

    dd if=/dev/zero of=/dev/hdx bx=512 count=1

    Unfortunately I have no backup of the MBR. If I had one I would not have to write this post.

    Is there any possibility to restore/retrieve the original MBR that I have deleted, so that I can write it back to the hd?
    Since the hd is encrypted I need to get the original MBR back. But how?

    Any help is greatly appreciated.

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    917
    Quote Originally Posted by gcx View Post
    A a major mistake has happened while attempting to clear out the MBR of one of the hard disks of my machine. Instead of clearing out the MBR of the target hd I have cleared out the MBR of my TrueCrypt encrypted storage hd by using:

    dd if=/dev/zero of=/dev/hdx bx=512 count=1

    Unfortunately I have no backup of the MBR. If I had one I would not have to write this post.

    Is there any possibility to restore/retrieve the original MBR that I have deleted, so that I can write it back to the hd?
    Since the hd is encrypted I need to get the original MBR back. But how?

    Any help is greatly appreciated.
    Hello,

    For basic file systems (not encrypted), you can use any live distro that includes the program 'testdisk' This is included in "Ubuntu Rescue Remix" which is a nice command line recovery distro.

    testdisk is pretty simple to use, IMO, but there's plenty of info on google if you need additional help.

    You may also have to use a partition tool such as parted to set the boot flag on the partition that contains your boot loader.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •