Lost MBR writing image to USB drive with DD

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
sbramguy
Posts: 8
Joined: 26 Feb 2015, 09:52

Lost MBR writing image to USB drive with DD

#1 Post by sbramguy »

Hi folks... A few years back I managed to restore an entire disk with Testdisk I had accidentally lost executing the wrong DISKPART command. So after stumbling through a few approaches for correcting this current problem, I remembered to go back to Testdisk.

My problem started when I wrote an ISO Linux Mint LiveCD image to a USB flash drive with DD for Windows. The drive originally had GPT partition table written by gparted in Linux. After writing the image to the drive with DD for Windows, I booted it to install Mint onto another USB drive. Booted into Linux, gparted presented the following error message:

"Warning: /dev/sdc contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. "

Somewhere along the way in attempting to address the problem, the GPT data was lost. However after having Testdisk do a "Deeper Search" on the drive, it did find a backup FAT32 MBR at the end of the drive:

Code: Select all

1 * Linux                    0  32 33  2867 181  2   46067712
2 P FAT32 LBA             3721   1  1  3910 254 63    3052287
But I don't know enough about what is going here to feel confident of having Testdisk write the backup to the main partition table because of the enormous size of Linux partition that the deeper search also listed.

I'd really appreciate someones thoughts on whether or not it may be safe to write the backup partition table to the main one at this point. Here's the Testdisk log of the session: https://onedrive.live.com/?cid=2F2DE919 ... 6708E0!107.

Thanks

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Lost MBR writing image to USB drive with DD

#2 Post by cgrenier »

For each partition, use 'p' to list the files. This way you will known if the partition is valid or not.

sbramguy
Posts: 8
Joined: 26 Feb 2015, 09:52

Re: Lost MBR writing image to USB drive with DD

#3 Post by sbramguy »

cgrenier wrote:For each partition, use 'p' to list the files. This way you will known if the partition is valid or not.
Thanks for addressing this Christophe.

A 'deeper search' on that Windows version 7 of Testdisk found 1 Linux partition, 6 Linux Swap partitions, and 1 FAT32 LBA partition on the USB flash drive. No files were found running P on any of the partitions.

Here's the Testdisk ver7 log from Windows: https://onedrive.live.com/?cid=2F2DE919 ... 6708E0!159

But when I insert the USB drive into a Linux Mint system, the file manager there can read all the Mint installer files that DD for Windows wrote to the drive.

I could only get Testdisk v6.14-2 to install in Mint. Unlike the Windows v7 version of Teskdisk, the Mint copy found only 1 Linux partition and 6 Linux Swap partitions. It didn't find the FAT32 LBA partition that Windows Testdisk ver7 had found. And no files were found running P on the 1 Linux partition it did find (and none running P on the swap partitions).

Here's the Testdisk ver6 log from Linux Mint: https://onedrive.live.com/?cid=2F2DE919 ... 6708E0!160

Understand... I'm not interested in recovering any of the files on the drive. I'd just like the drive to be usable in both Linux and Windows. Seems a while back I had a similar problem, and just let Windows reformat the drive. Maybe that's the easiest thing to do with this drive.

sbramguy
Posts: 8
Joined: 26 Feb 2015, 09:52

Re: Lost MBR writing image to USB drive with DD

#4 Post by sbramguy »

It would have been nice to figure out how to fix the partition problem on this drive. But since I got no further feedback on the issue, I opted just to reformat it. Windows started the process, but failed. Linux had no problem reformatting it FAT32. So it's in business again.

Locked