| Mandriva This Forum is for the discussion of Mandriva (Mandrake) 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
03-19-2005, 09:56 PM
|
#1
|
|
Member
Registered: May 2004
Location: Kitsap, Washington
Distribution: Fedora Core 4
Posts: 107
Rep:
|
MDK 10.2 GRUB - Windows killed MBR
I have a dual boot system with WinXP and Mandrake 10.2. This problem all started when my router died, my son came home from college and played on the internet in Windows---using Internet Explorer. He managed to get a virus that wiped out a bunch of WinXP system files. After spending a ton of time trying to figure out how to fix the WinXP installation I finally just re-installed it over the old one. Now Windows works fine (and all my Windows games are intact---the primary reason I keep it aound).
Anyway, at some point in the process, Windows, as is it's way, figured it was the only system around and overwrote the MBR. Now, I know there's a way to re-establish the GRUB MBR, but I can't for the life of me remember it. I've spent most of the afternoon googling for it, but haven't found an answer. I can boot off the Mandrake 10.2 installation CD and get to a command line, but I haven't been able to come up with the right commands. I did try the rescue option, but it appears to only work if you use lilo. I read the How-to here on LinxuQuestions, but apparently 10.2 won't accept the commands. Here's what I tried:
From command line:
grub (to get to the grub prompt)
root (hd0,0) (says that this is not a recognized partition)
setup (hd0) (says that it cannot recognize this device)
The linux installation is still there (it's on another hard drive) and I can get to pretty much everything through the CD installed command line. This happened to me a couple of years ago and I found the answer somewhere, but for whatever reason I can't find it now.
Thanks for any help. I promise I'll write it down this time.
stunter
|
|
|
|
03-19-2005, 10:09 PM
|
#2
|
|
Member
Registered: Sep 2003
Location: Michigan USA
Distribution: Mandrake, DamnSmallLinux, VectorLinux
Posts: 416
Rep:
|
I have had the same problem, the Mandrake cd should have a tool. Choose rescue at the cd comand prompt and there should be a reinstall grub listing there and it will automatically detect your partitions
|
|
|
|
03-19-2005, 10:10 PM
|
#3
|
|
Senior Member
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694
Rep:
|
grub-install /dev/hdx
|
|
|
|
03-19-2005, 10:12 PM
|
#4
|
|
Member
Registered: May 2004
Location: Kitsap, Washington
Distribution: Fedora Core 4
Posts: 107
Original Poster
Rep:
|
Thanks guys.
|
|
|
|
03-20-2005, 01:13 AM
|
#5
|
|
Member
Registered: May 2004
Location: Kitsap, Washington
Distribution: Fedora Core 4
Posts: 107
Original Poster
Rep:
|
Well, I'm back. No luck as it turns out.
I tried doing grub- install from the command line gotten to from the MDK boot cd. Didn't work at all. Just gave an extended list of what it couldn't find. Then I tried mountingt the linux partition from the initial menu, going to a command prompt and then doing a chroot to mount /mnt and tried again. Says that it can't mount partition. Hmmm.
From the grub> prompt, I did a find /boot/grub/stage1 to find the partition name. That was hd1,0. So tried doing setup from the grub> prompt.
setup (hd0) (hd0,1)
That seemed to work in that it said it found everything, but rebooting just put me into Windows again. No grub.
I should say that my Windows installation is on hda1. The linux partition is installed on an SCSI hard drive sda1. Now, as I understand it, grub installed in the MBR of hda. Yes? Any other idea?
I'm about stumpted.
stunter
____________________________________________
Back after another try.
OK, so I tried it again. Booted up with the intall CD with the rescure option. Mounted my linux partition from the initial menu (which also loads the SCSI drivers). The partition is mounted to /mnt (according to the message it gives). Then I bailed to a console. I did a chroot /mnt to transfer control the partition to my linux partition. Tried:
grub-install /dev/hda
the message I got back was weird. It said:
/dev/ram3 does not have a corresponding BIOS drive
Tried:
grub-install hd1,0 and got back a "does not exist" message. So it seems I'm doing something wrong here.
Went ahead and typed "grub" to get to a grub> prompt and tried again to do the setup that way.
grub> find /boot/grub/stage1 returns hd1,0.
grub> setup (hd0) (hd1,0) seems to install everything. Gives a list of everything it finds and it all seems fine. But rebooting does not give me the grub menu.
Thanks for any help.
stunter
Last edited by stunter; 03-20-2005 at 01:47 AM.
|
|
|
|
03-20-2005, 03:49 AM
|
#6
|
|
Member
Registered: Feb 2005
Location: Norfolk, UK
Distribution: Ubuntu
Posts: 40
Rep:
|
if you haven't already looked try here,
GRUB from the ground up
hope it helps 
|
|
|
|
03-20-2005, 08:32 AM
|
#7
|
|
Member
Registered: Jun 2004
Location: Turkey, Istanbul
Distribution: Novel Suse Professional 9.3
Posts: 86
Rep:
|
answer
start installation and choose update existing mandrake version...
iy will fix grup and no files will be effected in your linux directories
|
|
|
|
03-21-2005, 09:07 AM
|
#8
|
|
Member
Registered: May 2004
Location: Kitsap, Washington
Distribution: Fedora Core 4
Posts: 107
Original Poster
Rep:
|
Thanks again, guys. Turned out to be weird sort of permission issue. From command line, I changed the permissions on the /boot directory then did the setup thing through the grub> prompt. It all works now (though not my internet connection, but that is my ISP, not me. They tell me they will have it fixed by today).
Thanks for the responses. Don't you just love Megalomania Bill?
stunter
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:22 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|