Click to See Complete Forum and Search --> : Problem w/ Lilo after Kernel update


Steve West
02-11-2001, 03:54 AM
I just updated my RedHat Kernel to 2.2.17-14 and updated lilo.conf with the new kernel information and ran /sbin/lilo -v everything seems fine.

But when I reboot the box, lilo does not show up the new kernel option. This box is a dual OS with WinNT (MBR loading first) and RedHat Linux 7 (lilo loads second).

Does anyone have any ideas?

Here is step by step of what I did after installing the kernel rpm:

I have made sure all the symbolic links are correct under /boot:

/boot/System.map -> System.map-2.2.16-22
/boot/vmlinuz -> vmlinuz-2.2.17-14smp
/boot/module-info-2.2.17-14smp
/boot/module-info -> module-info-2.2.17-14smp
/boot/kernel.h -> kernel.h-2.4.0

I also made the initrd image for the new kernel:

/boot/initrd-2.2.17-14smp.img

Updated /etc/lilo.conf with the new kernel:

boot = /dev/sda2
timeout = 50
linear
prompt
message = /boot/message
default = linux-new
vga = normal
read-only
map=/boot/map
install=/boot/boot.b
image = /boot/vmlinuz-2.2.17-14smp
label = linux-new
initrd = /boot/initrd-2.2.17-14smp.img
root = /dev/sda2
image = /boot/vmlinuz-2.2.16-22
label = linux-up
initrd = /boot/initrd-2.2.16-22.img
root = /dev/sda2

When I run the lilo -v command, everything seems to be fine:

[root@dns2 /root]# lilo -v

Reading boot sector from /dev/sda2
Merging with /boot/boot.b
Mapping message file /boot/message
Boot image: /boot/vmlinuz-2.2.17-14smp
Mapping RAM disk /boot/initrd-2.2.17-14smp.img
Added linux-new *
Boot image: /boot/vmlinuz-2.2.16-22
Mapping RAM disk /boot/initrd-2.2.16-22.img
Added linux-up
/boot/boot.0802 exists - no backup copy made.
Writing boot sector.

After all of this, lilo does not seem to be seeing these changes when I
reboot the box! I even tried to create emergency disk (mkbootdisk) and
reboot the box, but lilo fails to startup with the following error:

boot:
Loading Linux
Error 0x10

Furthermore, the lilo that is booting up seems to contain the old boot configuration with the old kernel.

I have read everything I can possibly read and I can't figure out why lilo
is not reading the updated lilo boot up in /etc/lilo.conf?

Can someone help me? I'm still new to Linux and would greatly appreciate any help!!!

Thanks!

SW

:confused:

pbharris
02-11-2001, 04:22 AM
hello,
first, pretty impressive concidering you are new to linux.
i see you have your System.map file pointing to the old kernel map, you also have both kernels in the /boot directory (that should not be a problem at all, but it is more confusing for me) my lilo.conf file is below, i have two directories, one for the one i know works and my new one (which i also know works!) BTW - did you copy the new System.map located at / to /boot ? also, where did this kernel come from? did you compile it from source or get an update? it is probably easier to complile from source incase you were wondering. anyway, here is my lilo.



boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=100
message=/boot/HomerX2.pcx
default=pbh2218

image=/rhboot/vmlinuz-2.2.16-22
label=rh2216
read-only
root=/dev/hda1
append="hdc=ide-scsi hdd=ide-scsi"

image=/boot/vmlinuz
label=pbh2218
read-only
root=/dev/hda1
append="hdc=ide-scsi hdd=ide-scsi"

Steve West
02-11-2001, 04:56 AM
I'm not sure what you mean with "did you copy the new System.map located at / to /boot?"

I made the changes to the system.map to point to the new System.map kernel:

System.map -> System.map-2.2.17-14smp

Rebooted the box and still the same. Something that is interesting is that the System.map reverted back to the old kernel:

System.map -> System.map-2.2.16-22smp

In regards to kernel source, I got the kernel upgrade from RedHat website in rpm format:

kernel-smp-2.2.17-14.i686.rpm

I just ran the following to install it:

rpm -ihv kernel-smp-2.2.17-14.i686.rpm

mkinitrd /boot/initrd-2.2.17-14smp.img 2.2.17-14smp

My lilo.conf file seems to have everything correct, but when the systems boots up, RedHat seems to be using an older lilo.conf? I think it's because I'm using MBR to boot the system up with first then lilo, RedHat is not updating something?

