LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-24-2005, 12:20 PM   #1
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Rep: Reputation: 15
Missing grub.conf & other oddnesses


Hi Folks,

I get this message from the Red Hat Network Alert notification tool:

"Your system is current running kernal-2.6.9-1.681_FC3, but the newest installed kernal is kernal-2.6.10-1.766_FC3. It is recommended you reboot at the first opportunity...."

Rebooting has no effect on this state of things. During boot up, if I ask for the list of kernals to boot to, version 2.6.10-1.766 isn't in the list (although rpm shows it as installed). Huh? Odd. But at least that explains why I can reboot and not get the latest kernal, right?

So, I go looking for grub.conf which is presumably in /boot/grub, right? Nothing there. In /etc, there's a broken link to grub.conf and to grub.conf.rpmsave.

So ok, I've apparently lost some files somehow (perhaps during an update that stalled on me last week), but if that's the case, how come grub still works at all (let alone gives me a choice between versions 2.6.9-1.667 & 2.6.9-1.681_FC3)?

Can anyone tell me what the next step is to get back to a proper state? I'm assuming I need to recreate the grub.conf file or something of the like....

Thanks!

John
 
Old 02-24-2005, 12:25 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
but if that's the case, how come grub still works at all (let alone gives me a choice between versions 2.6.9-1.667 & 2.6.9-1.681_FC3)?
If this is the case then you must have a grub.conf somewhere. If grub cannot find a conf file then it will drop you to a grub command line. Looks like this:

grub>

So if you are not seeing this you do have a conf file, just a matter of finding it. Note that grub.conf is usually called menu.lst. Grub.conf is usually a symlink to menu.lst.

In any event, update your locate db: "updatedb" and run 'locate grub.conf' and 'locate menu.lst'

Another thought: Some distro's don't mount the /boot partition automatically. Make sure /boot is mounted when looking for grub conf.

Last edited by bulliver; 02-24-2005 at 12:27 PM.
 
Old 02-24-2005, 05:18 PM   #3
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
1. What is in your /boot directory?
2. What is in your /boot/grub directory?
3. What is in your /etc/fstab?
4. What does "rpm -V grub" say?
 
Old 02-24-2005, 05:48 PM   #4
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Original Poster
Rep: Reputation: 15
Still looking for grub in all the wrong places...

Here's the results of the locate commands suggested:

# locate menu.lst
/usr/share/doc/grub-0.95/menu.lst
# locate grub.conf
/etc/grub.conf.rpmsave
/etc/grub.conf

The /usr/share/doc/grub-0.95/menu.lst is just a sample file that doesn't seem to bear any relation to what's shown as options during bootup. But here's the Linux part:

# For booting GNU/Linux
title GNU/Linux
root (hd1,0)
kernel /vmlinuz root=/dev/hdb1

The /etc/grub* files are symbolic links that are reported as broken by Nautilus. Here's what the shell has to say about them (they show up in red; presumably indicating the broken nature of the links):

# ls -l /etc/grub*
lrwxrwxrwx 1 root root 22 Nov 22 11:18 /etc/grub.conf -> ../boot/grub/grub.conf
lrwxrwxrwx 1 root root 22 Nov 21 23:48 /etc/grub.conf.rpmsave -> ../boot/grub/grub.conf
#


Here's what's in the /boot directory:

# ls -l /boot
total 8148
-rw-r--r-- 1 root root 53807 Jan 13 14:48 config-2.6.10-1.741_FC3
-rw-r--r-- 1 root root 54497 Feb 9 21:17 config-2.6.10-1.766_FC3
-rw-r--r-- 1 root root 51431 Jan 2 13:52 config-2.6.9-1.724_FC3
drwxr-xr-x 2 root root 4096 Nov 25 10:32 grub
-rw-r--r-- 1 root root 531697 Jan 19 07:31 initrd-2.6.10-1.741_FC3.img
-rw-r--r-- 1 root root 533130 Feb 21 14:12 initrd-2.6.10-1.766_FC3.img
-rw-r--r-- 1 root root 530513 Jan 8 09:33 initrd-2.6.9-1.724_FC3.img
-rw-r--r-- 1 root root 728476 Jan 13 14:48 System.map-2.6.10-1.741_FC3
-rw-r--r-- 1 root root 733387 Feb 9 21:17 System.map-2.6.10-1.766_FC3
-rw-r--r-- 1 root root 714267 Jan 2 13:52 System.map-2.6.9-1.724_FC3
-rw-r--r-- 1 root root 1439626 Jan 13 14:48 vmlinuz-2.6.10-1.741_FC3
-rw-r--r-- 1 root root 1463004 Feb 9 21:17 vmlinuz-2.6.10-1.766_FC3
-rw-r--r-- 1 root root 1422969 Jan 2 13:52 vmlinuz-2.6.9-1.724_FC3
#

And /boot/grub:

# ls -l /boot/grub
total 8
-rw-r--r-- 1 root root 3194 Oct 26 15:52 splash.xpm.gz
#

(Apparently just a compressed graphic....)

# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/opt /opt ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/var /var ext3 defaults 1 2
/dev/sda2 swap swap defaults 0 0
/dev/hdd /media/zip vfat pamconsole,rw,exec,user,noauto 0 0
/dev/hdd4 /media/zip1 auto pamconsole,exec,noauto,managed 0 0
/dev/hdb /media/cdrom auto pamconsole,exec,noauto,managed 0 0
#

