LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-14-2004, 10:37 AM   #1
michelbehr
Member
 
Registered: Oct 2003
Location: Brazil
Distribution: Gentoo
Posts: 35

Rep: Reputation: 15
Unhappy Newbie erased his MBR...


Hi!

I'm using Slackware 9.0 for about 3 months, but after I installed back there, I couldnt get my Windows partition to boot up (yes, i kept it on a different partition, did the dual boot thing with LILO, etc...) That wasnt a problem, since I was REALLY into linux... But what happened was that when booting, at LILO options box, if I was to choose Windows, it would just do nothing, it would get back to the same menu, until I hit Linux... So yesterday I got the courage to try to fix that... as a stupid "I-KNOW-WHAT-I'M-DOING" newbie, I simply erased my MBR by copy/paste some command like dd if= ... of ... 512... Well, googling about the shit I made, I discovered I just fucked up my MBR, probably even setting the wrong blocksize, etc...

The result: I couldnt get ANYTHING to boot up... So I was wondering: man, am I gonna loose ALL my data?! Just because of MBR?! Imean, ITS THERE, my data ITS THERE!!... Well, a friend of mine gave me an idea: run a LIVE Distro (like Knoppix) just to access your data, your partitions, back it up, and then reinstall your favorite distro... the thing is, after running Knoppix (in fact a brazilian version of that, called Kurumim) from CD it wouldnt recognise my partitions!! :-( Ironically it only recognised my Windows partition... :*( when I do cfdisk it says I have one Windows partition and... the rest is free space!!... So, I cant see any of my data... any of my documents... It's all fucked up... :-( I had 3 partitions: Windows System, Linux System, and a DATA partition... I can only see the Windows System...

I'm preparing myself psycologic to loose all my data... but if anyone have ANY idea about how to recover my data, PLEEEEEASE share it...


Thanx in advance!!
 
Old 05-14-2004, 11:38 AM   #2
Inhibit
Member
 
Registered: Apr 2004
Distribution: Mandrake, Gentoo, SuSe, JDS
Posts: 53

Rep: Reputation: 15
Sounds like you overwrote more than your master boot record. Do some googling for "ext3 ext2 partition restore" if you want to see if it's recoverable. One specific utility I've used before is http://e2salvage.sourceforge.net/ . Restoring partitions is something you might not be able to do though, depending on what was overwritten.
 
Old 05-14-2004, 11:53 AM   #3
sbogus
Member
 
Registered: May 2004
Location: Germany, Munich
Distribution: SuSE Pro Releases 7.3, 9.0, CentOS 4.0, Kubuntu 6.0x
Posts: 103

Rep: Reputation: 15
Hi michelbehr,
From newbie to you...

Ouch! It seems you busted not only your MBR, but also the partition table as well. And that's weird. You could at least rescue your Windows partition if you use the system recovery console from your Windows Repair CD. You might try to do some MBR-fixing and to see if you can boot to Windows. For the killed linux partitions, I'm sorry - I do not have cure for this cancer...
At least you could try to boot in the Rescue: system (from your Slack boot CD, choose Rescue System), and then try to issue fsck /dev/hda and see what it will deliver to you. I assume you have only one disk and it is IDE one. If you have more disks then you should replase the "a" with whatever the letter appropriate for your disk is. If you have SCSI disks use /dev/sdX instead of /dev/hdX.

That's I could tell you, hope to helped you.

Kind regards,
sbogus
 
Old 05-14-2004, 12:05 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
This utility might help:
http://www.cgsecurity.org/index.html?testdisk.html
 
Old 05-14-2004, 12:13 PM   #5
eddieroger
LQ Newbie
 
Registered: May 2004
Distribution: SuSE 9.0 Professional
Posts: 3

Rep: Reputation: 0
I once did the same type of thing. The route I chose was to save Windows (it was my primary machine, I was young) and reinstall Linux. From a Windows XP CD, you can go to the Recovery Console (option 'R') and re-run fdisk with the MBR option. So, you command would be -

fdisk -MBR

This will restore your MBR and let Windows boot again. Not the best option for Linux users, but I don't know if you're primarily Linux or what, and anything is better than nothing. Hope it helps.
 
Old 05-14-2004, 12:24 PM   #6
michelbehr
Member
 
Registered: Oct 2003
Location: Brazil
Distribution: Gentoo
Posts: 35

Original Poster
Rep: Reputation: 15
Just to register, my Linux partition is more important, although its on an extend partition... I had 3 partitions: Windows, Data, and Linux... Windows were dead, indeed I wasnt able to boot up Windows, so I learned how to live without it (which was a good thing)... Data (fat32) was where I used to put large data, especially my 2GB of mp3 (I think im gonna cry!) and Linux had some important documents that I used to save on my Home directory... So for me, the best thing was to recover Linux, because the mp3 I can get back from my roommate, he has about 50% of the mp3 i used to have...

Anyway, I didnt look the links suggested yet, but as soon I get something I'll post here...

I'd like to thank you guys that posted those links!! Any more suggestions will be welcome!! (Sorry for my english, im brazilian!) :-)

Last edited by michelbehr; 05-14-2004 at 12:30 PM.
 
Old 05-14-2004, 05:06 PM   #7
Seraph1
LQ Newbie
 
Registered: May 2004
Distribution: Mnadrake 10
Posts: 14

Rep: Reputation: 0
I am in no way trying raise above my n00b status but personally I would scrap is off as a lesson and learn from your mistakes. I have lost many of files through accidents and you eventually learn to rebuild. IMO if you decide to start over by reinstalling everything, I would get another small harddrive for either Windows or Linux. I have found that data loss is much less of a worry when you are partitioning and moving things around. 1 slip can easily destroy data on a drive. I learned this lesson when I tried to install Mandrake and during partitioning I hit the clear button thinking that it would clear the changes that I was making. Wrong, it clears ALL partitions. So I just chaulked it up as a lesson and had to move on.
 
Old 05-14-2004, 10:13 PM   #8
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Rep: Reputation: 30
I firmly believe that you should never put two OSes on the same drive. You could get a cheap 10 gig drive and put windows on one and linux on the other, and still be able to dual boot, without worrying about MBR problems, etc. That's what I do. Just as long as you know which drive's MBR your linux installer modifies when it does the install...
 
Old 05-16-2004, 11:41 PM   #9
michelbehr
Member
 
Registered: Oct 2003
Location: Brazil
Distribution: Gentoo
Posts: 35

Original Poster
Rep: Reputation: 15
Thumbs up Solved!

Thanx Demonbane!!

Testdisk did it! At least the important partitions... The program is very easy to use. From what I read at their site, you should only hit WRITE if the partitions shown by the program are the way you know they are! And it was! So I said "Ahh, WTH, write the damn thing! It cant get any worse!" :-) And it fixed...

I still can't boot my Windows partition but... who cares?! ;-)

As I was running Kurumim to get things done, testdisk was already included on the CD, so it couldnt be easier...

But after some hours of dispair, I think Im gonna organize my machine this time... I liked Kurumim, probably Knoppix is good too, I think I'll try some of them out...

Thanx for all the replies!! C ya!!
 
Old 01-09-2006, 04:42 AM   #10
H2O-linux
Member
 
Registered: Sep 2004
Location: Second ring of youranus
Distribution: debian testing
Posts: 153

Rep: Reputation: 30
just another newb

After stumbling upon this thread I said what the hell and tried the "fdisk /mbr" to set W2K back to where she was. All I can say is "WHAT THE HELL ARE YOU PEOPLE THINKING I HOSED MY SYSTEM 4 YEARS OF FILES GONE!!!

seriously it works great
 
  


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
Slackware MBR erased by Windows Dankles Slackware 4 10-17-2005 09:02 PM
MBR zeroed. Can I verify backup MBR? TomF Linux - General 7 06-20-2005 06:28 PM
Bootloader (MBR) erased by XP (different ISSUE) Cr7pt0r Linux - Newbie 3 05-25-2005 09:48 PM
by tring to fix the MBR i damage the MBR that was help... AKAKAK Fedora 4 03-21-2005 09:18 AM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 05:25 PM


All times are GMT -5. The time now is 10:14 PM.

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