Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 12-19-2007, 05:51 PM   #1
Registered: Feb 2005
Posts: 61

Rep: Reputation: 16
fixing mbr on usb


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.


I use suse linux.

Old 12-19-2007, 05:59 PM   #2
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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.
Old 12-19-2007, 07:20 PM   #3
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
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.

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

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.
Old 12-19-2007, 07:30 PM   #4
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,832

Rep: Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007Reputation: 4007
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.
Old 12-20-2007, 04:50 PM   #5
Registered: Feb 2005
Posts: 61

Original Poster
Rep: Reputation: 16
testdisk worked fine. Thanks.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixing Windows MBR with Knoppix dbough Linux - Newbie 5 04-22-2007 05:53 AM
Erasing MBR from USB stick spiffytech Linux - Software 9 01-10-2006 05:38 PM
fixing my mbr bernstein Linux - General 7 06-30-2005 10:24 PM
Linux on Hdd and MBR on USB bigbossandy Linux - Newbie 1 05-27-2005 02:00 PM
Restoreing MBR & Creating USB Bootable Pendrive ady Linux - Newbie 3 05-16-2005 02:47 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration