LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-23-2004, 11:12 PM   #1
gandalfthewite
LQ Newbie
 
Registered: Jan 2004
Location: Fairbanks, Alaska USA
Posts: 3

Rep: Reputation: 0
Can't reinstall GRUB


Hello All

Several of my friends are avid Linux users, so they finally talked me into trying it out. At first everything worked just fine, then the problems started coming, but first a little background to this problem:

I have a Sony PCG-R505EL with WinXP, preinstalled. Because of the weird proprietary I-link docking station containing the the CD drive, I ended up having to copy all of the Mandrake 9.1 cds to a FAT32 partition. Initially I installed Mandrake 9.1 just fine, and was able to boot into XP as well using the GRUB boot manager. Slowly a friend was helping me get everything working, until one day, I want to Start XP and am greeted by the message "NTLDR is missing".

Right after the ntldr error, Linux stopped booting directly into KDE, and instead gave some sort of error message of "hard disk failure", so I had to log on from the console and "startx". I assumed this was due to the fact that the ntldr was missing.

Nothing I read online helped, and reluctantly I decided I'd create yet another partition and install XP again. I did so, but soon found out that Sony's driver installers wouldn't install the drivers unless XP was in the C: drive. So after backing up my files via Linux, I deleted both of the NTFS partitions with the Windows XP installations, created a new partition, and installed WinXP.

So now XP works, but I no longer get the GRUB boot menu. Having encountered this before on my desktop, I thought I could remedy the situation by Using the Mandrake Boot CD, then type "rescue", finish booting of the Mandrake Copy on my FAT32 hard drive, and simply have Mandrake reinstall the boot loader. However, when the process was almost done, I get the error message
"Fatal: First sector of /dev/hda3 doesn't have a valid boot signature"
"Program exited abnormally (return code 1)"

My drives are as follows:
hda1 - NTFS with winXP
hda2 - FAT32 with the Mandrake CDs
hda3 - Extended with Mandrake 9.1

I searched the web high and low, but came up with nothing that really applied to my situation. Lots of people wrote about setting up a dual system from scratch, but nothing if you already have XP and linux coexisting, especially not if GRUB was the boot loader being used. One post suggested to try to "update" from the Mandrake CD.

I tried that, until I came to a screeching halt when I received the error
"An error occurred
Oops, no root partition"

I asked a friend about this and he said that this meant that I didn't have my linux partition mounted.

So I booted into the console and typed
"mount"
sure enough, only the ram-drive was mounted, so I typed
"mount /dev/hda3 /"
This time when I checked mount, hda3 was mounted

I tried "exit", "quit" and anything else to get back into the rescue GUI, but since nothing worked, cntrl alt deleted and rebooted. One back in the rescue GUI, I again tried to have it reinstall the boot loader, but once again it stopped with the same error
"Fatal: First sector of /dev/hda3 doesn't have a valid boot signature"
"Program exited abnormally (return code 1)"

Anybody have any idea how I can go about fixing my partition so that it has a "valid boot signature"? This is most frustrating, since I have or HAD a perfectly working installation on Linux, and now, I can't even boot into the console part of it.

I'm rapidly becoming disillusioned with linux, since non of my friends who have used linux for years have been able to help me at all. I'
 
Old 01-25-2004, 02:31 AM   #2
gandalfthewite
LQ Newbie
 
Registered: Jan 2004
Location: Fairbanks, Alaska USA
Posts: 3

Original Poster
Rep: Reputation: 0
C'mon, someone, anyone, ANY suggestions?

Should I install linux into yet anoter partition? Would I have access to my personal files, or are they locked somehow?

Should I create another very small partition to keep my bootloader and/or grub safe?

Is there a way to boot into linux via the console, without actually invoking grub?

I'm really in need of some help.....as a Junior in College, I'm required to use a linux environment to do my coding homework, and right now I can't access it.
 
Old 01-25-2004, 02:36 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
Why don't you install grub into the MBR?

I'm not an expert on grub, but someone told
me that grub can be installed even without
a working linux-install ... so it SHOULD be
possible. :)

[edit]
Google rocks ... read this
http://www.linuxselfhelp.com/gnu/gru...er/grub_3.html
[/edit]


Cheers,
Tink

Last edited by Tinkster; 01-25-2004 at 02:41 AM.
 
Old 01-25-2004, 04:44 AM   #4
Vlad_M
Member
 
Registered: Aug 2002
Location: Cape Town, South Africa
Distribution: Red Hat 8.0 (Home), Red Hat 8.0 (Work)
Posts: 388

Rep: Reputation: 30
Hi,

The URL that Tink gave you is an HTML version of the man pages, which should always be your first resource.

I hope that you do have your linux boot disk. If you do, boot it, login as root and then type grub-install /dev/hda at the prompt. This should install GRUB on the MBR which is the way it should be installed. You may then have to edit the /boot/grub/grub.conf to make it boot your XP, but man grub will tell you how to do that (or that link that Tink gave you).

Hope this helps, cheers

Vlad.
 
Old 01-26-2004, 04:31 AM   #5
gandalfthewite
LQ Newbie
 
Registered: Jan 2004
Location: Fairbanks, Alaska USA
Posts: 3

Original Poster
Rep: Reputation: 0
Hey thanx for all great input and help.

Turns out there was more amiss than just grub. I installed grub following the instructions on that link, and was amazed at how easy it was. All I had to do was type boot to the rescue section, go to the conosole and type:

grub

this took me to the grub shell where I typed:

grub> root (hd0,2)
grub> setup (hd0)
grub> setup (hd0,2)

However, when I rebooted, there was still alot wrong, but now I was in familiar territory for my linux friend.

He quickly determined that the problem lay in the fact that linux expected to find mandrake in hd0,3 when in fact it was now in hd0,2
There was quite a few things wrong.

The problem was that mandrake still expected to find itself in the hd0,3 partition, when it was in the hd0,2 partition.

We had to edit the various config files using vim or something like that, but I can't say I remember all the files he edited. He used find and replace to change any refrence to hd0,3 to hd0,2.

Then, we installed grub again, and everything worked.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
reinstall windows, reinstall GRUB too? leupi Linux - Software 1 05-07-2005 11:50 AM
reinstall grub sau2004 Linux - Newbie 3 01-31-2004 11:29 PM
Reinstall GRUB Staticreator Linux - Software 0 08-10-2003 05:14 PM
how to reinstall grub? Pimp Linux - General 1 08-04-2003 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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