Added dnf, dnf-system-upgrade and removed upgrades
the output is 40
To remove the duplicates, you can try this
sudo dnf remove --duplicates --releasever=40
as documented in the dnf man page man dnf
dnf [options] remove --duplicates
Removes older versions of duplicate packages. To ensure the integrity of the system it reinstalls the newest
package. In some cases the command cannot resolve conflicts. In such cases the dnf shell command with remove
--duplicates and upgrade dnf-shell sub-commands could help.
Do make sure your computer doesn’t get a power failure, as that was the reason for the mess in the first place.
Which is good! This means at least in theory you made the switch. Now do the normal cleanups as listed on the docs page.
So it finally worked . I performed the command
sudo dnf remove --duplicates --releasever=40 --skip-broken --allowerasing
and got rid of most of the f38 packages .
Then I performed dnf upgrade --refresh
and dnf distro-sync --skip-broken --allowerasing
.
I rebooted after each and every step . Now I think I got rid of almost all of the f38 package and updated to f40 packages .
But there are still some problems .
- My kernels are still f38 version .
The result ofuname -r
is 6.8.9-100.fc38.x86_64 . - Whenever I reboot it still says my os fedora 38 is at end of life support .
The dnf system-upgrade
commands don’t work anymore as it says I am already on 40.
How can I fully upgrade to f40 ?
Edit : As @vekruse pointed out below to fix both of the remaining issues you can try either of these commands :
sudo dnf reinstall 'kernel*'
or
sudo dnf upgrade kernel
I would expect you have 3 kernel versions installed and you perhaps didn’t boot the newest. To verify, run rpm -q
kernel*'. Also, when running
grub2-editenv - list` you may find a “saved_entry” entry, and you can remove that.
sudo grub2-editenv - unset saved_entry
Generally, there is no harm in running the 6.8.9-100.fc38.x86_64
kernel as it is basically the same version as the 6.8.9-300.fc40.x86_64
kernel.
It seems I have a fc40 kernel installed , but it doesn’t show up in the grub menu which appears during reboot .
I have total 5 kernels installed (1 rescue from f36 , 1 f37 , 2 f38 and 1 f40) but it only shows the 4 kernels in the grub menu leaving the f40 one . Even after I performed the command you mentioned.
Also how do I get rid of the os warning ?
I am not the smartest guy so here is my silly and useless comment: why don’t you reinstall Fedora from scratch? Even if you manage to fix all the said issues, will you trust that system?
If I was you, I would have attempted to recover only to backup my files before reinstalling.
This could be one of the other common issues. If you have a directory in /boot/efi
with a name in UUID format, you will need to remove that directory and its contents and run
sudo kernel-install add-all
If in doubt, display the result of running sudo find /boot/efi
.
I can’t find any such directory .
Here is the result :
➜ ~ sudo find /boot/efi
/boot/efi
/boot/efi/EFI
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/fbx64.efi
/boot/efi/EFI/BOOT/BOOTX64.EFI
/boot/efi/EFI/BOOT/fbia32.efi
/boot/efi/EFI/BOOT/BOOTIA32.EFI
/boot/efi/EFI/fedora
/boot/efi/EFI/fedora/BOOTIA32.CSV
/boot/efi/EFI/fedora/mmx64.efi
/boot/efi/EFI/fedora/gcdx64.efi
/boot/efi/EFI/fedora/grubx64.efi
/boot/efi/EFI/fedora/shimx64.efi
/boot/efi/EFI/fedora/shim.efi
/boot/efi/EFI/fedora/grubia32.efi
/boot/efi/EFI/fedora/BOOTX64.CSV
/boot/efi/EFI/fedora/shimia32.efi
/boot/efi/EFI/fedora/mmia32.efi
/boot/efi/EFI/fedora/gcdia32.efi
/boot/efi/System
/boot/efi/System/Library
/boot/efi/System/Library/CoreServices
/boot/efi/System/Library/CoreServices/SystemVersion.plist
/boot/efi/mach_kernel
@phypy to boot f40 kernel first find out the index of it like sudo grubby --info=ALL | grep -E "^kernel|^index"
once you determinate index number we can change the default kernel by using the index number:
`sudo grubby --set-default-index=your_index_number_of_kernel_f40’
and if you don’t have f40 kernel on list no problem just do ‘sudo dnf reinstall kernel*’ reboot and could be already set f40 kernel if not do instruction above
That is fine. So that was not the problem. Can you re-install the kernel
sudo dnf reinstall 'kernel*'
If that doesn’t do anything, then upgrading the kernel should do
sudo dnf upgrade kernel
After that you should have these files
/boot/System.map-6.8.10-300.fc40.x86_64
/boot/vmlinuz-6.8.10-300.fc40.x86_64
/boot/symvers-6.8.10-300.fc40.x86_64.xz
/boot/config-6.8.10-300.fc40.x86_64
/boot/.vmlinuz-6.8.10-300.fc40.x86_64.hmac
/boot/initramfs-6.8.10-300.fc40.x86_64.img
/boot/loader/entries/b4146134cc534b2bb35b75e467b91eb4-6.8.10-300.fc40.x86_64.conf
The string b4146134cc534b2bb35b75e467b91eb4
would be different in your case.
Thanks . It worked perfectly . Now the os end of life warning is also gone .
Thanks everyone for all the help .
I think reloading grub could have been enough.
But well, good that it is solved.
So the issue was an incomplete upgrade that could be solved by removing old packages, syncing with the distro and reinstalling the kernel
You may add the kernel reinstall to the comment I marked as solution so we have a good one.