LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 16
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.
 
Old 12-19-2007, 05:59 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
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
rootboy
Member
 
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.

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

Rep: Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092
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
i_s
Member
 
Registered: Feb 2005
Posts: 61

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

i.s.
 
  


Reply


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


All times are GMT -5. The time now is 02:47 AM.

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