View Full Version : Grub Bootloader.. broken? Help A Newbie!

7th September 2006, 03:48 PM
I have FC3 (I think? :) ) and running RedHat version: Linux 2.4.21-15.0.4.ELsmp #1 SMP which doesn't mean much to me but I thought I it might be important. :)
At one point the machine was fitted with an additional hard drive for some extra backup space (just a mount, no raid configuration I don't think) aptly named "/backup/".

Anyway, I didn't configure the machine or the original install but I did install YUM and installed packages for PHP5 which all work great.
.. However...
The other day I ran into a problem (which I later discovered was due to inadequate disk space) and ran the "reboot" command to see if that would help. The server did not come back up. I had to call the hosting company to reboot it. After they got it back online they told me that the bootloader was wrong (not sure if those were the exact words) and that basically if the server ever reboots, it will not come back online.

Problem now is that the hosting company will be rebooting all machines soon for maintenance....
I have no idea what a Bootloader is or what GRUB is...
With that said, here is the content of my #boot/grub/grub.conf

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
title Red Hat Enterprise Linux ES (2.4.21-15.0.4.EL)
root (hd1,0)
kernel /vmlinuz-2.4.21-15.0.4.EL ro root=LABEL=/
initrd /initrd-2.4.21-15.0.4.EL.img
title Red Hat Enterprise Linux ES (2.4.21-15.0.4.ELsmp)
root (hd1,0)
kernel /vmlinuz-2.4.21-15.0.4.ELsmp ro root=LABEL=/
initrd /initrd-2.4.21-15.0.4.ELsmp.img
title Red Hat Enterprise Linux ES (2.4.21-15.ELsmp)
root (hd1,0)
kernel /vmlinuz-2.4.21-15.ELsmp ro root=LABEL=/
initrd /initrd-2.4.21-15.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.4.21-15.EL)
root (hd1,0)
kernel /vmlinuz-2.4.21-15.EL ro root=LABEL=/
initrd /initrd-2.4.21-15.EL.img
The file was recently modified... I didn't do it... :confused: Is the comment at the beginning a message to me from the people at the hosting datacenter???
Here is the disk setup:
# fdisk -l

Disk /dev/sda: 73.3 GB, 73397698560 bytes
255 heads, 63 sectors/track, 8923 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 8669 69529320 83 Linux
/dev/sda3 8670 8923 2040255 82 Linux swap

Disk /dev/hdc: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 10011 80413326 83 LinuxWas it not booting because of disk space?? That shouldn't be an issue now.
This is a live box so I'm apprehensive to try a reboot if I am not fully sure it will come back up.

Thanks for any help, your karma will benefit I promise!

- John "Dammit Jim, I'm a Software Developer not a Linux Admin"

7th September 2006, 04:40 PM
I was looking at the history to see the commands that might have been run by the hosting company (like I said, I know I didn't change the GRUB.conf file) and maybe get some clues to whether they fixed anything or changed anything. Here are the commands they ran (I don't know what most do so maybe it might provide some hints to others:

> df
> vi /etc/fstab
> vi /boot/grub/grub.conf
> shutdown -f -r now not sure what they changed in those files but they did something. Should this lead me to believe that they fixed it? They ran the shutdown command and the next command was one of mine so I know it booted up fine somehow after that shutdown....

18th September 2006, 08:15 AM
anyone? The server is scheduled for reboot in 2 days and I don't know if it will come back online!

18th September 2006, 10:24 AM
1) You can see which version of Fedora you're running by looking at /etc/redhat-release (a small text file).
2) GRUB is the bootloader on your machine (software that allows booting into different OS'es or kernels on the same machine).
3) The comments in your grub.conf are generic, everyone has them.
4) "df" checks to see how much disk space is available. "vi" is a text editor, so they were editing the two files.

18th September 2006, 10:30 AM
Another thing, the kernel entries in grub.conf are numbered starting with 0, so "default=1" means that it will boot the second entry (2.4.21-15.0.4.ELsmp) by default. If that one doesn't work, you can try the others manually and then edit grub.conf to change the default.

18th September 2006, 02:41 PM
ok, so if the default boot entry is wrong, is there a way to tell which one I want to change it to?
How do I change it "manually"?
I'm afraid that if I call the hosting company and they bring it back up so I can access it, then I change it to another wrong number (or if its a different issue) and the server doesn't come back up I'll have to call them again (which is a pain and takes a while)

Did the grub.conf need to be changed after mounting the backup disk that was added. Its just a storage drive for backup files

18th September 2006, 05:41 PM
Changing the default entry is done by editing the grub.conf file and changing the number in "default=1" to point to the desired kernel. However, your best bet is probably to contact the hosting company and send them a link to this thread, and ask them what to do, since only they know what changes they made and why.

18th September 2006, 05:52 PM
Just to clarify about GRUB, when the machine is booted, GRUB displays a screen showing a list of all the available OS'es or kernels that can be booted (the items with "title" next to them). The line "timeout=10" says that if you do nothing, the default entry will boot in 10 seconds. If you want another entry to boot, you select it with the up and down arrows and them press Enter (assuming you're there in front of the screen to make the choice). You _could_ (understand, I'm not recommending this) try rebooting into different kernels this way until you find one that works, then change the "default=1" line to point to it (for example, if 2.4.21-15.0.4.EL worked, you would change it to "default=0" so in the future it would use that one in case you're not there to choose it manually). However, like I said, you should contact the hosting company, since no one on this forum can know what changes they made or why.