LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-08-2002, 09:57 PM   #1
jessiscroggins
LQ Newbie
 
Registered: Jun 2002
Location: Arkansas
Posts: 1

Rep: Reputation: 0
accidentally reset master boot record


I'm a newbie, so forgive me for my stupidity. I bought a second hard drive and had installed RedHat 7.2 on it. I used to have a duel boot screen where I picked which OS to start up with. About 6 months after I installed Linux, I got an error message (in windows ) saying that something (possibly a virus) had changed my master boot record and asked if I wanted to ignore the change or restore it to the previous master boot record. I clicked restore and it restored it to the point before I had installed linux and set up my second hard drive. Is there any way to fix it back without reinstalling the software and reformatting the second hard drive?
 
Old 06-09-2002, 01:18 AM   #2
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
If you can boot that second drive, hopefully with a Linux boot disk that you made during install, then its easy. Just use that to boot into linux, and then re-run the boot loader. Either from the command line with: /sbin/lilo, or /sbin/grub (depending on the boot loader).

If you don't have the boot disk, use an install CD and boot with that. Ignore the graphical cute install crap and hit ctrl+F2+alt and you've got a shell. Then you have to mount the Linux drive's root partition. Assuming its the second hard drive on the first IDE controller and that the root partition, / is the first partition:

mount /dev/hdb1 /mnt

chroot /mnt

Now you've mounted the Linux drive and switched to it being your root partition. Now you should be able to re-run the boot loader. It'll write the boot loader back to whatever it was.

Cheers,

Finegan
 
Old 06-11-2002, 01:26 PM   #3
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
Quote:
Ignore the graphical cute install crap and hit ctrl+F2+alt
LOL nice Finegan
I like my Slack install disk without all these cuty crappy GUI
 
Old 06-11-2002, 01:32 PM   #4
sewer_monkey
Member
 
Registered: May 2002
Location: Toronto, ON, Canada
Distribution: Ubuntu, Debian, RedHat/CentOS
Posts: 623

Rep: Reputation: 31
With RedHat 7.2 you'll probably want to install GRUB, so follow Finegan's instructions, then run the command grub-install /dev/hd? where /dev/hd? is the hard drive whose Master Boot Record you want GRUB to be installed on.
 
  


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
master boot record repair danielanson *BSD 2 05-21-2005 11:26 PM
master boot record help sfr7 Linux - Laptop and Netbook 10 04-25-2004 08:52 AM
Master Boot Record linuxuser05 Linux - General 3 01-11-2004 06:57 PM
master boot record alaios Linux - General 1 04-22-2003 08:41 AM
master boot record dark_light Linux - General 11 07-03-2002 05:21 AM


All times are GMT -5. The time now is 01:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration