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?
|
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 |
Quote:
I like my Slack install disk without all these cuty crappy GUI |
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.
|
All times are GMT -5. The time now is 02:26 PM. |