System won't boot after new kernel installed (previously relocated to new disc)

Hi,

Few weeks ago I decided to move /boot, /boot/efi and root subvolume from spinning disc to NVMe. The subvolume /home is still on the spinning disk. I generate new UUIDs and updated /etc/fstab file.
The system worked fine until new kernel was installed. Unfortunately the boot process stops on “Finished systemd-vconsole-setup.service - Virtual Console Setup.” Boot on previous installed kernel and execution of sudo grub2-mkconfig -o /boot/grub2/grub.cfg or sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg solves the problem until next kernel update.

Could please help me to solve this issue.

Thank you in advance.

Kalin

Added boot, f39

Restore the proper configuration:

sudo dnf -y reinstall grub2-common

Then follow the documentation:
Fedora User Docs: Reinstalling GRUB 2

Hi Vladislav,

Thank you very much for your prompt answer. Unfortunately this solution doesn’t work. I’ve already executed sudo dnf reinstall grub2-efi grub2-efi-modules shim but without any success.

Best Regards!
Kalin

Recreate the GRUB configs from scratch and rebuild initramfs:

sudo grub2-editenv - create
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo rm -f /boot/efi/EFI/fedora/grub.cfg 
sudo dnf -y reinstall grub2-common
sudo dracut -f --regenerate-all

If the issue persists, check the output:

sudo head -v -n -0 /etc/fstab \
    /etc/default/grub \
    /boot/efi/EFI/fedora/grub.cfg \
    /{proc,etc/kernel}/cmdline
lsblk -o +FSTYPE,UUID
sudo grub2-editenv - list
sudo efibootmgr

Dear Vladislav,

Again there was no result. I’ve found difference in /etc/kernel/cmdline and replaced root=UUID=da0e1d50-9f10-473d-bd2f-1be938af752b with root=UUID=711df36b-d777-4082-863c-b3c324703465 and executed commands. Boot process now stops again, but on different stage.

Below you may find printout :

==> /etc/fstab <==

/etc/fstab

Created by anaconda on Tue Oct 25 14:46:53 2022

Accessible filesystems, by reference, are maintained under ‘/dev/disk/’.

See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.

After editing this file, run ‘systemctl daemon-reload’ to update systemd

units generated from this file.

#UUID=da0e1d50-9f10-473d-bd2f-1be938af752b / btrfs subvol=root,compress=zstd:1 0 0
UUID=711df36b-d777-4082-863c-b3c324703465 / btrfs subvol=root,compress=zstd:1 0 0
#UUID=294acd03-3441-4353-8a48-dcc77f4117c5 /boot ext4 defaults 1 2
UUID=08007ecd-c60f-426d-ac05-a2fb43b94e30 /boot ext4 defaults 1 2
#UUID=E34A-8384 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=471D-86A3 /boot/efi vfat umask=0077,shortname=winnt 0 2
#UUID=da0e1d50-9f10-473d-bd2f-1be938af752b /home btrfs subvol=home,compress=zstd:1 0 0
#/dev/mapper/rl-home /home xfs defaults 0 0
UUID=24e0d94c-f307-4b13-a36d-f76cc40ac99b /home xfs defaults 0 0

==> /etc/default/grub <==
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=“$(sed ‘s, release .*$,g’ /etc/system-release)”
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=“console”
GRUB_CMDLINE_LINUX=“rhgb quiet”
GRUB_DISABLE_RECOVERY=“true”
GRUB_ENABLE_BLSCFG=true

==> /boot/efi/EFI/fedora/grub.cfg <==
search --no-floppy --root-dev-only --fs-uuid --set=dev 08007ecd-c60f-426d-ac05-a2fb43b94e30
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg

==> /proc/cmdline <==
BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.7.3-200.fc39.x86_64 root=UUID=711df36b-d777-4082-863c-b3c324703465 ro rootflags=subvol=root rhgb quiet

