LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fixing mbr on usb (https://www.linuxquestions.org/questions/linux-newbie-8/fixing-mbr-on-usb-607980/)

i_s 12-19-2007 05:51 PM

fixing mbr on usb
 
Hi,

I think while playing and not really what I am doing, I damaged the mbr on my usb stick.

I used the command dd if=/dev/zero of=/dev/sdb bs=512 count=1

Is there away to recover the mbr and keep the data.

Thanks.

I use suse linux.

i.s.

pljvaldez 12-19-2007 05:59 PM

Try using the program testdisk. You may be able to repair the partition table that way. If that doesn't work, try using photorec or foremost to recover the data.

Typically, I make an exact copy of the drive using dd to my hard disk, and then try using the programs on that. Then if it works and I can repair the image file, then I go back and work on the actual usb key.

rootboy 12-19-2007 07:20 PM

Render unto Caesar...

...and download a repair tool for Windows. I just researched this same problem for a guy in another forum, and the easiest method ended up being downloading a Windows utility and fixing it that way.

http://www.downloadjunction.com/prod...517/index.html


There is a linux alternative, if you insist...

http://www.tux.org/pub/people/kent-r...looplinux/rip/



There should be a second copy of your FAT that can be used to rescue the drive. I'd do what pljvaldez suggests, before making any changes to your USB stick.

syg00 12-19-2007 07:30 PM

This is partition table obliteration, not FAT corruption. Testdisk should do the job easily.
On a stick there's generally only one partition anyway - I'd give it the lot and see if it's recognised.

i_s 12-20-2007 04:50 PM

testdisk worked fine. Thanks.

i.s.


All times are GMT -5. The time now is 11:52 AM.