Multiple OS on boot


(Stephan Koenig) #1

When I reboot my PBX, I am offered two OS versions. No idea how that happened. The first one (picked by default) does not work, it stops with an error message.

The second one works fine. But I need to be around to select it.

I tried to find the settings for it, but I am lost.
/boot/grub/ is empty.
/boot/grub2/ has a gub.cfg, but it says:
DO NOT EDIT THIS FILE
It is automatically generated by grub2-mkconfig using templates
from /etc/grub.d and settings from /etc/default/grub

Can’t find the settings in those files.


(Jared Busch) #2

try

yum reinstall kernel*

(Stephan Koenig) #3

Thank you! That worked!


#4

I also see more than one at boot (like StephenK above), however, my PBX auto-selects the current one after n-secs & so doesn’t cause an issue.

@sovani - If I run ‘rpm -qa | grep kernel | sort’ I can see multiple Kernels installed on my PBX (I assume from system upgrades along the way).

image

Is it advisable & safe to remove previous versions & if so, would I have to remove each one individually (eg. yum remove [kernel1] [kernel2] etc…), or is there a command to remove all except the current one ?

Also, my understanding is that the command you offered above reinstalls all existing kernels. Do you mind explaining how that fixed Stephen’s issue - Did it reinstall the kernels & reset the auto-select timer (like on my PBX). So in other words, he still has the 2 kernel boot options, it just auto-select now, or have I mis-understood ?


#5

https://www.tecmint.com/delete-old-kernels-in-centos-rhel-and-fedora/

of course you would need to remove any broken kernels before you pare down the working ones.

As to the default boot


#6

Helpful articles, thanks. I guess the ‘package-cleanup’ command from yum-utils is what I was asking about.

With regards to ‘removing broken kernels 1st’, how do I verify if any are broken ? (I assume the current one I’m using isn’t by the fact I’m booted to it)


#7

If you can boot the kernel successfully there is a fair to good chance it isn’t broken :wink:

(sorry , couldn’t resist that )


#8

No problem.

My system appears to boot & run stable on the current, most recent kernel & so I assume I can safely remove some of the earlier ones.


#9

There is no need to do that unless the partion holding /boot is getting too full, concentrate on more important things


#10

I guess you mean this guy ?

image


#11
df /boot

Would give you your answer

du -h /boot/*

more info


(system) closed #12

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.