upgrading from kernel 2.4.21 to 2.4.28
Hi,
I have Red Hat Enterprise Linux installed (AS 3), kernel version 2.4.21. I want to upgrade to version 2.4.28 I've downloaded the 2.4.28 tgz file and I've been reading thru the documentation. I meet all the minimum required versions for gcc, makefile, etc. I unzipped it to a temp directory, then I ran make mrproper make config make dep make install At the end of running make install, I got this: depmod: Can't open /lib/modules/2.4.28/modules.dep for writing /lib/modules/2.4.28 is not a directory. mkinitrd failed make[1]: *** [install] Error 1 make[1]: Leaving directory `/root/linux-2/linux-2.4.28/arch/i386/boot' make: *** [install] Error 2 The instructions say this: In order to boot your new kernel, you'll need to copy the kernel image (found in .../linux/arch/i386/boot/bzImage after compilation) to the place where your regular bootable kernel is found. I went to /etc/lilo.conf.anaconda and I edited it. Here's what it said: prompt timeout=50 default=linux boot=/dev/hda map=/boot/map install=/boot/boot.b message=/boot/message linear image=/boot/vmlinuz-2.4.21-27.EL label=linux initrd=/boot/initrd-2.4.21-27.EL.img read-only append="hdc=ide-scsi root=LABEL=/" Questions: 1. Why am I getting the above errors? 2. Am I supposed to copy the bzImage file somewhere and add another line in lilo.conf.anaconda?? |
Aren't there supposed to be 'make modules' and 'make modules_install' steps somewhere?
Did you follow the README closely? Always run /sbin/lilo before rebooting, make sure you have at least one bootable kernel. |
For 2.4 kernels you can do the following in Redhat and Redhat clone distros.
Extract the kernel in /usr/src Make a softlinux from the new kernel to /usr/src/linux. ' ln -s /usr/src/linux-2.4.28 /usr/src/linux ' Now with redhat there is a config file in /boot that you can use to build with. If everything worked fine then use that. Run the command make mrproper (restructure the kernel unless clean extract) make xconfig ( gui interface to see the kernel ). Load the config from /boot and hit Save then Exit. make dep ( make dependiences ) make clean ( clean up ) make bzImage ( build kernel ) Will be in /usr/src/linux/arch/i386/boot/bzImage make modules ( build the modules ) make modules_install ( install the modules in /lib/modules ) Now copy the new bzImage to /boot/vmlinuz-2.4.28 In /boot run the command ' mkinitrd 2.4.28.img ' Edit lilo or grub and create a bootloader like current old kernel. Brian1 |
I followed your instructions and I edited the grub.conf. When I tried to boot into the 2.4.28 kernel I got the error message below:
VFS: Cannot open root device "LABEL=/" or 00:00 Please append a correct "root=" boot option Kernel panic: VFS: Unable to mount root fs on 00:00 Here's what my GRUB.CONF looks like: (I manually added the 2nd title and below) # 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=10 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Enterprise Linux AS (2.4.21-27.EL) root (hd0,0) kernel /vmlinuz-2.4.21-27.EL ro root=LABEL=/ hdc=ide-scsi initrd /initrd-2.4.21-27.EL.img title Red Hat Enterprise Linux AS (2.4.28) root (hd0,0) kernel /vmlinuz-2.4.28 ro root=LABEL=/ hdc=ide-scsi initrd /initrd-2.4.28.img Also, what's the difference between grub.conf and /etc/lilo.conf.anaconda ?? |
They are two completely different boot managers.
Change your root=LABEL=/ to root=/dev/hda2 Brian1 |
Ok, I did that and it booted now but when I go the command prompt and type in "uname -a", it still shows 2.4.21-27
|
Did you boot the correct kernel. The default in grub is 0 which is the first one. Unless you selected one at boot then it booted the old kernel.
Brian1 |
I selected the new one when it prompted me.
|
Still seems odd to me. Is the new kernel a copy of the new kernel or a link to the new kernel. If a link it may actually be seeing the old kernel. Make sure it is a copy of the new bzImage file and placed in /boot and renamed of course.
Other than that no other ideas. Brian1 |
Not sure if it's a copy or a link. How can I tell?
When I followed the instructions it said to copy the bzImage, so here's what I typed: cp bzImage /boot/vmlinuz-2.4.28 Also, I don't know if this makes a difference but when I extracted the tar.gz I extracted it in root's home folder. so all the extracted files are under /root/linux-2/linux-2.4.28 The reason I did that is because there's a warning in the Readme file that says not to extract it in /usr/src "Do NOT use the /usr/src/linux area! This area has a (usually incomplete) set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be." Here's the files in my /boot directory: config-2.4.21-27.EL lost+found System.map-2.4.28 grub message vmlinux-2.4.21-27.EL initrd-2.4.21-27.EL.img message.ja vmlinuz initrd-2.4.28.img System.map vmlinuz-2.4.21-27.EL kernel.h System.map-2.4.21-27.EL vmlinuz-2.4.28 |
Not sure if it is in root's home directory is an issue or not. I would have extracted as /usr/src/linux-2.4.28. Then create a soft link of linux to /usr/src/linux using command ' ln -s /usr/src/linux-2.4.28 /usr/src/linux '.
If added to grub.conf as stated above and selected the the new 2.4.28 kernel, I say I have no idea why it is using kernel 2.4.21-27 still. When you did your kernel building you were in /root/linux-2/linux-2.4.28 and not in /usr/src/linux correct? If in /usr/src/linux when compiling then you ended up compiling the the linux-2.4.21 kernel. Brian1 |
Go back to where you built your 2.4.28 kernel and do; make install
|
How about the warning in the Readme about not extracting it to /usr/src. And for your question about being in the /root/linux-2/linux-2.4.28 Yes I was in that directory.
Here's something else that's interesting. I have setup a 2nd machine (this one's a Gateway P4 1 Ghz) and I did the exact same thing that I did to the 1st machine. This one however starts loading and then it cannot load the GUI portion. Why am I getting different results with 2 different machines? |
All times are GMT -5. The time now is 01:11 AM. |