How to downgrade Linux kernel

1

I have a Linux machine running RHEL3.8 with kernel release 2.4.21-66.ELsmp.

How can I downgrade the Linux kernel to 2.4.21-47.ELsmp?

Second: About the last kernel upgrade, can we find logs somewhere regarding the last upgrade? ,

  • remark - /var/log/message not mentioned the last upgrade (kernel upgrade was before 1/2 year)

yael

Posted 2013-01-09T09:46:53.347

Reputation: 27

1welcome to 21st Century ;) – Michał Šrajer – 2013-01-09T10:02:56.507

@Michał Šrajer yes I agree I have old Linux machine with application , but I need to downgrade because after upgrade machine make troubles , Please advice if it's possible? and if its true then how ? – yael – 2013-01-09T10:39:42.920

here you can have a good solution – mamdouh alramadan – 2013-01-09T11:04:56.327

you mean by this command I can downgrade ? yum install kernel-2.6.x.x.x.x.x , any way I have not idea how to edit grub.conf ? , I see also they talk about the solution but finnaly they have problem as No package kernel-2.6.12 available!!!!! – yael – 2013-01-09T11:14:54.030

Need to consider migrating this question to serverfault or Unix & Linux forum – yael – 2013-01-09T11:47:14.573

Answers

1

I have not idea how to edit grub.conf ?

For this

First create a backup of your /boot/grub/grub.conf file

Your all kernel files will be present under /boot

[root@localhost boot]# ls -l vmlinuz-2.6.32-2*
-rwxr-xr-x. 1 root root 3811616 Dec  6  2011 vmlinuz-2.6.32-220.el6.i686
-rwxr-xr-x. 1 root root 3815136 Dec 19 10:22 vmlinuz-2.6.32-279.19.1.el6.i686

These are the initrd images

[root@localhost boot]# ls -l symvers-2.6.32-2*
-rw-r--r--. 1 root root 168173 Dec  6  2011 symvers-2.6.32-220.el6.i686.gz
-rw-r--r--. 1 root root 175982 Dec 19 10:22 symvers-2.6.32-279.19.1.el6.i686.gz

Now open your grub.conf file

Just copy your previous kernel lines that means title,root,kernel,initrd, and paste it below and change the kernel version numbers.

You can refer the sample file here

title CentOS (2.6.32-279.19.1.el6.i686)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-279.19.1.el6.i686 ro root=UUID=2d15d825-80de-4d2d-beae-23140c053e99 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-279.19.1.el6.i686.img
title CentOS (2.6.32-220.el6.i686)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.el6.i686 ro root=UUID=2d15d825-80de-4d2d-beae-23140c053e99 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-220.el6.i686.img

max

Posted 2013-01-09T09:46:53.347

Reputation: 3 329

before the grub.conf how to run the yum install ...? ( can you please add this in to your answer , not sure if I need to set this ? " yum install kernel-2.4.21-47" ???? – yael – 2013-01-09T12:31:40.063

About the previous grub.conf ( or the old grub.conf ) this file should be backup before the upgrade ( upgrade was before 1/2 year ), I hope I will find this old file but what the solution if no grub.conf backup ? – yael – 2013-01-09T12:41:47.117

backup your present grub.conf file. if you miss configure your grub.conf file then your system wont boot at all. At that time you can rescue your system by using your backup file. or you can install a new grub by using grub-install /dev/sda command sda or hda it depends on your hard disk. for doing this you need to go to rescue mode. – max – 2013-01-09T12:59:24.503

what about the - yum install kernel-2.4.21-47" ???? ( how to create the right syntax ? – yael – 2013-01-09T13:01:55.563

I'm working on that, If I got the answer then I will post here. – max – 2013-01-09T13:13:23.470

ok great - thx so mutch , – yael – 2013-01-09T13:35:57.017

did you find something ? – yael – 2013-01-09T15:12:21.787