You are not logged in.

#1 2024-04-30 16:25:16

damiano
Member
Registered: 2024-04-30
Posts: 5

Laptop stuck at booting

I have an odd issue that occurs "from time to time" when booting. I don't have any exact statistic, but let's say it happens every three boots. And please tell me if there is anything I can add to this post to make it easier to debug.

What happens is that the booting gets stuck (with the timer counting to 1 min 30 sec). Sometimes it continues after that and starts my desktop environment, but without networking (so I need to restart NetworkManager for it to work) and sometimes it just fails to boot. When it fails to boot the screen is filled by lots of error messages containing "udev" events.

Here are various things I have tried that might help someone identify the issue:

Looked through the logs. journalctl doesn't seem to show what's wrong, it just shows where it gets stuck (with the same message as when it gets stuck, no more info there).

Initially it got stuck at "boot.mount", so I tried removing "/boot" from fstab (just for testing purposes), but that just made it get stuck at something else (random-seed service). The frequency is the same, about one in three boots fails.

I installed two other systemd distros, NixOS and Mint, and they worked out of the box (I rebooted a gazilion times and encountered no issues at all; on NixOS I tested both the 23.11 channel with systemd version 254.10 as well as the unstable one with version 255.4).

I tried installing Void to see if I could get more information on what's wrong and there it got stuck at an udev event (yay!) at each boot. To fix it there I had to change an udev rule from "udevadm settle" to "udevadm settle --timeout=5", after that booting was fixed, but shutting down didn't work. It just got stuck. I found a fix online which was to install the proprietary nvidia driver.

Does this make any sense? For me all the issues just look random. What can I do to find the root of the issue?

Offline

#2 2024-04-30 18:12:57

Prew
Member
Registered: 2006-12-31
Posts: 15

Re: Laptop stuck at booting

Let me guess: nvidia GPU and 550 drivers?

Offline

#3 2024-05-01 06:01:50

damiano
Member
Registered: 2024-04-30
Posts: 5

Re: Laptop stuck at booting

Yes, but the strange thing is that neither Mint nor NixOS got stuck when not using the proprietary nvidia drivers. I tried to install nvidia-dkms on arch now and it still fails to boot.
I also noticed that /boot gets mounted even if it is commented in fstab (?)

Here's a pastebin showing journalctl -xe after a failed boot (where I got to the desktop environment): https://pastebin.com/8eMnNqnv

Here's a part mentioning the failure of mounting /boot

░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An n/a= process belonging to unit boot.mount has exited.
░░ 
░░ The process' exit code is 'killed' and its exit status is 15.
May 01 06:58:09 archlinux systemd[1]: boot.mount: Failed with result 'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit boot.mount has entered the 'failed' state with result 'timeout'.
May 01 06:58:09 archlinux systemd[1]: Failed to mount EFI System Partition Automount.
░░ Subject: A start job for unit boot.mount has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit boot.mount has finished with a failure.
░░ 
░░ The job identifier is 127 and the job result is failed.

Offline

#4 2024-05-01 06:13:25

damiano
Member
Registered: 2024-04-30
Posts: 5

Re: Laptop stuck at booting

I might have found it!
systemd automounts /boot even if it's not present in fstab, and masking the service, like so:

sudo systemctl mask boot.automount 

seems to have fixed it (I have rebooted four times now without getting stuck, I will try to reboot with /boot added to fstab again to see if it still works).

I will report back.

Offline

#5 2024-05-01 06:21:55

damiano
Member
Registered: 2024-04-30
Posts: 5

Re: Laptop stuck at booting

Readding /boot to fstab reintroduces the problem :-(

Here's the line from fstab:

UUID="36EA-A91D" /boot vfat defaults,fmask=0137,dmask=0027 0 2

Offline

#6 2024-05-02 07:37:24

damiano
Member
Registered: 2024-04-30
Posts: 5

Re: Laptop stuck at booting

After more testing I might have fixed it by

1) Replace the contents of /usr/lib/systemd/system/systemd-vconsole-setup.service with

[Service]
WorkingDirectory=/usr/share/empty

Found it here: https://github.com/systemd/systemd/issues/30386


2) masking systemd-udev-settle.service, i.e., by running:

sudo systemctl mask systemd-udev-settle.service

Came up with it since the issue in Void was with udev-settle.

For me it just works if I do both steps above, not just one of them.


I have also found a way to reproduce it whenever I want (if the udev settle is not masked). If you chroot into a linux install and reboot without unmounting it will fail to mount boot next time you boot, so:

1) mount a some partition containing a distro to /mnt

sudo mount /dev/nvme0n1p2 -osubvol=void /mnt/

2) mount the EFI boot partition to /mnt/boot

sudo mount /dev/nvme0n1p1 /mnt/boot/

3) mount dev, proc, sys

mount -t proc /proc /mnt/proc/
mount -t sysfs /sys /mnt/sys/
mount --rbind /dev /mnt/dev/

4) chroot into the folder

sudo chroot /mnt

5) Open another terminal and reboot

reboot

It just struck me that this would probably also work with running

arch-chroot /mnt

and rebooting in another terminal (without exiting the chroot).

Last edited by damiano (2024-05-02 07:45:17)

Offline

Board footer

Powered by FluxBB