CentOS yum update creates two kernels - linux

I ran yum update on CentOS. Reboot. I now have two OS images/kernels?
/lib/modules contains two kernel directories. The old one, and the new, updated one.
When I restart the OS it asks me to boot from either the old one or the new updated os version.
How can I yum update to replace the old OS, not just create a new kernel beside the old one. Do I just have to somehow delete the old version before updating to the new version?
I'm running CentOS on virtualbox. CentOS-6.5.

Now, wouldn't it be rude of your system to delete your last known working kernel before you know for sure the new kernel works for you? You don't want that.
Once you decide you like your kernel, you can:
# package-cleanup --old-kernels --count=1
to reclaim the space.

Related

Can't install new kernel, hangs on DKMS installing EVDI

Whenever I see the update manager glowing that I have an update I get annoyed and click it, so I'm almost always updating something and usually this has gone fine without any problems...
Recently it told me there was a new kernel update, so I clicked install like I usually do but it just got stuck, for hours. When I examined the terminal output it was hanging on a DKMS installation step, so I grabbed all the active DKMS processes and found that the specific thing it was hanging on was installing something called EVDI (which is related to the DisplayLink Ubuntu driver, I think). After letting it sit there doing nothing for more than a day I killed it and had to Timeshift back to before I had done the installation as it corrupted my kernel.
I examined the log file in /var/lib/dkms/evdi/5.2.14/build/make.log and found that it has many errors reported, and the one that starts the chain is:
make -f ./scripts/Makefile.build obj=scripts
make[1]: *** [arch/x86/Makefile:211: archscripts] Error 2
I can provide the full log file if you want, it's just long.
I've tried to google around this and haven't been able to find anyone with this specific issue, so any help is much appreciated! I have also tried installing the DisplayLink driver from source (since it includes an install of EVDI) but it also hangs in the same place (for hours) -- it gets stuck at [[ Installing EVDI DKMS module ]].
I've thought about straight up removing all references to EVDI and hoping that it would then rebuild it, but I am not sure if this would cause further problems. In a different answer I saw that I could remove all DKMS instances of a package from all kernels by doing something like sudo dkms remove package --all but this is entirely new territory for me and I have decided I should wait for someone smarter than me to tell me whether that's a good idea or not before I end up irreparably breaking my installation.
I'm running Linux Mint 20.1 Cinnamon (Cinnamon v 4.8.6), Linux kernel 5.8.0-44-generic, on a Dell XPS 13 with an i7-1065G7 CPU (no GPU). Everything does work fine right now, I just would like to not be stuck on this version of the Linux kernel forever! Any help is very much appreciated :)
Ultimately fixed by booting into an old 5.4 kernel, purging DKMS + all of the 5.8 kernels and a troublesome 5.4 kernel (had to do some things by hand as apt would not remove some directories), then reinstalling everything and updating grub from the 5.4 kernel. Just tested an update via the update manager (now running on the latest 5.8 kernel) and it worked fine! Unclear what exactly was causing the problem but glad it's fixed and hope this helps others if they stumble into something like this.