Any ideas?

[ 11 February 2001: Message edited by: Steve West ]

[ 11 February 2001: Message edited by: Steve West ]

pbharris
02-11-2001, 02:27 PM
hello,
when first read your you message i was thinking that you had compiled you kernel from source (which would ahve put a new System.map at / )

okay, try running lilo /etc/lilo.conf without the the -v
hopefully a message saying
Added linux-new *
Added linux-up
will pop up, (much like it did for you using the -v option)
tyhe lilo command should update the MBR all by its lonesome.

from here we can do some more stuff:
try lilo -q to check the map map,
use lilo -m mapfile - to specify a new map file. the man page has several option for lilo which are probably helpful man lilo
paul

Steve West
02-11-2001, 03:58 PM
I want to Thank You for all your help so far!!!

I ran lilo without -v and it gave me the following:

# lilo
Added linux-new *
Added linux-up

Then I did the lilo -m <mapfile>:

# lilo -m /boot/map
Ignoring entry 'map'
Added linux-new *
Added linux-up

I also changed tried to change the symbolic link for System.map to the new kernel. In doing the symbolic link, I screwed something up! :(

Now, I there is no System.map for the new kernel:

System.map -> System.map-2.2.16-22
System.map-2.2.16-22

The System.map-2.2.17-14smp is gone! Did I just screw it up? Is there a way to get the System.map-2.2.17-14smp back? Or can I regenerate it?

Thanks!

SW

pbharris
02-11-2001, 04:25 PM
hello,
you can reinstall the RPMs (rpm -Uvh package.rpm) or you can complile from source - which is freaking easy and give much control, i personally thnk upgrading a kernel by RPM is more difficult. i am not sure how RPM generates the new system map, but if you go through the steps to do it again it should be regenerated. i apologize for not having helped more, i have upgraded my kernel many many times (sometimes just for sport!)... anyway, i would start over from this point. also, i would make my lilo.conf file look like:


boot = /dev/sda2
timeout = 50
linear
prompt
message = /boot/message
default = linux-new
vga = normal
read-only
map=/boot/map
install=/boot/boot.b

image = /boot/vmlinuz-2.2.17-14smp
label = linux-new
root = /dev/sda2

image = /boot/vmlinuz-2.2.16-22
label = linux-up
root = /dev/sda2



i deleted the 'initrd' line - i have never used them in a lilo.conf file...

paul

Steve West
02-11-2001, 04:33 PM
Lets say I remove the kernel update rpm and do the kernel update from source, is there an easy step by step instructions I can follow?

At this stage, I'm willing to try anything!

Thanks!

SW

flintstone
02-11-2001, 05:15 PM
Hi,
check this out..its quite comprehensive regarding the steps in upgrading the kernel.

hope this is what u were looking for
gluckUpgrading the kernel (http://www.linuxnewbie.org/nhf/intel/compiling/kernel2.4upgrade.html)

pbharris
02-11-2001, 07:17 PM
how i compile a kernel, grap the source from kernel.org. do a tar -zxf linux-2.2.18.tar.gz in the direcotry /usr/src/. There will be new directory created called linux. cd into the new directory, and :
1. type make mrproper - a bunch of messages will fly by, this is okay.
2. type make xconfig - this is the most critical step of the process, because in step you choose all of the items you want the new kernel to support. in your case you will need to have scsi built into the kernel and not compiled as a module becasue you need to boot off it. there are many choices in there, but fortunately they are well documented and to a degree self explanatory, includeing smp.
3. type make dep some messages fly by
4. type make clean same thing..
5. type make bzImage can long time, messages still flying by.
6. type make bzlilo the added linux * message.
7. type make modules -more messages.
8. type make modules_install ditto on the messages


Assumming nothing here went wrong you should have a file called System.map, vmlinuz, and vmlinux (the later being in /usr/src/linux). i made a copy of my existing /boot/ cp -R /boot /new_boot
then i put the new System.map, vmlinuz, and vmlinux into the the new_boot directory and edit lilo to indicate which directory the files are in. (much like my lilo.conf file posted earlier). then i run lilo, reboot and see how it works. i always leave a copy of my working kernel in case i messed something up. after booting there may be some messages about modules missing or something to that extent, this is overcome by running depmod -a. you now should have a working kernel.


hummm... i guess all that may not sound simple...

[ 11 February 2001: Message edited by: pbharris ]