cannot boot previous kernels after installing another RH Linux in unpartitioned space

cannot boot previous kernels after installing another RH Linux in unpartitioned space

Post by mark_galec » Fri, 03 Sep 2004 06:28:20


Hello,

I had RH9 installed with some free space left on the HD
(unpartitioned). I then installed another copy of RH9 - I chose
automatic installation in the unpartitioned space. Now after that,
GRUB only lets me choose to boot kernels in the new installation, not
the old.

I can mount the partition with the old RH9 and access files there, but
it looks like the new installation, wiped out the old (now mounted)
/etc/grub.conf and replaced it with a link the newly created file
/boot/grub.conf, which is in fact identical to the new /etc/grub.conf
(in the new partition), that is to say, they only contain the new
kernels information.

Not only that, but in fact the whole contents of old (now mounted)
/boot were wiped out and not moved to the new /boot, so I can't even
refer to those files in the new /etc/grub.conf. And even if I could,
I presume that mounting happens later than booting, so it is no good
for the /etc/grub.conf to refer to files on another partition.

So, is this what the "automatic" installation of RH9 is supposed to
do, if so what am I missing - how do I boot those previous kernels?

I did RTFM installation manual, no hints on this one.

Thank you,

Mark Galecki
 
 
 

cannot boot previous kernels after installing another RH Linux in unpartitioned space

Post by agompe » Fri, 03 Sep 2004 14:10:05

ark:
before you modify a system file, it is always wise to save a copy of
your original grub.conf file which is normally at:
/boot/grub/grub.conf

You seem a bit confused when you say files are identical.
In fact, if in a given directory you type ls -l (often aliased to ll),
then you will see that /etc/grub.conf, is not the file, but a symbolic
link tu the file.

example (as root):
------------------
ls -l /etc/grub.conf
lrwxrwxrwx 1 root root 22 Nov 16 2003 /etc/grub.conf ->
../boot/grub/grub.conf


It appears that the file is in two places, but there are the file, and
the symbolic link (or several) to the file.
This is very clean and convenient: avoid duplication of a file in
several places (like in Windows).

You probably need to grab a good book on the basic of Unix/Linux.
Among many, a two are the popular O'Reilly's: "Linux in a Nutshell",
and "Running Linux".
--------------------------------------------------------------------------------
Now, about your "disaster", things may be easy to fix.

The old kernels files are probably still there on the /boot directory.
Just as an idea, I include here a fraction of my fedora grub.conf with
several kernels. (The other stanzas refers to other OS'es).

----
# 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,1)
# kernel /vmlinuz-version ro root=/dev/hda5
# initrd /initrd-version.img
#boot=/dev/hda2
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Fedora Core (2.6.8-1.521)
root (hd0,1)
kernel /vmlinuz-2.6.8-1.521 ro root=LABEL=/
initrd /initrd-2.6.8-1.521.img
title Fedora Core (2.6.7-1.494.2.2)
root (hd0,1)
kernel /vmlinuz-2.6.7-1.494.2.2 ro root=LABEL=/
initrd /initrd-2.6.7-1.494.2.2.img
title Fedora Core (2.6.5-1.358)
root (hd0,1)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/
initrd /initrd-2.6.5-1.358.img
----
Fedora is just a newer version of RedHat 9, and very similar.
Each "stanza" here refers to the kernel you want to boot.
Default wich start at 0, refers to the default kernel to boot.

So you can create a new stanza to your old kernel,
all you need is to identify properly the name of the two files related
to your old kernel using the command:
ls -s /boot

and then add the two proper lines with kernel, and initrd, related to
the old kernel.

Note also that your old grub.conf file may be saved as
/boot/grub/menu.lst.old
This should do the job.
UL2K
-------------------------------------------------------------------
XXXX@XXXXX.COM (Mark Galecki) wrote in message news:< XXXX@XXXXX.COM >...