Click to See Complete Forum and Search --> : Grub not booting


syncracirca
08-14-2003, 12:44 PM
I'm using slacwkare 9.0 and GRUB.
Here is my partitioning scheme:
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 5.0G 2.2G 2.5G 46% /
/dev/hda3 8.4G 133M 7.8G 2% /home

This is how I have grub.conf set up (located in /boot/grub/grub.conf):
\ntitle Linux\nroot (hd0,0)\nkernel /boot/bzImage
root=/dev/hda1
boot

I have a bzImage located in /boot just like grub.conf specifies. The problem is that this is not booting. I am left at the grub prompt when I boot my machine. What am I doing wrong?

mdwatts
08-14-2003, 12:48 PM
Originally posted by syncracirca

This is how I have grub.conf set up (located in /boot/grub/grub.conf):
\ntitle Linux\nroot (hd0,0)\nkernel /boot/bzImage
root=/dev/hda1
boot


That doesn't look right.

Have a search in the Installation forum for 'grub.conf' and you will find plenty of examples to use.

syncracirca
08-14-2003, 01:11 PM
Ok, after doing some looking around, I found a more reasonable grub.conf:

#/boot/grub/grub.conf
#
#root (hd0,0) /dev/hda1
#kernel /boot/bzImage
#boot /dev/hda
default-1
timeout-30
title Slackware 9.0 (2.4.21)
root (hd0,0)
kernel /boot/bzImage
boot

This SHOULD work....to the best of my knowledge. The problem is that when I reboot, It says "loading grub 1.5" or something simlilar, and then I'm left at the grub prompt. Do I have grub.conf located in the correct place? Its as if its not even loading at boot-up :(

mdwatts
08-14-2003, 01:17 PM
You need something like

default 0
timeout 10
title Slackware 9.0 (2.4.21)
kernel (hd0,0)/boot/vmlinuz root=/dev/hda1
initrd (hd0,0)/boot/initrd

if vmlinuz and initrd are the correct filenames.

syncracirca
08-14-2003, 01:31 PM
Ahhh....much better. My system boots now. I can't just leave this thread without showing the final solution to my problem (in hopes that this will help someone else someday), so here is what the working grub.conf looks like:

#grub.conf created by syn
#
#root (hd0,0) /dev/hda1
#kernel /boot/bzImage
#boot /dev/hda
default-1
timeout-30
title Slackware 9.0 (2.4.21)
kernel (hd0,0)/boot/bzImage root-/dev/hda1
initrd (hd0,0)/boot/initrd

Now I was still left at the grub prompt upon booting, but I typed the following and it booted up just fine:
grub >kernel (hd0,0)/boot/bzImage
grub >boot

Thats it...it booted up. Now in the future, I don't want to go through these lengths to make my system boot. So I'm going to add a new line to the end of grub.conf simply saying "boot". Hopefully this will make my system boot automatically. :) Thanks mdwatts!

mdwatts
08-14-2003, 01:50 PM
You shouldn't need to add 'boot' to your Grub config as long as Grub is installed correctly.

As root

grub-install /dev/hda (for mbr)

grub-install /dev/hda1 (for root partition)

default # starts counting at zero, so if you only have one operating system stanza in your Grub config, it should be

default 0

syncracirca
08-14-2003, 01:51 PM
Oops....adding "boot" to the end of grub.conf did not help me. I'm going to search google and JL forums and experiment with grub.conf and see if I can find out what is stopping it from booting automatically. If anyone has any suggestions I'd be grateful. Thanks!

syncracirca
08-14-2003, 02:10 PM
I ran grub-install /dev/hda1.
This is what I have in /boot/grub/device.map after running that:
(fd0) /dev/fd0
(hd0) /dev/hda
Oh, I also redid my grub.conf :
#grub.conf created by syn
#
#root (hd0,0) /dev/hda1
#kernel /boot/bzImage
#boot /dev/hda
default-0
timeout-30
title Slackware 9.0 (2.4.21)
kernel (hd0,0)/boot/bzImage root-/dev/hda1
initrd (hd0,0)/boot/initrd

I am still having to load my kernel manually and type boot at the grub prompt.....((((confused))))). I guess all I can do is keep looking for an answer.

