Suddenly unable to boot. Fsck didn't find any problems

I’m having a rather big problem. I couldn’t get into openSUSE. My dual-booted Windows was running slowly, the D drive wasn’t appearing, and the drive shared with Linux had changed from NTFS to “raw.” I was able to reformat the shared drive and repair the others with Windows’ tools.

But openSUSE still does not boot at all. If I choose it from the bootloader, it gets stuck on the loading screen with the spinning circle.

The only thing unusual that led to this was that openSUSE was badly frozen when I woke the computer from sleep, with ctrl+alt+backspace not working, and I had to turn it off with the power button. Usually, it comes back fine when it starts back up. But the next couple times I tried to turn on the computer, it hung on the Lenovo splash screen, and I had to restart again until I finally made it to Windows. There was a Windows update I think earlier in the day and some openSUSE updates I didn’t pay attention to the content of.

Trying to load the other stored kernel didn’t work either. So, following a tutorial, I booted a live USB and ran fsck on the boot and root partitions. It claims there’s nothing to repair. So what else can I do?

You can press <Esc> to see boot messages.

When booting you can edit the grub boot command, the line starting with “linux /vmlinux”) and add a space and 3 at the end of the line to boot into runlevel 3, text mode with network.

Also removing quiet from this line is a good idea.

Those edits are only for the following boot.

I looked at the boot messages. There were a bunch of “OK” messages and then one that said “A start job is running for /dev/disk/”… that kept running and never completed. Same happened after I edited the boot command.

So it looks like that a vital partition/drive can’t be found. You need to compare the UUID (from the error message) with the ones in /etc/fstab and find out why the drive/partition can’t be found.

It turns out the UUID from the error message doesn’t match any of my partitions. Is it trying to boot a drive that doesn’t exist or something?

Oh, I just tried opening /etc/fstab. I didn’t see any actual contents of the file; it just looked like two error messages and a screenful of blank lines. But the error messages said there are two swap files, /etc/.fstab.swp and /var/tmp/fstab.swp, that cannot be read and might be being edited by another program, and that “an edit session for this file crashed.” The second one also had a write error. It’s asking me to recover the changes and then delete the file. Should I do this?

Don’t know how to copy the error messages in vi; sorry.

It is trying to mount a filesystem that is listed in your /etc/fstab and no more exists. Most likely because you formatted it as you said earlier:

Delete the line in the /etc/fstab that contains UUID from the error message.

I can’t do this; /etc/fstab can’t open. When I try to open it, it says there was a read error and a write error. It tells me I have many of what I guess are conflicting versions of /etc/.fstab.swp. All of the versions cannot be read.

All right, I was doing something stupid, trying to edit the fstab of the live USB instead of the system.

I found that the unmountable UUID really was in there and was associated with swap. I replaced it with the new PARTUUID of swap, though I don’t know why it would’ve changed. When I tried to boot, it was still trying to mount that UUID that I had removed. Found a thread with the same problem and saw it was still set in /etc/default/grub.

So I hope this is my final question: if I edit /etc/default/grub from a live USB, how do I grub2-mkconfig from there?

You have to chroot into the installed system first.
We can help you do that but we will need some output about your installed system. From the live USB show
lsblk

@SceoMyntan You can just boot the system, press the e key to edit the entry, arrow down to the linuxefi line arrow across and edit as required. Press F10 to boot the system and then use the normal tools to update as required…

Didn’t know how to get the lsblk output onto here for posting since I didn’t have a graphical interface or internet on the live USB, but here’s what the structure is:

loop0 – squashfs_container
loop1 – rootfsbase
sda1, 2, 3 – Windows
sda4 – home
sda5 – swap
sr0
nvme0n1p1, 2, 3, 4– Windows
nvme0n1p5– boot
nvme0n1p6– /

OK, here’s what you do, from the USB, as the root user:

mount /dev/nvme0n1p6 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
mount -a
yast

It will fire up YaST in ncurses mode. Navigate to System - Bootloader, change the delay to 7 secs, and save it. I will rewrite the bootloader.

It worked. Thank you!
I slowly learn more about Linux every time I have a computer problem.

1 Like

Um, it’s not booting again. It worked yesterday. I haven’t changed anything since then. Now it’s going to emergency mode instead of just hanging.

It’s saying “failed to activate swap.” I checked and the swap partition ID had changed since the last time for some reason. I put the right one in, but it’s still failing to activate. I’m also getting “dependency failed” for Swaps, /home, local file systems, and early kernel boot messages, and failure to fsck my home partition even though the UUID is correct.

I found that it works. I just have to mount -a when it boots to emergency mode for some reason.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.