Bug 2120053 - After the latest update my system boots into emergency mode
Summary: After the latest update my system boots into emergency mode
Keywords:
Status: CLOSED DUPLICATE of bug 2118287
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 36
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-21 10:18 UTC by lafares.lae
Modified: 2022-08-22 21:53 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-08-21 20:07:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File generated when emergency mode started (125.68 KB, text/plain)
2022-08-21 10:19 UTC, lafares.lae
no flags Details
dnf.log (469.49 KB, text/plain)
2022-08-21 10:20 UTC, lafares.lae
no flags Details
journalctl -b output (817.13 KB, text/plain)
2022-08-21 12:46 UTC, lafares.lae
no flags Details
/boot/loader/entries/*18.17-200.fc36.x86_64.conf (524 bytes, text/plain)
2022-08-21 12:50 UTC, lafares.lae
no flags Details
/boot/loader/entries/*18.18-200.fc36.x86_64.conf (499 bytes, text/plain)
2022-08-21 12:51 UTC, lafares.lae
no flags Details
/etc/kernel/cmdline (239 bytes, text/plain)
2022-08-21 14:36 UTC, lafares.lae
no flags Details

Description lafares.lae 2022-08-21 10:18:15 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0
Build Identifier: 

I updated the system yesterday, and finished the install. Today I boot it up the first time and it (I think grub) gives me a version select screen. Selecting the latest version boots me into emergency mode. And tells me I should report this issue with the rdsosreport it generated. It lets me enter the password to decrypt my disk and then loads for a bit and enters emergency mode. Booting into the next entry (which I presume is the version from before the update) boots without problems and runs as expected. 

Reproducible: Always

Steps to Reproduce:
1: Update the system
2: Boot
Actual Results:  
Boots into emergency mode

Expected Results:  
A normal boot

Comment 1 lafares.lae 2022-08-21 10:19:16 UTC
Created attachment 1906703 [details]
File generated when emergency mode started

Comment 2 lafares.lae 2022-08-21 10:20:11 UTC
Created attachment 1906704 [details]
dnf.log

Comment 3 Zbigniew Jędrzejewski-Szmek 2022-08-21 11:18:30 UTC
[    0.000000] prospero kernel: Linux version 5.18.18-200.fc36.x86_64 (mockbuild.fedoraproject.org) (gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1), GNU ld version 2.37-27.fc36) #1 SMP PREEMPT_DYNAMIC Wed Aug 17 16:02:04 UTC 2022
[    0.000000] prospero kernel: Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.18.18-200.fc36.x86_64 root=UUID=0cd7f5a1-e172-41e6-bed1-897fd26409b1 rd.luks.uuid=luks-6c8468c9-e83f-458d-a481-86dc2e31c310 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init
...
[    1.819235] prospero systemd[1]: systemd v250.8-1.fc36 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
...
[   21.008346] prospero systemctl[1088]: Failed to switch root: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.

+ cat /proc/self/mountinfo
1 1 0:2 / / rw shared:1 - rootfs rootfs rw
23 1 0:22 / /proc rw,nosuid,nodev,noexec,relatime shared:2 - proc proc rw
24 1 0:23 / /sys rw,nosuid,nodev,noexec,relatime shared:3 - sysfs sysfs rw
25 1 0:5 / /dev rw,nosuid shared:9 - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1048576,mode=755,inode64
26 24 0:6 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:4 - securityfs securityfs rw
27 25 0:24 / /dev/shm rw,nosuid,nodev shared:10 - tmpfs tmpfs rw,inode64
28 25 0:25 / /dev/pts rw,nosuid,noexec,relatime shared:11 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
29 1 0:26 / /run rw,nosuid,nodev shared:12 - tmpfs tmpfs rw,size=6562052k,nr_inodes=819200,mode=755,inode64
30 24 0:27 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:5 - cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot
31 24 0:28 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:6 - pstore pstore rw
32 24 0:29 / /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime shared:7 - efivarfs efivarfs rw
33 24 0:30 / /sys/fs/bpf rw,nosuid,nodev,noexec,relatime shared:8 - bpf bpf rw,mode=700
65 1 0:32 / /sysroot ro,relatime shared:29 - btrfs /dev/mapper/luks-6c8468c9-e83f-458d-a481-86dc2e31c310 ro,ssd,space_cache=v2,subvolid=5,subvol=/

The kernel cmdline includes root= and rd.luks.uuid=, I assume that those are correct. But it doesn't include rootflags=subvol=root,
so everything is mounted "one level up", i.e. you get the root file system on /sysroot/root/ instead of /sysroot/.

Based on the logs, you were installing nvidia modules… I suspect that something went wrong there.
Please attach a boot log from a working boot ('journalctl -b'),
and also the file /boot/loader/entries/*-5.18.18-200.fc36.x86_64.conf

Comment 4 lafares.lae 2022-08-21 12:46:08 UTC
Created attachment 1906706 [details]
journalctl -b output

Comment 5 lafares.lae 2022-08-21 12:50:44 UTC
Created attachment 1906708 [details]
/boot/loader/entries/*18.17-200.fc36.x86_64.conf

Comment 6 lafares.lae 2022-08-21 12:51:05 UTC
Created attachment 1906709 [details]
/boot/loader/entries/*18.18-200.fc36.x86_64.conf

Comment 7 lafares.lae 2022-08-21 12:53:30 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3)
> [    0.000000] prospero kernel: Linux version 5.18.18-200.fc36.x86_64
> (mockbuild.fedoraproject.org) (gcc (GCC) 12.1.1 20220507 (Red
> Hat 12.1.1-1), GNU ld version 2.37-27.fc36) #1 SMP PREEMPT_DYNAMIC Wed Aug
> 17 16:02:04 UTC 2022
> [    0.000000] prospero kernel: Command line:
> BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.18.18-200.fc36.x86_64
> root=UUID=0cd7f5a1-e172-41e6-bed1-897fd26409b1
> rd.luks.uuid=luks-6c8468c9-e83f-458d-a481-86dc2e31c310 rhgb quiet
> rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
> initcall_blacklist=simpledrm_platform_driver_init
> ...
> [    1.819235] prospero systemd[1]: systemd v250.8-1.fc36 running in system
> mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS
> +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN -IPTC +KMOD
> +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +BZIP2 +LZ4 +XZ
> +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT
> default-hierarchy=unified)
> ...
> [   21.008346] prospero systemctl[1088]: Failed to switch root: Specified
> switch root path '/sysroot' does not seem to be an OS tree. os-release file
> is missing.
> 
> + cat /proc/self/mountinfo
> 1 1 0:2 / / rw shared:1 - rootfs rootfs rw
> 23 1 0:22 / /proc rw,nosuid,nodev,noexec,relatime shared:2 - proc proc rw
> 24 1 0:23 / /sys rw,nosuid,nodev,noexec,relatime shared:3 - sysfs sysfs rw
> 25 1 0:5 / /dev rw,nosuid shared:9 - devtmpfs devtmpfs
> rw,size=4096k,nr_inodes=1048576,mode=755,inode64
> 26 24 0:6 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:4 -
> securityfs securityfs rw
> 27 25 0:24 / /dev/shm rw,nosuid,nodev shared:10 - tmpfs tmpfs rw,inode64
> 28 25 0:25 / /dev/pts rw,nosuid,noexec,relatime shared:11 - devpts devpts
> rw,gid=5,mode=620,ptmxmode=000
> 29 1 0:26 / /run rw,nosuid,nodev shared:12 - tmpfs tmpfs
> rw,size=6562052k,nr_inodes=819200,mode=755,inode64
> 30 24 0:27 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:5 -
> cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot
> 31 24 0:28 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:6 -
> pstore pstore rw
> 32 24 0:29 / /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime
> shared:7 - efivarfs efivarfs rw
> 33 24 0:30 / /sys/fs/bpf rw,nosuid,nodev,noexec,relatime shared:8 - bpf bpf
> rw,mode=700
> 65 1 0:32 / /sysroot ro,relatime shared:29 - btrfs
> /dev/mapper/luks-6c8468c9-e83f-458d-a481-86dc2e31c310
> ro,ssd,space_cache=v2,subvolid=5,subvol=/
> 
> The kernel cmdline includes root= and rd.luks.uuid=, I assume that those are
> correct. But it doesn't include rootflags=subvol=root,
> so everything is mounted "one level up", i.e. you get the root file system
> on /sysroot/root/ instead of /sysroot/.
> 
> Based on the logs, you were installing nvidia modules… I suspect that
> something went wrong there.
> Please attach a boot log from a working boot ('journalctl -b'),
> and also the file /boot/loader/entries/*-5.18.18-200.fc36.x86_64.conf

I attached the files you asked for. If there is anything else you need, let me know.

Comment 8 Zbigniew Jędrzejewski-Szmek 2022-08-21 12:54:29 UTC
Aug 21 10:49:29 fedora kernel: Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.18.17-200.fc36.x86_64 root=UUID=0cd7f5a1-e172-41e6-bed1-897fd26409b1 ro rootflags=subvol=root rd.luks.uuid=luks-6c8468c9-e83f-458d-a481-86dc2e31c310 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init

vs.

[    0.000000] prospero kernel: Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.18.18-200.fc36.x86_64 root=UUID=0cd7f5a1-e172-41e6-bed1-897fd26409b1 rd.luks.uuid=luks-6c8468c9-e83f-458d-a481-86dc2e31c310 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init

options root=UUID=0cd7f5a1-e172-41e6-bed1-897fd26409b1 rd.luks.uuid=luks-6c8468c9-e83f-458d-a481-86dc2e31c310 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init


The question is why the options got mangled.

Comment 9 Zbigniew Jędrzejewski-Szmek 2022-08-21 13:24:28 UTC
Please also show the contents of /etc/kernel/cmdline and /usr/lib/kernel/cmdline.

/boot/loader/entries/*18.18-200.fc36.x86_64.conf was created by /usr/sbin/grub2-switch-to-blscfg.
I'll reassign this to grub2. I'm not familiar with how grub2 decided to build the commandline,
but something went wrong along the way.

Comment 10 lafares.lae 2022-08-21 14:36:11 UTC
Created attachment 1906722 [details]
/etc/kernel/cmdline

Comment 11 lafares.lae 2022-08-21 14:38:18 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #9)
> Please also show the contents of /etc/kernel/cmdline and
> /usr/lib/kernel/cmdline.
> 
> /boot/loader/entries/*18.18-200.fc36.x86_64.conf was created by
> /usr/sbin/grub2-switch-to-blscfg.
> I'll reassign this to grub2. I'm not familiar with how grub2 decided to
> build the commandline,
> but something went wrong along the way.

I attached /etc/kernel/cmdline. /usr/lib/kernel/cmdline does not exist.

Comment 12 Zbigniew Jędrzejewski-Szmek 2022-08-21 15:17:49 UTC
So the borked cmdline comes from /etc/kernel/cmdline.
Dunno, maybe the nivida rpms try to write it (to add
'rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init').

Comment 13 lafares.lae 2022-08-21 17:23:27 UTC
So are you saying I should raise the bug somewhere else? Where would that be?

Comment 14 Zbigniew Jędrzejewski-Szmek 2022-08-21 18:28:12 UTC
I suspect one of the rpms which provide nvidia drivers. Please consider what you installed/changed
since the install of the previous kernel.

Comment 15 lafares.lae 2022-08-21 19:55:13 UTC
I installed nvidia drivers a couple months back when I set up the system. Since then I've had one update that broke in a different way that kind of fixed itself. I still don't know what that was. But I've had a couple successful updates since. Other than that everything I have installed is typical user stuff, I don't really tinker with my system. Since the install of the previous kernel I have only installed Krita and some color picker app. 

I guess I'll try and open an issue on the rpmfusion bugtracker for the nvidia driver package. If you, by chance, know where I can actually fix this issue for now that would be great. There are so many files and I have no idea what each of them is for.

Comment 16 Zbigniew Jędrzejewski-Szmek 2022-08-21 20:06:44 UTC
To resolve the issue:

1. edit /etc/kernel/cmdline:
root=UUID=0cd7f5a1-e172-41e6-bed1-897fd26409b1 rootflags=subvol=root rd.luks.uuid=luks-6c8468c9-e83f-458d-a481-86dc2e31c310 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init

2. reinstall the kernel package:
sudo dnf reinstall kernel-core-18.18-200.fc36.x86_64

I'm not sure which component is responsible. You might want to ask on ask.fedoraproject.org.

Comment 17 Zbigniew Jędrzejewski-Szmek 2022-08-21 20:07:20 UTC
I'll close this bug, because it's (probably) not an issue in Fedora packaging.

Comment 18 lafares.lae 2022-08-22 09:50:22 UTC
After looking around and with your explanations, this issue might be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2118287

Comment 19 Robbie Harwood 2022-08-22 21:53:37 UTC

*** This bug has been marked as a duplicate of bug 2118287 ***


Note You need to log in before you can comment on or make changes to this bug.