I turned off my laptop when it said not to!




Fedora 36.

Apologies for the basic information. Anyway I need to use my laptop that runs Linux to update my claim for help with payments to my rent. So I really need help to get it working again! I can send screenshots of the issue!

Sure. But it is kind of time and chance as to whether or how badly shutting of your system when it says not to will mess up your system.

1 Like

Thanks. :crazy_face:

OK. It says it is missing kernel modules for the kernel that it is trying to boot. That is a pretty severe problem. But Fedora Linux keeps multiple fallback kernels just in case of that sort of problem. When you reboot the computer from that screen (try pressing Ctrl+Alt+Delete), do you see a list of three kernels to chose from? If, so try picking a different one.

If such a menu does not show, try pressing F8 repeatedly when the computer brand logo first shows (some PCs also beep).

1 Like

Wait, I just noticed that it shows “Failed to start local-fs.target” in one of your earlier screenshots. That might be a much worse problem. It might be that your root filesystem is corrupt. There might not be much you can do about that, but I guess your best bet would be to boot into the dracut rescue shell and see if you can run some sort of filesystem check.

To get to the dracut rescue shell, you should be able to press e when one of the kernels is highlighted in the first menu. Then find the line that starts with linux and add rd.break=pre-mount at the end of that line. Then press ctrl+x to continue booting.

1 Like

Yes I have these… I have tried them all but the same problem problem with each option. The system hangs. I can get to root if I need to via command line.

Right, I think that is what you will have to do. Then try to run some sort of filesystem repair tool. Unfortunately, I’ve never done that with Btrfs, so I’m not sure how much I will be able to help there.

Edit: Oh, it looks like your system has been upgraded since Fedora Linux 31. I think in that case you will probably have a ext4 filesystem, not Btrfs.

Gregory, thank you so much!! Not fixed yet but I have options that I never thought of! Peace out man!

I can’t unmount to do a fsck.ext4 :grimacing:

I’m confused. If you’ve got that far, then the filesystem is probably OK. So you are booting into single user mode and it works?

Was it doing an update when you turned it off? If so, then trying to restart/finish the update might be what you need to do.

If you have a working internet connection, you might be able to finish/fix your system update by running sudo dnf distro-sync --releasever=36.

Well… I added the number 5 to the end of the grub line for Linux. Then I was able to log in to the command line.

I then tried to do a fschk.ext4 command. But it said I couldn’t because it’s “mounted “

Or busy.

OK. I think you should have a working internet connection in runlevel 5. Can you confirm that with something like ping google.com?

Yes I have a working connection:)

And at this point it doesn’t matter if we can’t get it working. It’s not essential. Your help is amazing and insightful!

Great! If you know how to take a snapshot of your LVM root filesystem, that might be a good thing to do at this point so that you will be able to go back in case whatever we try next goes badly. It’s been a while since I did that, so I’m not sure how to. You can skip this step, but be warned that you will be “burning your bridges” if you do so. Also, if you want to save your /home partition off to a backup drive, now would be a good time to do that.

The next thing I would try is a full system update with sudo dnf distro-sync --releasever=36.

If you have a large enough external usb drive with a posix-compliant filesystem (e.g., ext4, not FAT), you should be able to backup your /home folder my mounting it to, e.g. /mnt, and running cp -a /home /mnt. The cp command doesn’t show progress, but you will know it is working by your flashing HDD LED.

P.S. Be sure /mnt is actually the external drive before you run that copy (cp) command. You can do that by inspecting the contents, by running mountpoint /mnt, or by viewing the output of df -h. (The latter is probably the best method.)

2 Likes

I am going to copy my home directory to a usb drive and back up important things. I can do that via command line.

Then I’ll just reinstall.

Life is good :+1: thank you for helping me mate. Lesson is… don’t turn off your system when it says not to! :face_with_open_eyes_and_hand_over_mouth::joy:

This is also a good opportunity to reformat you HD with Btrfs instead of LVM and ext4. Btrfs has better protections against filesystem corruption. :slightly_smiling_face:

2 Likes

In such situations I prefer booting from a live system since it allows you to operate on the broken system without mounting its filesystem.

Also BTRFS is a good filesystem with compression, file deduplication and built in snapshots, try it out.

2 Likes

All the help is very much appreciated and using the guidance from this thread I was able to fix my problem. So just in case anyone else is in the unfortunate situation where shutting down during update is unavoidable:

  1. Press e when you see the grub menu
  2. Edit the line that starts with linux and add 3 at the end of that line. Then press Ctrl+X. See: How to Boot into Rescue / Emergency Mode in Debian/Ubuntu & Fedora/CentOS - FOSTips
    2a. Start networking. I used: sudo systemctl restart systemd-resolved.service
    2b. Test connection: ping www.google.com
  3. Enter dnf update
  4. Remove the packages that are causing the error. See: "dnf update" Transaction test error
  5. Enter dnf update again
    Then restart.
2 Likes