• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

reinstall kernel

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> UNIX // GNU/Linux

View previous topic :: View next topic  
Author Message
duster
Just Arrived
Just Arrived


Joined: 06 May 2005
Posts: 0


Offline

PostPosted: Mon Dec 07, 2009 3:06 pm    Post subject: reinstall kernel Reply with quote

how do i reinstall my centos linux kernel from a boot cd. ive booted into rescue mode now what do i do?
Back to top
View user's profile Send private message
capi
SF Senior Mod
SF Senior Mod


Joined: 21 Sep 2003
Posts: 16777097
Location: Portugal

Offline

PostPosted: Mon Dec 07, 2009 4:49 pm    Post subject: Reinstalling the kernel from a GNU/Linux live CD Reply with quote

The easiest way, assuming the boot CD has a minimally compatible kernel (i.e. not too old, and if the installed system is 32-bit, so is the CD, and if the installed system is 64-bit so is the CD), is to chroot into the installed filesystem and run your package manager as normal.

You would just do, as root, something like the following sequence:
Quote:
# mkdir /mnt/root
# mount /dev/sdaX /mnt/root
# mount -o bind /proc /mnt/root/proc
# mount -o rbind /dev /mnt/root/dev
# chroot /mnt/root /bin/bash

Now you have a prompt inside the installed system. Just run your package manager as normal -- I don't know exactly the name of the kernel package for CentOS, but you should be able to find it by doing something like yum search kernel.

Unfortunately yum is quite limited in its flexibility; it doesn't have a reinstall option like Debian's apt or Gentoo's portage. To force the reinstallation of an existing package, you'll have to remove it then install it again. The problem is that if you try to remove the kernel, yum will probably want to remove a bunch of other packages as well, due to dependency issues. Your safest bet is to remove the kernel by hand, using rpm. Once you know the name of the kernel package:
Quote:
# rpm --erase --nodeps KERNEL_PACKAGE_NAME
# yum install KERNEL_PACKAGE_NAME


Finally, just exit the chroot and reboot the system:
Quote:
# exit
# reboot
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> UNIX // GNU/Linux All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Looking for more Windows Networking info?

Sign up to the WindowsNetworking.com Monthly Newsletter, written by Enterprise Security MVP Deb Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing!
View a sample newsletter.

Become a WindowsNetworking.com member!

Discuss your Windows Networking issues with thousands of other Windows Newtorking experts. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?

Follow TechGenix on Twitter