/lib/modules/*/build point to non existing files

I have a CentOS Linux release 7.2.1511 (Core).
I want to build some kernel code for currently running kernel.
My uname -r says 3.10.0-327.10.1.el7.x86_64, but ls -l /usr/src/kernels/
shows only 3.10.0-327.13.1.el7.x86_64. Why do I have sources of not current kernel on my filesystem(vanilla fresh provisioned Digitalocean box)?
Why does yum install kernel-devel does not install headers for currently running kernel?
uname is a system call to the kernel to get information. It's telling you what's running on that machine. What's physically present on the hard drive can be anything that anyone has installed. Someone may have downloaded the wrong package or you may have multiple kernels installed etc. But, the one that's running is what uname is telling you.

Make changes to kernel version

I am using Fedora 20 and somehow it boots to an older version of the kernel: 3.11, instead of 3.14. uname -r shows 3.11.10-301.fc20.x86_64 and rpm -qa kernel shows kernel-3.11.10-301.fc20.x86_64, kernel-3.13.10-200.fc20.x86_64, kernel-3.14.4-200.fc20.x86_64
I am curious why this is caused.
How I can make it to boot to 3.14 (the updated version.)
Would it cause trouble if I remove the older versions?
If not, how can I remove the older version, just for the record.
A user from another thread suggested me to hold 'Ctrl' key to change this, but this didn't quite work out and I wish to have more permanent solution to this.
All other thread only mentions how to install and boot to older versions, not the other way around. Any help would be appreciated!
Are you getting all the kernel version in GRUB Screen. if not then update GRUB then it will display all the kernel version and then you can select as per your choice.
grub2-mkconfig -o /boot/grub2/grub.cfg
try above using super user mode.
You should not delete the older kernels as i tried in Debian it made me to format the HD so better keep all versions. You can remove the kernel package but due to dependency and other reasons it may create problems. Still you want to remove the kernels then you can follow the link.

Install 2.4.33 kernel in Debian Wheezy

I need to install old kernel into Kali (Debian like) distro. I need to run program which requires older kernel.
I downloaded kernel but the installation gives me too many errors. I was reading similar topics and watch the videos, but so far I am not successful.
I do not have experience with kernels. Is there .deb package for kernels or any other easier way to do it?
Can I use such old kernel for this distribution?
Thank you
The 2.4.33 kernel is pretty old. According to Debian's packaging files installing that old a kernel doesn't seem to be doable in wheezy. Attempting to install and run an old kernel outside the packaging system is not going to to work. All the "modern" libraries and applications will be broken when running the 2.4 kernel, as will the program (you need more than just a kernel for your program). If it were me, I'd set up a virtualization environment like VirtualBox or something similar and pick an old distro like CentOS 3.9 or an older Debian release (sarge or later). If that's not an option, you could always try and port the program to a more recent kernel.

Update RHEL 5.1 to 5.4

I have a server currently running RHEL 5.1, and I would like to upgrade it to RHEL 5.4. The server is not connected to the Internet, so I don't think I can use "yum update".
How would I be able to upgrade my server, and is it just a small-scale upgrade, like Windows patches, leaving everything on the server intact, or would it delete everything that was on the server?
Thank you.
Regards,
Rayne
I haven't actually tried this myself, but you should be able to use an installation disc for RHEL 5.4 to upgrade even if you are off-line (although you'll need to get on-line somewhere to download the disk image). Once you have the RHEL 5.4 disc, you should be able to follow the instructions here:
How do I use yum to update or install packages for Red Hat Enterprise Linux 5 from a customized repository?
to update your system. Basically, you create a custom repository on you hard drive with the rpm files from the disk and point yum at it or use the disc directly.
Good luck.
Of course if you can put the server temporarily on-line and just use the on-line repositories, after updating all the packages in your 5.1 distribution, you'll have all the same files as if you installed 5.4. At least that's what I remember happening. I had a 5.0 installation that I kept updated and when I compared them they seemed to be the same as the 5.3 version (current at the time) although during boot, my system said it was still 5.0
Rayne,
I used to work on DOE classified systems that could never touch the public internet. There is a very easy way to do this as mentioned. Just use the ISO as a repo, and for my example to work, it needs to be a DVD image. (The way around that using disk {1,2,3} is to copy the files from each disk onto the local disk or a storage device)
You will need to install createrepo which for me involved two dependencies.
createrepo
deltarpm
python-deltarpm
mkdir -p /mnt/iso/rhel54
mount -o loop /path/to/rhel5.4.iso /mnt/iso/rhel54
cd /mnt/iso
createrepo .
It will look like this:
[root#hostname iso]# createrepo .
44/20586 - rhel54/HighAvailability/Packages/PyQt4-4.6.2-8.el6.x86_64.rpm
Create /etc/yum.repos.d/rayne.repo and add
[Rayne-repo]
baseurl=file:///mnt/iso/
enabled=1
gpgcheck=0
Then run yum update
The update from RHEL 5.1 to RHEL 5.4 is not a small one, not like Windows patches. You can read the release notes, but you will end up with a newer kernel in the end and a ton of updates to the packages. I have not upgraded from 5.X to 5.Y+3 before, it's always been incremental (5.1 to 5.2). At any rate, this should work for you.

Resources