Kernel upgrade for Linux(OEL/RHEL) using up2date
Given procedure helpful to upgrade the Linux(OEL/RHEL) kernel using up2date command
Required Backups:
1. Ensure
full system backup
2. Take
the backup of the /etc/grub.conf file.
#cp /etc/grub.conf
/etc/grub.conf.bak
Procedure to upgrade
kernel:
1. register the system to the ULN(Unbreakable Linux Network)
with you Linux support CSI
#Up2date –register
2. Go
to linux.oracle.com and subscribe the server to the RHEL/OEL 5.x/6.x patch
channel which ever is required
Eg:
- go to the "Systems"
tab and click on your server
- Click on "Manage Supscriptions" and select "Enteprise Linux 5 Update 4 Patch ( ARCH, eg: i386 )" and "Enteprise Linux 5 Update 4 installation media copy ( ARCH )", remove "Enterprise Linux 5 Latest ( ARCH )"
- click on "Save Subscriptions"
- Click on "Manage Supscriptions" and select "Enteprise Linux 5 Update 4 Patch ( ARCH, eg: i386 )" and "Enteprise Linux 5 Update 4 installation media copy ( ARCH )", remove "Enterprise Linux 5 Latest ( ARCH )"
- click on "Save Subscriptions"
3.
Get the kernel package; you can download the kernel
package from Oracle ULN
- First find what and all kernel modules available for Upgrade
[root@myserver ~]# up2date --list |grep -i kernel
kernel-headers 2.6.18 194.17.1.0.1.el5 i386
kernel 2.6.18 194.17.1.0.1.el5Pkg name/pattern
kernel-devel
2.6.18 194.17.1.0.1.el5Pkg name/pattern
b.
get
the required packages
[root@myserver ~]# up2date --get kernel kernel-devel
kernel-headers
...
Fetching
package list for channel: el4_i386_latest...
########################################
kernel-2.6.9-89.0.0.0.1.EL.i686.rpm...
########################################
kernel-devel-2.6.9-89.0.0.0.1.EL.i686.rpm...
########################################
The packages will download into /var/spool/up2date
#ls -l /var/spool/up2date/kernel-*rpm
Note: If you want to migrate to new version upgrade
the other packages also using up2date
And reboot the server
4. Install
kernel package
.
Note: Never use "rpm -Uvh" to "update" the kernel. Use rpm –ivh only to install Kernel package and can boot with the new kernel. You can easily boot with old kernel if anything goes wrong.
# rpm -ivh kernel-<version>.rpm
Note: Never use "rpm -Uvh" to "update" the kernel. Use rpm –ivh only to install Kernel package and can boot with the new kernel. You can easily boot with old kernel if anything goes wrong.
# rpm -ivh kernel-<version>.rpm
Alternatively you can use up2date directly to upgrade
a. Run
the "up2date -fu kernel", and it will upgrade your kernel(Kernel upgrade
only)
For Migration to new version of
Linux need to upgrade packages also.
b. "up2date
-fu", will upgrade your kernel and all of your installed packages
5. Check /boot/grub/grub.conf.
A new kernel section is found to append to this file after you install the new kernel.
Find the "default" field; make sure it points to the right kernel you want to bootup. you can modify the "default" value, just remember this value is counted from "0" which means the "0" is the first kernel, the "1" is the second kernel.
6. If your old system has installed some third party drivers, these drivers will not go into the new kernel, you need reinstall all the third party drivers.
7. Normally, only the new kernel package is needed, but sometimes the new kernel will need to install or upgrade other packages first (dependency problem), such as kernel-devel, ecryptfs-utils, mkinitrd, etc. If you use yum to update, yum will resolve these dependencies for you. If you use the rpm command, it will error out but tell you which dependencies it requires.
8. If your old system has installed kernel-devel package and if you want to keep the kernel-devel package consistent with the new kernel, you can update the kernel-devel, just remember that after you update it, it will not be very easy to go back to the old version, and some of your developing application will be affected.
Back-Out Plan:
1. Reboot
the system in to single user mode.
2. edit
/etc/grub.conf and change the “default” value to the old kernel.
Comments
Post a Comment