==> /etc/kernel/cmdline <==
root=UUID=da0e1d50-9f10-473d-bd2f-1be938af752b ro rootflags=subvol=root rhgb quiet
[kalin@xterm5 ~]$ lsblk -o +FSTYPE,UUID
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
FSTYPE UUID
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 100M 0 part vfat 7C3E-0088
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 232,2G 0 part ntfs 44FE4518FE450420
├─sda4 8:4 0 570M 0 part ntfs 3A6EE8EC6EE8A1BD
└─sda5 8:5 0 232,9G 0 part ntfs 7070E51270E4E038
sdb 8:16 0 931,5G 0 disk
├─sdb1 8:17 0 600M 0 part vfat E6C8-0CD6
├─sdb2 8:18 0 1G 0 part xfs b14eec87-449b-4166-bb6b-75dfe52be55a
└─sdb3 8:19 0 929,9G 0 part LVM2_member sJjmgi-skKb-88ZR-dGy3-TNOJ-tVgK-4cHseP
├─rl-swap 253:0 0 15,7G 0 lvm swap 2783516d-648f-4baa-b19e-0a304a81f3f9
├─rl-home 253:1 0 844,2G 0 lvm /home xfs 24e0d94c-f307-4b13-a36d-f76cc40ac99b
└─rl-root 253:2 0 70G 0 lvm xfs 1cb89d21-6761-4bba-980e-a703175e9033
sr0 11:0 1 1024M 0 rom
zram0 252:0 0 8G 0 disk [SWAP]
nvme0n1 259:0 0 119,2G 0 disk
├─nvme0n1p1 259:1 0 600M 0 part /boot/efi vfat 471D-86A3
├─nvme0n1p2 259:2 0 1G 0 part /boot ext4 08007ecd-c60f-426d-ac05-a2fb43b94e30
└─nvme0n1p3 259:3 0 117,7G 0 part / btrfs 711df36b-d777-4082-863c-b3c324703465
[kalin@xterm5 ~]$ sudo grub2-editenv - list
boot_success=1
saved_entry=f2399727c50442f28450ad192a3a28ce-6.7.4-200.fc39.x86_64
boot_indeterminate=0
[kalin@xterm5 ~]$ sudo efibootmgr
BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0001,000B,0008,0000,0006,0003,0002,0004,0007,0005
Boot0000 USB: PciRoot(0x0)/Pci(0x7,0x1)/Pci(0x0,0x3)4eac0881119f594d850ee21a522c59b20b80000049535048
Boot0001* Rocky Linux HD(1,GPT,e548323d-8e8f-452a-af7c-db629caa0039,0x800,0x12c000)/\EFI\rocky\shimx64.efi0400000049535048
Boot0002* IPV6 Network - Realtek PCIe GBE Family Controller PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x2)/Pci(0x4,0x0)/Pci(0x0,0x0)/MAC(9c7bef537018,0)/IPv6([::],0,Static,[::],[::],64)4eac0881119f594d850ee21a522c59b20000000049535048
Boot0003* IPV4 Network - Realtek PCIe GBE Family Controller PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x2)/Pci(0x4,0x0)/Pci(0x0,0x0)/MAC(9c7bef537018,0)/IPv4(0.0.0.0,0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)4eac0881119f594d850ee21a522c59b20000000049535048
Boot0004 USB: BBS(65535,0x0)/PciRoot(0x0)/Pci(0x7,0x1)/Pci(0x0,0x3)ffff0b80000049535048
Boot0005* SK hynix BC511 HFM512GDJTNI-82A0A-CY03N072811104149 BBS(HD,SK hynix BC511 HFM512GDJTNI-82A0A-CY03N072811104149,0x400)/PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)/NVMe(0x1,AC-E4-2E-00-0A-29-4C-A7)02001000000049535048
Boot0006* hp HLDS DVDRW GUD1N PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x1)/Sata(1,0,0)4eac0881119f594d850ee21a522c59b20930000049535048
Boot0007* hp HLDS DVDRW GUD1N BBS(CDROM,hp HLDS DVDRW GUD1N ,0x400)/PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x1)/Sata(1,0,0)01000930000049535048
Boot0008* Fedora HD(1,GPT,a6f56051-0f79-4116-9388-36ccd721f3e1,0x800,0x12c000)/\EFI\fedora\shimx64.efi0400000049535048
Boot000B* Windows Boot Manager HD(1,GPT,953ed855-8eda-4278-8f6a-84ef238d7a7b,0x800,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff04001400000049535048
Boot000C* Fedora HD(1,GPT,a6f56051-0f79-4116-9388-36ccd721f3e1,0x800,0x12c000)/\EFI\fedora\shimx64.efi
Boot000D* Fedora HD(1,GPT,d73220ba-e1f0-46e9-8385-6a55682f8b08,0x800,0x12c000)/\EFI\fedora\shimx64.efi

Best Regards!

Kalin

You have multiple Fedora EFI entries and some of them are probably stale.
Also check this to identify the correct one:

lsblk -o +PARTUUID

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
PARTUUID
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 100M 0 part 953ed855-8eda-4278-8f6a-84ef238d7a7b
├─sda2 8:2 0 16M 0 part 226387d0-773a-4e26-a7ff-5f8493dfdd5c
├─sda3 8:3 0 232,2G 0 part bc9eba1a-3e6e-4edd-83ba-0d283c1a427c
├─sda4 8:4 0 570M 0 part fac539b9-c169-4573-962b-666d73c974b0
└─sda5 8:5 0 232,9G 0 part fc52f139-374e-461c-a9fe-2f74ecfb9032
sdb 8:16 0 931,5G 0 disk
├─sdb1 8:17 0 600M 0 part e548323d-8e8f-452a-af7c-db629caa0039
├─sdb2 8:18 0 1G 0 part 76a755e7-7211-46c2-8914-d9d5df254673
└─sdb3 8:19 0 929,9G 0 part d309a7d2-19bc-4ff3-9d09-8cee40caa4b1
├─rl-swap 253:0 0 15,7G 0 lvm
├─rl-home 253:1 0 844,2G 0 lvm /home
└─rl-root 253:2 0 70G 0 lvm
sr0 11:0 1 1024M 0 rom
zram0 252:0 0 8G 0 disk [SWAP]
nvme0n1 259:0 0 119,2G 0 disk
├─nvme0n1p1 259:1 0 600M 0 part /boot/efi a6f56051-0f79-4116-9388-36ccd721f3e1
├─nvme0n1p2 259:2 0 1G 0 part /boot 7678dd36-f861-49bb-9c94-ce3524c6ae9d
└─nvme0n1p3 259:3 0 117,7G 0 part / e631d282-ac36-48b8-9f6c-41147fb4884a

Dear Vladislav,

I’ve solved the problem. My mistake was that I’ve commented the original entry on /etc/kernel/cmdline and added new entry with new UUID. When I removed the old entry end executed

sudo grub2-editenv - create
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo rm -f /boot/efi/EFI/fedora/grub.cfg 
sudo dnf -y reinstall grub2-common
sudo dracut -f --regenerate-all

everything works fine.

Thank you very much for your cooperation.

Best Regards!

Kalin