System is unbootable after the update

I fixed the nodejs issue with dnf module reset nodejs.

As for the btrfs, here’s what I got:

[liveuser@localhost-live ~]$ sudo btrfs check /dev/mapper/luks-5804e086-d555-45f8-98c0-794db93975c5
Opening filesystem to check...
Checking filesystem on /dev/mapper/luks-5804e086-d555-45f8-98c0-794db93975c5
UUID: c153724c-7b16-45c3-80d0-0a051a1d7224
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 149055426560 bytes used, no error found
total csum bytes: 143516800
total tree bytes: 1859256320
total fs tree bytes: 1584791552
total extent tree bytes: 79691776
btree space waste bytes: 376053163
file data blocks allocated: 20720449634304
 referenced 165488922624

With that I would suggest that one do a full selinux relabel. Simple (though a bit delaying during boot) by doing sudo touch /.autorelabel. The next boot will delay during startup while it does a full relabel of the selinux attributes on the entire file system.

One may also do the same while the system is running using restorecon though one would need to be absolutely sure the process was complete before the next shutdown.

This didn’t work. I tried both, first running restorecon, then creating the .autorelabel file. First, I restarted with the SELinux disabled, then I enforced it before the next boot. And got the same Failed to mount API filesystems. error.

I also tried fixfiles relabel

    Files in the /tmp directory may be labeled incorrectly, this command
    can remove all files in /tmp.  If you choose to remove files from /tmp,
    a reboot will be required after completion.

    Do you wish to clean out the /tmp directory [N]? y
Cleaning out /tmp
fixfiles: No suitable file systems found
Cleaning up labels on /tmp
cat: /initial_contexts/unlabeled: No such file or directory
secon: SELinux is not enabled

You previously indicated you were using “permissive” mode. Did you dispable SElinux because the system wouln’t boot using “permissive” mode? Please show us the text from sestatus.

It was disabled. I actually never set it to permissive mode.

I set it to permissive mode and the relabelling took place. Reboot went fine and now I set it to enforcing again and it’s now booting normally.

Alright. It seems to be fixed now. At least the system is bootable and seems to work fine.

Can I mark multiple answers as solution? It’s my first post here, so not sure how to end this discussion. :slight_smile:

Make a final post with the key steps, both the benefit of others and for future reference. You should mention:

  • package cleanup – the nodejs package from koji was looking for older packages, creating conflicts, and not needed to boot F38

  • booting Live USB to check filesystems (are any partitions full, can partions be mounted) and drive health

  • using permissive mode and relabelling to fix SElinux probelms

  • the importance of providing complete information in searchable text format when possible

This sort of post is very valuable. My experience has been that for every person who uses the forum to work through a problem, there are many more who won’t post and can end up finding bad advice on the web.

Here’s how to fix the system after a messed up update.

  1. Get a live USB distro. I think it doesn’t matter which one, but I went for Fedora as I’m familiar with it and the GUI tools are great there.
  2. Boot from the live USB and mount your partition. If you use LUKS, first decrypt it, then mount the mapped partition.
  3. Make sure you are connected to the Internet.
  4. chroot into the mapped partition, not forgetting to add /root to the partition path.
  5. Update the /etc/resolv.conf with these two lines, so dnf doesn’t fail while updating: nameserver 1.1.1.1 and nameserver 8.8.8.8.
  6. Do dnf check. It should give you a list of issues, and most likely these issues cause the system to fail while booting up. In my case there were duplicating packages.
  7. Do dnf update. Add —exclude <package name> for any packages that can prevent you from updating.
  8. Fix the issues with dnf remove --duplicates and dnf distro-sync. And if there’s anything mentioning nothing provides module…, simply do dnf module reset <module name>.
  9. At this point the package related issues should be gone, but you can find yourself with an error [!!!!!!] Failed to mount API filesystems. on boot.
  10. Again, boot using live USB, mount and chroot into your partition.
  11. Edit the /etc/selinux/config and set SELINUX=disabled
  12. At this point the system should be bootable.
  13. Set the SELINUX=permissive and do touch /.autorelabel. The last one makes the system do the relabelling needed for SELinux.
  14. Reboot and wait till the relabelling finishes.
  15. Reboot and now your system should boot with no issues.
  16. Edit the /etc/selinux/config and set SELINUX back to enforcing.
3 Likes