#rpm -V grub
#

(That is, nothing....)

# rpm -q grub
grub-0.95-3
#

Anything there indicative of anything? Thanks for your time, folks!

John
 
Old 02-24-2005, 06:06 PM   #5
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Original Poster
Rep: Reputation: 15
/boot not mounted?

I don't see /boot in the list of mounted devices, but I don't know what that means....

# mount -l
/dev/hda2 on / type ext3 (rw) [/]
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda1 on /opt type ext3 (rw) [/opt]
/dev/sdb1 on /var type ext3 (rw) [/var]
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/hdd on /media/zip type vfat (rw,noexec,nosuid,nodev)
#
 
Old 02-24-2005, 07:19 PM   #6
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54

Okay, that doesn't look right. Your /boot/grub looks as if you've never had GRUB installed before. Have you had a separate /boot partition before?

Create this files as /boot/grub/grub.conf, then run grub-install /dev/hda as superuser to install GRUB into Master Boot Record:
Code:
default=0
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.10-1.766_FC3)
        root (hd0,1)
        kernel /boot/vmlinuz-2.6.10-1.766_FC3 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.10-1.766_FC3.img
 
Old 02-25-2005, 09:19 AM   #7
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Original Poster
Rep: Reputation: 15
Apparently have separate /boot partition

OK, I think this is a critical fact (that I should have gotten at earlier): there is apparently a separate boot partition. The hardward browser shows a little partition called /dev/hda1; when I mount that as /boot, the "missing" grub.conf appears and contains info that's consistent with what I see during bootup:
Code:
# cat 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/hda2
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$6O.Kn5E9$dweMamajNKW5byNwPyHJu.
title Fedora Core (2.6.9-1.681_FC3)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-1.681_FC3 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.9-1.681_FC3.img
title Fedora Core (2.6.9-1.667)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.9-1.667.img
#
OK, so now I think I see what's happening (newbie blindness is my only excuse! I should have recognized that as the case right off the bat, I guess...):

1. There is a separate /boot partition (I don't know what the relative merits of this approach are, but it's clearly there).
2. In the bootup process, this partition is either never being mounted (or it's being mounted and then unmounted; perhaps as part of the different boot levels?). It's not in /etc/fstab for whatever that's worth.
3. Since there is a /boot directory sitting out there on / (to accept the mount of the /dev/hda1 partition), the up2date utility is "installing" stuff into that directory on / and it's not being seen during the actual bootup (which is looking at the boot partition).

So, patient folks, some questions:

1. Is the separate boot partition worth the hassle?
2. If I should just keep the separate boot partition, should it be mounted during normal operation or should I just mount it before attempting to update the Fedora install (so that kernal updates can be applied somewhere useful)?
3. The boot partition is small, how careful do I need to be that it doesn't fill up? What precautions do you suggest?

Thanks!

John
 
Old 02-25-2005, 09:48 AM   #8
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Yeah, it must be mounted of course, so package installation can write to it. If it is labelled "/boot" (run e2label /dev/hda1 to find out), you can use this:

Code:
LABEL=/boot             /boot                   ext3    defaults        1 2
Else, assign a different label or mount as /dev/hda1 instead of LABEL=...

Whether you need a separate boot partitions depends on how you use it (you can share a common /boot with other installations, for instance) or whether your hardware and BIOS requires the boot partition to be below the 1024 cylinders mark (a requirement for old or exotic hardware).
 
Old 02-25-2005, 02:55 PM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
The idea behind not mounting a boot partition is that you shouldn't need to access any files there in normal operation. If the partition is not mounted, then there is little chance of corruption of any of your kernels etc. Grub can read the partition at boot time without it actually being mounted, in order to boot your kernel (and find the grub stage files that it needs).

You just need to remember to mount it when you rebuild a kernel...if this is too much of a PITA then just add it to fstab and it will be mounted every boot. The choice is your's...
 
Old 02-25-2005, 03:29 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
bulliver said ...
Lots of sensible things.
I like to run without boot mounted, but I compile a lot of kernels (Gentoo), and have learned to mount it in need.
grub finds what it needs via the root directive you give it - or in the case of splash, the explicit pathing (hint: that's always a good place to start a search).

As for size, I have 50Meg for /boot - plenty for half a dozen kernels.

After-thought Well that hint doesn't make a lot of sense if you didn't expilictly do the grub install, and hence don't know what the root directive was for that install - sorry about that.

Last edited by syg00; 02-25-2005 at 03:41 PM.
 
Old 02-25-2005, 03:43 PM   #11
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Quote:
You just need to remember to mount it when you rebuild a kernel...
In that case, mount it read-only, so you don't forget about it.
 
  


Reply



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.conf missing flipboi Fedora 2 02-16-2004 08:53 AM
create lilo.conf or grub.conf through commands newpenguin Linux - Software 1 11-28-2003 08:22 PM
commands work with interactive grub, but not in grub.conf richardg Linux - Newbie 2 11-23-2003 04:36 AM
lilo.conf and grub.conf no read access shanenin Linux - Software 1 10-02-2003 03:53 PM
grub.conf ?: RedHat 7.3 & OpenBSD 3.0 frozenicicle Linux - Software 10 07-29-2002 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:36 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
Open Source Consulting | Domain Registration