Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.