LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2004, 04:33 PM   #1
GregB3
LQ Newbie
 
Registered: Dec 2003
Distribution: Mandrake/SuSE
Posts: 6

Rep: Reputation: 0
GRUB MBR restoration problem


I have both Win98SE and SuSE 9.0 Pro installed on my PC. Win98SE is on the boot drive(master) and SuSE 9.0 is installed on the slave drive of the motherboard primary IDE controller. I was using the default GRUB bootloader that came with SuSE to select between Win98SE and Linux. Everything was going OK until I started to get S.M.A.R.T. error readings on my boot drive. I replaced the boot drive with a new one, which messed up GRUB. I was never able to create a boot floppy with SuSE 9.0 Pro YAST. I tried, but the procedure failed, saying something about floppy drive access rights. I had supplied my root password at YAST startup. I tried to use the SuSE installation DVD to boot into the installed system to perform the grub-install /dev/hda procedure. When I did I got boot up error messages saying that the system couldn't find the /lib/modules/2-4.21-99-default/modules.dep file. I was able to get to a text root prompt to check the file system. When I get to the /lib/modules subdirectory, I have a 2.4.21-166-athlon directory, but no 2-4.21-99-default directory. I am using the nVidia video driver in order to support the 3D functions on my video card. Is the system trying to boot into a failsafe mode? The 2.4.21-166-athlon directory has files in it.

I am still a bit of a newbie when it comes to Linux. I've been trying to use the command line some, but most of my file system work has been done using the KDE file manager GUI. Is my current system fixable, or will I have to reinstall it? Is there anything that I can do prevent the GRUB restore problem if I should need to replace a boot drive in the future? Any information will be appreciated.
 
Old 02-24-2004, 09:41 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try changing the line that specifies the kernel in /boot/grub/menu.lst to 2.4.21-166
 
Old 02-29-2004, 02:26 PM   #3
GregB3
LQ Newbie
 
Registered: Dec 2003
Distribution: Mandrake/SuSE
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply. I would have gotten back sooner, but I've been feeling a little under the weather. I think that the problem is not with GRUB, but with the boot to installed system process. I have since found out that when the system is booted via the DVD/CD that the kernel on the DVD/CD is used, not the one that is on the installed system. My system uses an athlon kernel, so the boot screen displays failure messages, because it can't find the system files associated with the athlon kernel. It also causes GDM and X-Window to fail.

Does it matter to the grub install procedure what kernel is loaded? Is a functional root command line the only thing needed to perform a successful grub MBR restoration?
 
Old 02-29-2004, 11:38 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Try booting into rescue mode using the Suse DVD, mount your root drive (the rescue mode probably does it automatically), chroot into it, then grub-install /dev/hda (or whereever your mbr is)
Or type grub and get into the grub prompt, then
Code:
GRUB> root (hd1,0)
Set it to where your / partition is (or /boot if you have it separate), the first digit is the driver and the second is the partition number, starting from 0. Then lastly
Code:
GRUB> setup (hd0)
should install it right back into the mbr
 
Old 03-01-2004, 01:27 PM   #5
GregB3
LQ Newbie
 
Registered: Dec 2003
Distribution: Mandrake/SuSE
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply. I can get to a text mode root command line using the boot to installed system option in YAST. I can cd into the various directories on the system and can execute programs. Will using the DVD/CD kernel version, rather than the installed system's athlon kernel version, cause any problems with the grub intall procedure? I want to be sure that there are no version, or module, dependency gotchas in using the DVD/CD kernel.
 
Old 03-01-2004, 11:10 PM   #6
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
It shouldn't cause any problems, you can even install GRUB without booting into Linux if you have a GRUB bootdisk.
 
Old 03-02-2004, 10:33 PM   #7
GregB3
LQ Newbie
 
Registered: Dec 2003
Distribution: Mandrake/SuSE
Posts: 6

Original Poster
Rep: Reputation: 0
I did the grub-install /dev/hda procedure from the root prompt. It worked. I'm able to boot into both Linux and Windows 98SE. Both GDM and X-Window are functioning OK. Thanks for the information.
 
  


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
grub to mbr rekaye1005 Linux - General 1 10-18-2005 08:20 PM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 05:25 PM
Problem w/ MBR, GRUB, Fedora Core 2 jmrich Linux - Newbie 4 10-08-2004 04:03 AM
MBR/Grub problem... redkazan Slackware 12 01-07-2004 03:03 PM
Xp and RH 7.2 Multiboot and Xp MBR restoration thugzclub Linux - Distributions 4 02-15-2002 02:10 PM


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