LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-06-2004, 08:29 AM   #1
hackop
LQ Newbie
 
Registered: Mar 2004
Location: Broomfield, Colorado, USA
Distribution: Ubuntu
Posts: 9

Rep: Reputation: 0
Angry Recovering linux after resetting MBR


Hello,
I'm new to linux and last night I had a bit of a problem. First off, I had a dual boot of Windows XP and Fedora Core 1. Everything was working fine until last night when I went to boot into WinXP. I couldn't boot into it at all. It would just BSOD and reboot the machine. So, I went in via recovery console and did a "fixboot" "fixmbr" to reset the boot records. In the process, I also erased Grub from the MBR. Now, I have WinXP working, but I cannot access my partition. What makes this worse is that my computer doesn't have a floppy drive in it, as I've not had a chance to replace it since it died. I DO have a USB flash drive that the bios can boot from, but I don't know how to format that (or even access it from linux) so that I can set it up as a linux boot device. If anyone has experienced this before, or knows a way to help me get back to my precious linux without reinstalling and losing all of my data, please give me a heads up. Thanks a lot!

-Scott
 
Old 03-06-2004, 08:57 AM   #2
rberry88
Member
 
Registered: Aug 2003
Location: Arlington Heights, IL USA
Distribution: Fedora Core 1 & WinXP Pro & Gentoo 1.4 & Arch Linux
Posts: 558

Rep: Reputation: 30
You can just put in your Linux Install CD#1 and use the Linux rescue mode to re-install grub.

A search on these boards will give you plenty to fix your problem.

rberry88
 
Old 03-06-2004, 08:58 AM   #3
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
reinstalling and losing all of my data
As you may know having /home on its own partition enables you to re-install without destroying your own stuff. You could keep copies of configuration files in there too.

For God's sake don't take my word for it, but doing:
grub-install /dev/hda
might fix grub. May be slightly different syntax with your thing.
 
Old 03-06-2004, 09:07 AM   #4
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
Hmm... do you have a cdrom you can boot from? The fedora cd should have a rescue mode on its boot menu (typically "rescue root=/dev/rootpartitionname")

If booting from flash is the only way to go, you'll need a formatting utility for flash drives. It *appears* that the flash drive booting process is the same as a harddrive (with partitions and an MBR). Install something like <a href="http://www.freedos.org">FreeDOS</a> and then find a copy of loadlin and a kernel image to load with it.

Or, if you have access to another Linux machine (or you can figure out how to do these things from Windows) there are instructions <a href="http://am.xs4all.nl/phpwiki/index.php/UsbMorphix">here</a> for it. Remember, you're just out to get a kernel to boot, so that you can give it the root=/dev/rootpartitionname parameter and boot into your real Linux install and redo your boot record.
 
Old 03-06-2004, 09:21 AM   #5
hackop
LQ Newbie
 
Registered: Mar 2004
Location: Broomfield, Colorado, USA
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you. I tried the rescue disc last night, but it didn't have an option to reinstall grub and I didn't know any manual commands to do it myself. But, I took what lugoteehalt posted and tried that and luckily it worked. However, I have a feeling that Windows is going to crash again in time because I've read that XP doesn't like it when it's not in the MBR. I guess I'll see if I can start using the Windows bootloader to boot linux as well.
 
Old 03-06-2004, 11:38 AM   #6
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
For that you'll want to do something like this:
1 - Remove grub
2 - install lilo, edit lilo.conf and set boot= to /dev/partition-linux-is-on (instead of /dev/hda). Configure the linux boot option to point to your kernel, and any other settings you need.
3 - run /sbin/lilo

Then, in Windows, get bootpart from http://www.winimage.com/bootpart.htm and tell it to add an entry to the boot manager for your linux partition (you'll need to read the docs to see how linux numbering and windows numbering match up. Then when you boot windows, you'll get a menu of what to boot. Choosing linux will start lilo, which will then boot linux.
 
Old 03-10-2004, 09:46 AM   #7
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Seems a bit rough on poor old grub, after it's done such a splendid job.
 
  


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
Recovering Linux Password. chamalsl Linux - Security 6 02-14-2005 11:16 AM
Recovering old MBR............Help avols143 Linux - General 7 10-22-2004 08:39 PM
Cant boot from Win98 or XP bootable CD after recovering MBR zeejdeej Linux - Laptop and Netbook 2 09-23-2004 01:42 AM
Linksys router lets SuSe connect, but Win XP needs resetting between boots to linux lloder Linux - Networking 0 07-15-2004 11:52 PM
recovering an ntfs drive with linux kinasz Linux - General 4 07-08-2004 07:37 AM


All times are GMT -5. The time now is 12:53 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