The prior rpm -e that uninstalled the kernel rpms (no telling how long ago
this was) was unable to remove stuff from boot becuse of likely some issue
with /boot not being mounted, or read only or several other possible
issues. This is why kernel and inits do not get removed from /boor but the
rpm is long gone.

On Mon, Aug 28, 2023, 7:30 PM Robert Nichols <rnicholsnos...@comcast.net>
wrote:

> On 8/28/23 19:16, Roger Heflin wrote:> On Mon, Aug 28, 2023 at 7:06 PM
> Robert Nichols
> > <rnicholsnos...@comcast.net> wrote:
> >>
> >> On 8/28/23 18:54, ToddAndMargo via users wrote:
> >>> On 8/27/23 21:07, Samuel Sieb wrote:
> >>>> On 8/27/23 20:20, Jeffrey Walton wrote:
> >>>>> On Sun, Aug 27, 2023 at 11:05 PM ToddAndMargo via users
> >>>>> <users@lists.fedoraproject.org> wrote:
> >>>>>>
> >>>>>> Fedora 38
> >>>>>>
> >>>>>> When I boot up, I get a bazillion kernel choices,
> >>>>>> most are not Fedora 38:
> >>>>>>
> >>>>>> Sorry for the flash.  I could not turn it
> >>>>>> to turn off
> >>>>>>
> >>>>>> https://imgur.com/7Mi5E3W.png
> >>>>>>
> >>>>>> The extra kernels are from Fedora 37 and 36.
> >>>>>>
> >>>>>> This is what Fedora 38 says I have:
> >>>>>>
> >>>>>> $ rpm -qa kernel
> >>>>>> kernel-6.4.10-200.fc38.x86_64
> >>>>>> kernel-6.4.11-200.fc38.x86_64
> >>>>>> kernel-6.4.12-200.fc38.x86_64
> >>>>>>
> >>>>>> Do I really have all those extra kernels?
> >>>>>>
> >>>>>> How do I clean things up?
> >>>>
> >>>> Look in /boot to see if there are actually kernels and initrd files
> for the entries.  If there are, you will have to manually delete them.
> >>>> Look in /boot/loader/entries/ to see if there are conf files for
> those entries and delete the ones that don't match installed kernel
> packages.
> >>>>
> >>>>>
> https://docs.fedoraproject.org/en-US/quick-docs/upgrading-fedora-offline/#sect-clean-up-old-kernels
> >>>>
> >>>> That won't help in this case because the relevant entries don't have
> installed packages.
> >>>
> >>> Hi All,
> >>>
> >>> Sam's directions worked perfectly.  Thank you Sam!
> >>>
> >>> My new boot menu:
> >>> https://imgur.com/fgABpIz.png
> >>>
> >>> The red smudge in the middle is my flash shooting
> >>> through my finger.  Chuckle.
> >>>
> >>> -T
> >>>
> >>> This is what I did:
> >>>
> >>> How to remove kernels that are not suppose to be there
> >>> and do not show in rpm:
> >>>
> >>> # rpm -qa kernel
> >>> kernel-6.4.10-200.fc38.x86_64
> >>> kernel-6.4.11-200.fc38.x86_64
> >>> kernel-6.4.12-200.fc38.x86_64
> >>>
> >>>
> >>> Note: substitute fc38 with your current kernel revision
> >>>
> >>> $ su
> >>> # cd /boot
> >>>
> >>> # ls | grep -i vmlinuz
> >>> vmlinuz-0-rescue-25f870556c344b599c639eb386296fa2
> >>> vmlinuz-5.18.10-200.fc36.x86_64
> >>> vmlinuz-6.0.11-300.fc37.x86_64
> >>> vmlinuz-6.0.12-200.fc36.x86_64
> >>> vmlinuz-6.2.12-200.fc37.x86_64
> >>> vmlinuz-6.3.12-100.fc37.x86_64
> >>> vmlinuz-6.3.8-100.fc37.x86_64
> >>> vmlinuz-6.4.10-200.fc38.x86_64
> >>> vmlinuz-6.4.11-200.fc38.x86_64
> >>> vmlinuz-6.4.12-200.fc38.x86_64
> >>>
> >>> # ls | grep -i fc | grep -v fc38
> >>> config-5.18.10-200.fc36.x86_64
> >>> config-6.0.11-300.fc37.x86_64
> >>> config-6.0.12-200.fc36.x86_64
> >>> config-6.2.12-200.fc37.x86_64
> >>> config-6.3.12-100.fc37.x86_64
> >>> config-6.3.8-100.fc37.x86_64
> >>> initramfs-5.18.10-200.fc36.x86_64.img
> >>> initramfs-6.0.11-300.fc37.x86_64.img
> >>> initramfs-6.0.12-200.fc36.x86_64.img
> >>> initramfs-6.2.12-200.fc37.x86_64.img
> >>> initramfs-6.3.12-100.fc37.x86_64.img
> >>> initramfs-6.3.8-100.fc37.x86_64.img
> >>> symvers-5.18.10-200.fc36.x86_64.gz
> >>> symvers-6.0.11-300.fc37.x86_64.gz
> >>> symvers-6.0.12-200.fc36.x86_64.gz
> >>> symvers-6.2.12-200.fc37.x86_64.gz
> >>> symvers-6.3.12-100.fc37.x86_64.gz
> >>> symvers-6.3.8-100.fc37.x86_64.gz
> >>> System.map-5.18.10-200.fc36.x86_64
> >>> System.map-6.0.11-300.fc37.x86_64
> >>> System.map-6.0.12-200.fc36.x86_64
> >>> System.map-6.2.12-200.fc37.x86_64
> >>> System.map-6.3.12-100.fc37.x86_64
> >>> System.map-6.3.8-100.fc37.x86_64
> >>> vmlinuz-5.18.10-200.fc36.x86_64
> >>> vmlinuz-6.0.11-300.fc37.x86_64
> >>> vmlinuz-6.0.12-200.fc36.x86_64
> >>> vmlinuz-6.2.12-200.fc37.x86_64
> >>> vmlinuz-6.3.12-100.fc37.x86_64
> >>> vmlinuz-6.3.8-100.fc37.x86_64
> >>>
> >>>
> >>> # mkdir temp
> >>> # mv $( ls | grep -i fc | grep -v fc38 ) /boot/temp/.
> >>>
> >>> # cd /boot/loader/entries
> >>> # ls | grep -i fc | grep -v fc38
> >>> 25f870556c344b599c639eb386296fa2-5.18.10-200.fc36.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.0.11-300.fc37.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.0.12-200.fc36.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.2.12-200.fc37.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.3.12-100.fc37.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.3.8-100.fc37.x86_64.conf
> >>>
> >>> # mkdir temp
> >>> # mv $( ls | grep -i fc | grep -v fc38 ) /boot/loader/entries/temp/.
> >>> # ls
> >>> 25f870556c344b599c639eb386296fa2-0-memtest86+.conf
> >>> 25f870556c344b599c639eb386296fa2-0-rescue.conf
> >>> 25f870556c344b599c639eb386296fa2-6.4.10-200.fc38.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.4.11-200.fc38.x86_64.conf
> >>> 25f870556c344b599c639eb386296fa2-6.4.12-200.fc38.x86_64.conf
> >>>
> >>>
> >>> $ reboot
> >>> _______________________________________________
> >>> users mailing list -- users@lists.fedoraproject.org
> >>> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> >>> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> >>> List Guidelines:
> https://fedoraproject.org/wiki/Mailing_list_guidelines
> >>> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> >>> Do not reply to spam, report it:
> https://pagure.io/fedora-infrastructure/new_issue
> >>
> >> How about the /usr/lib/modules directory? You probably still have all
> the modules for the old kernels there.
> >>
> >
> > Those will probably actually be gone.  The way you get these is if the
> > /boot is not visible and/or mounted and/or hidden during the rpm
> > removal or there is another /boot that was incorrectly mounted at the
> > time over the right boot.   The exact same thing also happens with
> > installs, if wrong /boot then the kernel/initramfs gets installed
> > something that is not used during boot.
>
> In the post to which I was replying, the "rpm" command was not being used
> for the removal. The files were being removed manually because "rpm" did
> not show those kernels as being installed.
>
> --
> Bob Nichols     "NOSPAM" is really part of my email address.
>                  Do NOT delete it.
>
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam, report it:
> https://pagure.io/fedora-infrastructure/new_issue
>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to