mdwatts
08-14-2003, 02:36 PM
Are you using hyphens or the equal sign for

default-0
timeout-30
root-/dev/hda1

It should be '=' and not '-'.

Is hda1 set as the active partition?

Could it be that you originally had Grub install in the mbr and now have it installed in hda1?

If that is the case, boot with a Win9x bootdisk and run

fdisk /mbr

and then ensure hda1 is set as the active partition.

syncracirca
08-14-2003, 03:06 PM
I had hyphens instead of equal signs in grub.conf. I never would've noticed that. Thanks! I tried rebooting to see if that would change anything and it didn't, so the next step is to try the win9x bootdisk. Here it goes.....

psi42
08-14-2003, 03:14 PM
Do you have a menu.lst file? Grub.conf does not exist on my system. The menu configuration is controlled by /boot/grub/menu.lst

I think redhat uses grub.conf, but the GRUB downloaded directly from the GNU website menu.lst (thats a letter l, not a 1 :))

Try copying your grub.conf into menu.lst

Here is my menu.lst, in case it helps:

#
# GRUB configuration file
#




# Default entry:
default 0

# Set timer:
timeout 5

# Slackware Linux 9.0
title Slackware
root (hd1,0)
kernel /slack90 root=/dev/hdd5 ro vga=771 hdc=ide-scsi

# Win98
title Win98
rootnoverify (hd0,0)
chainloader +1

# Vector Linux 3.2
title Vector
root (hd1,0)
kernel /vmlinuz root=/dev/hdd9 ro

#
# End of configuration file
#

mdwatts
08-14-2003, 03:38 PM
Originally posted by psi42
Do you have a menu.lst file? Grub.conf does not exist on my system. The menu configuration is controlled by /boot/grub/menu.lst

I think redhat uses grub.conf, but the GRUB downloaded directly from the GNU website menu.lst (thats a letter l, not a 1 :))


Redhat uses grub.conf while most if not all the other distros use menu.lst.

Redhat likes to confuse the issue, don't they? They seem to do that a lot with the configuration files. :rolleyes:

syncracirca
08-14-2003, 03:39 PM
I added menu.lst and copied over grub.conf and lo and behold, I have a grub boot menu! Yea!! So I tried booting Slackware 9.0 (2.4.21) which is my only option in menu.lst. Unfortunately, I got an error message saying file not found referring to /boot/initrd. I don't have a file in /boot called initrd. Is it ok to not have that their? This is what my menu.lst looks like at this point:


#menu.1st created by syn
#
#root (hd0,0) /dev/hda1
#kernel /boot/bzImage
#boot /dev/hda
default=0
timeout=30
title Slackware 9.0 (2.4.21)
kernel (hd0,0)/boot/bzImage root=/dev/hda1
initrd (hd0,0)/boot/initrd

I'm going to try removing the line pointing to /boot/initrd and see what happens. Time to reboot!

psi42
08-14-2003, 03:45 PM
Originally posted by syncracirca
Unfortunately, I got an error message saying file not found referring to /boot/initrd. I don't have a file in /boot called initrd.

I don't have an initrd...............
I don't think it is necessary.

syncracirca
08-14-2003, 03:47 PM
I removed the last line in my menu.lst pointing towards /boot/initrd and grub works perfectly. :) I've learned alot from the experience...thanks guys! But I have one further question on the subject...is grub.conf even neccesary? I'd like to remove it if it serves no purpose. Thanks again!

psi42
08-14-2003, 03:55 PM
Originally posted by syncracirca
But I have one further question on the subject...is grub.conf even neccesary?

I don't think you need grub.conf at all. I don't have a grub.conf and grub works just fine. :)

kevinalm
08-14-2003, 09:20 PM
menu.lst is what grub actually looks at. However, in distos that use grub.conf, menu.lst is a symlink to grub.conf. If you delete grub.conf without making a real menu.lst, boot go bye bye.

Redhat also has a symlink /etc/grub.conf to /boot/grub/grub.conf . I imagine what rh is trying to do is have a .conf file that obvious ly belongs to grub in the likely places. Not a bad idea but it can cause confusion.