Sudo dnf update gives %posttrans scriptlet error: kernel-modules-0:6.17.10-100.fc41.x86_64

Try reinstalling the newest kernel.
sudo dnf reinstall kernel*
It should install the kernel in the proper place and update grub accordingly.

If you have not previously enabled a root user password you may need to follow the steps here to recover the root login so you can boot the rescue mode kernel.

I tried to follow those steps, but after adding rw init=/bin/bash it says that command passwd is not found

I forgot that the rescue image does not have that command in the path.
It may work with the full path /bin/passwd

If not then you probably will need to boot from the live media for recovery.
When booting from the live media it is also relatively simple to use chroot after mounting the installed file systems and actually perform the kernel update.

  1. boot the live media
  2. use su to get the root access
  3. use lsblk -f to identify the file systems on the installed drive
  4. use mount <root file system partition identified above> /mnt to access that file system.
  5. mount the additional pieces needed for using chroot
    for i in dev proc sys run sys/firmware/efi/efivars ; do mount -o bind /$i /mnt/$i ; done
  6. chroot /mnt to get into the installed file system
  7. mount -a to mount the remaining file systems
  8. sudo upgrade kernel\* to install the newest kernel
    (May require that you use sudo reinstall kernel\* if you already have the latest kernel (6.17.12) installed.)
  9. exit to get out of the chroot environment
  10. A reboot now should give you the option to boot to the latest fedora kernel.

Alright, now everything should be corrected, I adjusted some of the steps plus I’ll add some from my personal experience so I’ll list them here:

  1. When creating the live media USB at first I used Rufus in my Windows and burned F41 on it, when I went to boot through the USB after selecting Try Fedora Live the PC immediately shuts off, anyways after that I found that the recommended way to create the USB is through Fedora Media Writer, after recreating the USB with the same ISO it worked correctly and booted perfectly.
  2. Once inside the live environment first I used lsblk -f as you said to locate partitions.
  3. I started mounting:
    mount -o subvol=root /dev/nvme0n1X /mnt
    mount -o subvol=home /dev/nvme0n1X /mnt/home
    (Mounting root partitition, home and root gets put together on the same level if I don’t specify the subvolumes)
    I think in your command you missed /boot and /boot/efi partitions:
    mount /dev/nvme0n1Y /mnt/boot
    mount /dev/nvme0n1Z /mnt/boot/efi
    for i in dev proc sys run sys/firmware/efi/efivars ; do mount -o bind /$i /mnt/$i ; done
  4. After mounting everything we chroot /mnt and get in the system, running mount -a
  5. Ran sudo upgrade kernel\* and sudo reinstall kernel\* (also ran grub2-mkconfig -o /boot/grub2/grub.cfg
  6. After that F41 6.17.10 kernel image was successfully reinstalled and exiting the chroot and rebooting makes the entry appear.
  7. After booting inside 6.17.10 I proceeded to clean up the leftover packages from 6.17.8 and 6.17.7 kernels and upgraded from F41 to F43 following the steps on Upgrading Fedora Linux Using DNF System Plugin :: Fedora Docs

And now I can finally rest in my 6.17.12 F43 kernel, thanks again to all the people who helped: @computersavvy @vekruse @pg-tips

1 Like

Handled by the mount -a command once in the chroot environment.

Ah yes that makes sense lol