Problems with Booting Fedora 34 Workstation, Need Help

  • After the previous thread, i have figured a lot more about my problem, and i will be explaining it here.

  • Anyways you can have a look at the previous thread, where due to the help of @chder we were able to come to a temporary solution - a long list of commands that are needed to be entered to boot from grub.
    here is the link-
    Previous Issue

  • What has happened:
    When i power my computer on, i am not able to login to gnome, instead i enter into grub prompt in non-rescue mode. I have fixed all my grub files and configs. i am able to update grub using this command without any errors.

[root@rog boot] # sudo grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done

Previously this same command gave errors, but now that is fixed.

  • Solution i am looking for:
    I want to power on my laptop and directly log into gnome and start using fedora.

  • The temporary fix:

cat (hd0,gpt2)/loader/entries/479afd57268e4010b591172be25e052a-5.13.16-200.fc34.x86_64.conf
load_video
set gfxpayload=keep
insmod gzio
linux (hd0,gpt2)/vmlinuz-5.13.16-200.fc34.x86_64 root=UUID=9d621c3a-4bb5-442c-8998-e9c91435d173 ro rootflags=subvol=root rd.luks.uuid=luks-ea641c51-81b9-444e-be62-64d75913ac19 quiet
initrd (hd0,gpt2)/initramfs-5.13.16-200.fc34.x86_64.img
boot

i have to type all these commands whenever i power on my computer.
i want to skip this and directly boot into fedora dektop.
i want to see the fedora splash screen that asks user to enter encrypted drive password.

  • Here is all the information you will need about my system: (i will update this if you need some additional information and quote it as reply to you)
    β†’ i use encrypted nvme btrfs as main OS drive
    β†’ i have a nvidia card and use proprietary drivers
    β†’ i use UEFI to boot, secure boot disabled
    β†’ output of uname -a
[root@rog boot] # uname -a
Linux rog 5.13.16-200.fc34.x86_64 #1 SMP Wed Sep 8 15:51:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • β†’ output of ls in grub, details of my partitions
    (proc) - don’t know what it is. Contains luks_script
    (hd0) - nvme SSD disk where fedora is installed
    (hd0,gpt1) - fat boot partition efi grub folders inside it
    (hd0,gpt2) - has vmlinuz and intramfs for various kernel versions.
    (hd0, gpt3) - encrypted btrfs partition
    ->tree of boot partition
[root@rog boot] # pwd && tree ./ -afqQpshDtC
/boot
"."
β”œβ”€β”€ [drwx------  4.0K Jan  1  1970]  "./efi"
β”‚   β”œβ”€β”€ [-rwx------    34 Jan 27  2021]  "./efi/mach_kernel"
β”‚   β”œβ”€β”€ [drwx------  4.0K Apr 23 12:28]  "./efi/System"
β”‚   β”‚   └── [drwx------  4.0K Apr 23 12:28]  "./efi/System/Library"
β”‚   β”‚       └── [drwx------  4.0K Apr 23 12:28]  "./efi/System/Library/CoreServices"
β”‚   β”‚           └── [-rwx------   384 Jan 27  2021]  "./efi/System/Library/CoreServices/SystemVersion.plist"
β”‚   β”œβ”€β”€ [drwx------  4.0K Sep 14 09:24]  "./efi/EFI"
β”‚   β”‚   β”œβ”€β”€ [drwx------  4.0K Sep 14 09:24]  "./efi/EFI/EFI"
β”‚   β”‚   β”‚   β”œβ”€β”€ [drwx------  4.0K Sep 14 09:24]  "./efi/EFI/EFI/BOOT"
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ [-rwx------  907K Apr 21 12:21]  "./efi/EFI/EFI/BOOT/BOOTX64.EFI"
β”‚   β”‚   β”‚   β”‚   └── [-rwx------   85K Apr 21 12:21]  "./efi/EFI/EFI/BOOT/fbx64.efi"
β”‚   β”‚   β”‚   └── [drwx------  4.0K Sep 14 09:24]  "./efi/EFI/EFI/fedora"
β”‚   β”‚   β”‚       β”œβ”€β”€ [-rwx------   110 Apr 21 12:21]  "./efi/EFI/EFI/fedora/BOOTX64.CSV"
β”‚   β”‚   β”‚       β”œβ”€β”€ [-rwx------  830K Apr 21 12:21]  "./efi/EFI/EFI/fedora/mmx64.efi"
β”‚   β”‚   β”‚       β”œβ”€β”€ [-rwx------  907K Apr 21 12:21]  "./efi/EFI/EFI/fedora/shim.efi"
β”‚   β”‚   β”‚       β”œβ”€β”€ [-rwx------  907K Apr 21 12:21]  "./efi/EFI/EFI/fedora/shimx64.efi"
β”‚   β”‚   β”‚       β”œβ”€β”€ [drwx------  4.0K Jun 15 17:11]  "./efi/EFI/EFI/fedora/fonts"
β”‚   β”‚   β”‚       β”œβ”€β”€ [-rwx------  2.4M Jun 15 17:11]  "./efi/EFI/EFI/fedora/grubx64.efi"
β”‚   β”‚   β”‚       └── [-rwx------  1.5M Jun 15 17:11]  "./efi/EFI/EFI/fedora/grubia32.efi"
β”‚   β”‚   β”œβ”€β”€ [drwx------  4.0K Sep 15 08:58]  "./efi/EFI/BOOT"
β”‚   β”‚   β”‚   β”œβ”€β”€ [-rwx------  723K Apr 21 12:21]  "./efi/EFI/BOOT/BOOTIA32.EFI"
β”‚   β”‚   β”‚   β”œβ”€β”€ [-rwx------   67K Apr 21 12:21]  "./efi/EFI/BOOT/fbia32.efi"
β”‚   β”‚   β”‚   β”œβ”€β”€ [-rwx------  907K Apr 21 16:21]  "./efi/EFI/BOOT/BOOTX64.EFI"
β”‚   β”‚   β”‚   └── [-rwx------   85K Apr 21 16:21]  "./efi/EFI/BOOT/fbx64.efi"
β”‚   β”‚   └── [drwx------  4.0K Sep 15 08:58]  "./efi/EFI/fedora"
β”‚   β”‚       β”œβ”€β”€ [-rwx------   112 Apr 21 12:21]  "./efi/EFI/fedora/BOOTIA32.CSV"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  660K Apr 21 12:21]  "./efi/EFI/fedora/mmia32.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  723K Apr 21 12:21]  "./efi/EFI/fedora/shimia32.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------   110 Apr 21 16:21]  "./efi/EFI/fedora/BOOTX64.CSV"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  830K Apr 21 16:21]  "./efi/EFI/fedora/mmx64.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  907K Apr 21 16:21]  "./efi/EFI/fedora/shim.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  907K Apr 21 16:21]  "./efi/EFI/fedora/shimx64.efi"
β”‚   β”‚       β”œβ”€β”€ [drwx------  4.0K Jun 15 21:11]  "./efi/EFI/fedora/fonts"
β”‚   β”‚       β”‚   └── [-rwx------  2.4M Jun 15 21:11]  "./efi/EFI/fedora/fonts/unicode.pf2"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  2.4M Jun 15 21:11]  "./efi/EFI/fedora/gcdx64.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  2.4M Jun 15 21:11]  "./efi/EFI/fedora/grubx64.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  1.5M Jun 15 21:11]  "./efi/EFI/fedora/gcdia32.efi"
β”‚   β”‚       β”œβ”€β”€ [-rwx------  1.5M Jun 15 21:11]  "./efi/EFI/fedora/grubia32.efi"
β”‚   β”‚       └── [-rwx------  6.2K Sep 14 09:25]  "./efi/EFI/fedora/grub.cfg"
β”‚   β”œβ”€β”€ [drwx------  4.0K Sep 14 09:24]  "./efi/loader"
β”‚   β”‚   └── [drwx------  4.0K Jun 15 17:11]  "./efi/loader/entries"
β”‚   └── [drwx------  4.0K Sep 14 09:26]  "./efi/grub2"
β”‚       β”œβ”€β”€ [-rwx------  1.0K Jun 15 17:11]  "./efi/grub2/grubenv"
β”‚       └── [-rwx------  6.2K Sep 14 18:55]  "./efi/grub2/grub.cfg"
β”œβ”€β”€ [-rw-r--r--  152K Jan 27  2021]  "./elf-memtest86+-5.31"
β”œβ”€β”€ [-rw-r--r--  150K Jan 27  2021]  "./memtest86+-5.31"
β”œβ”€β”€ [drwxr-xr-x  4.0K Apr 23 16:26]  "./extlinux"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.6K Jan 29  2021]  "./extlinux/cat.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   25K Jan 29  2021]  "./extlinux/chain.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.2K Jan 29  2021]  "./extlinux/cmd.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.6K Jan 29  2021]  "./extlinux/cmenu.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.5K Jan 29  2021]  "./extlinux/config.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.2K Jan 29  2021]  "./extlinux/cptime.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.4K Jan 29  2021]  "./extlinux/cpu.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.7K Jan 29  2021]  "./extlinux/cpuid.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.7K Jan 29  2021]  "./extlinux/cpuidtest.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.6K Jan 29  2021]  "./extlinux/debug.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.0K Jan 29  2021]  "./extlinux/dhcp.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.9K Jan 29  2021]  "./extlinux/dir.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.0K Jan 29  2021]  "./extlinux/disk.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  8.5K Jan 29  2021]  "./extlinux/dmi.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   12K Jan 29  2021]  "./extlinux/dmitest.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.2K Jan 29  2021]  "./extlinux/elf.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.7K Jan 29  2021]  "./extlinux/ethersel.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   10K Jan 29  2021]  "./extlinux/gfxboot.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.6K Jan 29  2021]  "./extlinux/gpxecmd.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  163K Jan 29  2021]  "./extlinux/hdt.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.6K Jan 29  2021]  "./extlinux/hexdump.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.8K Jan 29  2021]  "./extlinux/host.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.8K Jan 29  2021]  "./extlinux/ifcpu64.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.1K Jan 29  2021]  "./extlinux/ifcpu.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.2K Jan 29  2021]  "./extlinux/ifmemdsk.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.9K Jan 29  2021]  "./extlinux/ifplop.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.6K Jan 29  2021]  "./extlinux/kbdmap.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.8K Jan 29  2021]  "./extlinux/kontron_wdt.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  113K Jan 29  2021]  "./extlinux/ldlinux.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  5.0K Jan 29  2021]  "./extlinux/lfs.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  175K Jan 29  2021]  "./extlinux/libcom32.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   66K Jan 29  2021]  "./extlinux/libgpl.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  100K Jan 29  2021]  "./extlinux/liblua.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   23K Jan 29  2021]  "./extlinux/libmenu.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   23K Jan 29  2021]  "./extlinux/libutil.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  4.6K Jan 29  2021]  "./extlinux/linux.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.9K Jan 29  2021]  "./extlinux/ls.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  6.8K Jan 29  2021]  "./extlinux/lua.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   11K Jan 29  2021]  "./extlinux/mboot.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   25K Jan 29  2021]  "./extlinux/memdisk"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.4K Jan 29  2021]  "./extlinux/meminfo.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   26K Jan 29  2021]  "./extlinux/menu.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.3K Jan 29  2021]  "./extlinux/pci.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.4K Jan 29  2021]  "./extlinux/pcitest.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.0K Jan 29  2021]  "./extlinux/pmload.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.6K Jan 29  2021]  "./extlinux/poweroff.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.1K Jan 29  2021]  "./extlinux/prdhcp.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.5K Jan 29  2021]  "./extlinux/pwd.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   12K Jan 29  2021]  "./extlinux/pxechn.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.4K Jan 29  2021]  "./extlinux/reboot.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   14K Jan 29  2021]  "./extlinux/rosh.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.6K Jan 29  2021]  "./extlinux/sanboot.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  3.0K Jan 29  2021]  "./extlinux/sdi.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   14K Jan 29  2021]  "./extlinux/sysdump.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  8.7K Jan 29  2021]  "./extlinux/syslinux.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.9K Jan 29  2021]  "./extlinux/vesa.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.2K Jan 29  2021]  "./extlinux/vesainfo.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--   26K Jan 29  2021]  "./extlinux/vesamenu.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  1.8K Jan 29  2021]  "./extlinux/vpdtest.c32"
β”‚   β”œβ”€β”€ [-rw-r--r--  2.5K Jan 29  2021]  "./extlinux/whichsys.c32"
β”‚   └── [-rw-r--r--  3.5K Jan 29  2021]  "./extlinux/zzjson.c32"
β”œβ”€β”€ [drwx------   16K Aug 17 17:02]  "./lost+found"
β”œβ”€β”€ [drwxr-xr-x  4.0K Aug 17 17:04]  "./loader"
β”‚   └── [drwx------  4.0K Sep 19 14:50]  "./loader/entries"
β”‚       β”œβ”€β”€ [-rw-r--r--   575 Sep 19 14:50]  "./loader/entries/479afd57268e4010b591172be25e052a-0-rescue.conf"
β”‚       β”œβ”€β”€ [-rw-r--r--   503 Sep 19 14:50]  "./loader/entries/479afd57268e4010b591172be25e052a-5.13.14-200.fc34.x86_64.conf"
β”‚       β”œβ”€β”€ [-rw-r--r--   503 Sep 19 14:50]  "./loader/entries/479afd57268e4010b591172be25e052a-5.13.15-200.fc34.x86_64.conf"
β”‚       └── [-rw-r--r--   503 Sep 19 14:50]  "./loader/entries/479afd57268e4010b591172be25e052a-5.13.16-200.fc34.x86_64.conf"
β”œβ”€β”€ [-rwxr-xr-x   10M Aug 17 17:05]  "./vmlinuz-0-rescue-479afd57268e4010b591172be25e052a"
β”œβ”€β”€ [-rw-------   81M Aug 17 17:05]  "./initramfs-0-rescue-479afd57268e4010b591172be25e052a.img"
β”œβ”€β”€ [-rw-r--r--   168 Sep  3 21:26]  "./.vmlinuz-5.13.14-200.fc34.x86_64.hmac"
β”œβ”€β”€ [-rw-------  5.5M Sep  3 21:28]  "./System.map-5.13.14-200.fc34.x86_64"
β”œβ”€β”€ [-rw-r--r--  229K Sep  3 21:28]  "./config-5.13.14-200.fc34.x86_64"
β”œβ”€β”€ [-rwxr-xr-x   10M Sep  3 21:28]  "./vmlinuz-5.13.14-200.fc34.x86_64"
β”œβ”€β”€ [-rw-r--r--   168 Sep  8 21:49]  "./.vmlinuz-5.13.15-200.fc34.x86_64.hmac"
β”œβ”€β”€ [-rw-------  5.5M Sep  8 21:51]  "./System.map-5.13.15-200.fc34.x86_64"
β”œβ”€β”€ [-rw-r--r--  229K Sep  8 21:52]  "./config-5.13.15-200.fc34.x86_64"
β”œβ”€β”€ [-rwxr-xr-x   10M Sep  8 21:52]  "./vmlinuz-5.13.15-200.fc34.x86_64"
β”œβ”€β”€ [-rw-r--r--   168 Sep 13 18:23]  "./.vmlinuz-5.13.16-200.fc34.x86_64.hmac"
β”œβ”€β”€ [-rw-r--r--  229K Sep 13 18:25]  "./config-5.13.16-200.fc34.x86_64"
β”œβ”€β”€ [-rw-------  5.5M Sep 13 18:25]  "./System.map-5.13.16-200.fc34.x86_64"
β”œβ”€β”€ [-rwxr-xr-x   10M Sep 13 18:25]  "./vmlinuz-5.13.16-200.fc34.x86_64"
β”œβ”€β”€ [-rw-------   35M Sep 14 23:15]  "./initramfs-5.13.14-200.fc34.x86_64.img"
β”œβ”€β”€ [-rw-------   35M Sep 15 08:53]  "./initramfs-5.13.15-200.fc34.x86_64.img"
β”œβ”€β”€ [drwx------  4.0K Sep 19 14:43]  "./grub2"
β”‚   β”œβ”€β”€ [-rw-r--r--  6.3K Sep 15 08:54]  "./grub2/grub.cfg-breakingit"
β”‚   β”œβ”€β”€ [-rw-------  1.0K Sep 19 14:48]  "./grub2/grubenv"
β”‚   └── [-rw-r--r--  6.3K Sep 19 14:50]  "./grub2/grub.cfg"
└── [-rw-------   35M Sep 19 14:48]  "./initramfs-5.13.16-200.fc34.x86_64.img"
  • β†’ here is my /etc/default/grub
[root@rog boot] # cat /etc/default/grub
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.luks.uuid=luks-ea641c51-81b9-444e-be62-64d75913ac19 rhgb quiet nvidia-drm.modeset=0 processor.ignore_ppc=1 nowatchdog"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
  • β†’ here is my grub.cfg in /boot/grub2/ (i never edited this file)
[root@rog grub2] # cat grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=0
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/08_fallback_counting ###
insmod increment
# Check if boot_counter exists and boot_success=0 to activate this behaviour.
if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then
  # if countdown has ended, choose to boot rollback deployment,
  # i.e. default=1 on OSTree-based systems.
  if  [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then
    set default=1
    set boot_counter=-1
  # otherwise decrement boot_counter
  else
    decrement boot_counter
  fi
  save_env boot_counter
fi
### END /etc/grub.d/08_fallback_counting ###

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 14ec6ee4-684a-43bd-a9d9-ca7f737b44dd
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=boot E671-91AD

# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
#
# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
# populates the boot menu. Please refer to the Boot Loader Specification documentation
# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.

# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
# entries populated from BootLoaderSpec files that use this variable work correctly even
# without a grubenv file, define a fallback kernelopts variable if this has not been set.
#
# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=9d621c3a-4bb5-442c-8998-e9c91435d173 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.luks.uuid=luks-ea641c51-81b9-444e-be62-64d75913ac19 rhgb quiet nvidia-drm.modeset=0 processor.ignore_ppc=1 nowatchdog "
fi

insmod blscfg
blscfg
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_reset_boot_success ###
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set menu_hide_ok=1
else
  set menu_hide_ok=0
fi
# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more than once
elif [ "${boot_indeterminate}" = "1" ]; then
  set boot_indeterminate=2
fi
# Reset boot_success for current boot
set boot_success=0
save_env boot_success boot_indeterminate
### END /etc/grub.d/10_reset_boot_success ###

### BEGIN /etc/grub.d/12_menu_auto_hide ###
if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; then
[root@rog boot] # pwd ; cat ./grub2/grub.cfg
/boot
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=0
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/08_fallback_counting ###
insmod increment
# Check if boot_counter exists and boot_success=0 to activate this behaviour.
if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then
  # if countdown has ended, choose to boot rollback deployment,
  # i.e. default=1 on OSTree-based systems.
  if  [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then
    set default=1
    set boot_counter=-1
  # otherwise decrement boot_counter
  else
    decrement boot_counter
  fi
  save_env boot_counter
fi
### END /etc/grub.d/08_fallback_counting ###

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 14ec6ee4-684a-43bd-a9d9-ca7f737b44dd
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=boot E671-91AD

# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
#
# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
# populates the boot menu. Please refer to the Boot Loader Specification documentation
# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.

# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
# entries populated from BootLoaderSpec files that use this variable work correctly even
# without a grubenv file, define a fallback kernelopts variable if this has not been set.
#
# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=9d621c3a-4bb5-442c-8998-e9c91435d173 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.luks.uuid=luks-ea641c51-81b9-444e-be62-64d75913ac19 rhgb quiet nvidia-drm.modeset=0 processor.ignore_ppc=1 nowatchdog "
fi

insmod blscfg
blscfg
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_reset_boot_success ###
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set menu_hide_ok=1
else
  set menu_hide_ok=0
fi
# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more than once
elif [ "${boot_indeterminate}" = "1" ]; then
  set boot_indeterminate=2
fi
# Reset boot_success for current boot
set boot_success=0
save_env boot_success boot_indeterminate
### END /etc/grub.d/10_reset_boot_success ###

### BEGIN /etc/grub.d/12_menu_auto_hide ###
if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; then
    set orig_timeout_style=${timeout_style}
    set orig_timeout=${timeout}
    if [ "${fastboot}" = "1" ]; then
      # timeout_style=menu + timeout=0 avoids the countdown code keypress check
      set timeout_style=menu
      set timeout=0
    else
      set timeout_style=hidden
      set timeout=1
    fi
  fi
fi
### END /etc/grub.d/12_menu_auto_hide ###

### BEGIN /etc/grub.d/14_menu_show_once ###
if [ x$feature_timeout_style = xy ]; then
  if [ "${menu_show_once_timeout}" ]; then
    set timeout_style=menu
    set timeout="${menu_show_once_timeout}"
    unset menu_show_once_timeout
    save_env menu_show_once_timeout
  fi
fi
### END /etc/grub.d/14_menu_show_once ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
  • β†’ output of some helpful commands
[root@rog boot] # ls -al /etc/grub2-efi.cfg
lrwxrwxrwx. 1 root root 22 Jun 15 21:11 /etc/grub2-efi.cfg -> ../boot/grub2/grub.cfg
[root@rog boot] # ls -al /boot/grub2/grub.cfg
-rw-r--r--. 1 root root 6466 Sep 19 14:50 /boot/grub2/grub.cfg
[root@rog boot] # ls -al /etc/grub*cfg
lrwxrwxrwx. 1 root root 22 Jun 15 21:11 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
lrwxrwxrwx. 1 root root 22 Jun 15 21:11 /etc/grub2-efi.cfg -> ../boot/grub2/grub.cfg
[root@rog boot] # ls -al /boot/efi/EFI/fedora/grub.cfg /boot/grub2/grub.cfg /etc/grub*cfg
-rwx------. 1 root root 6352 Sep 14 09:25 /boot/efi/EFI/fedora/grub.cfg
-rw-r--r--. 1 root root 6466 Sep 19 14:50 /boot/grub2/grub.cfg
lrwxrwxrwx. 1 root root   22 Jun 15 21:11 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
lrwxrwxrwx. 1 root root   22 Jun 15 21:11 /etc/grub2-efi.cfg -> ../boot/grub2/grub.cfg
[root@rog boot] # grep boot /proc/mounts
/dev/nvme0n1p2 /boot ext4 rw,seclabel,relatime 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro 0 0
[root@rog boot] # efibootmgr -v
BootCurrent: 0011
Timeout: 1 seconds
BootOrder: 0011,0010,0000,0000,0000,0000,0000,0006,0004,0000,0000,0000,0000,0007,0008,0002,0003,0009,0005,0001,000B
Boot0000* Windows Boot Manager	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0001* WINDOWS-10	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* Pop!_OS 20.10	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0003* Pop!_OS 20.10	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0004* Garuda	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* Pop!_OS 20.10	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0006* Manjaro	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0007* Pop!_OS 20.10	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0008* Pop!_OS 20.10	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0009* ubuntu	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot000B  Fedora	HD(1,GPT,59ed68c9-7409-4a30-a393-33655a13fc61,0x800,0x12c000)/File(\EFI\FEDORA\SHIM.EFI)..BO
Boot0010* Fedora	HD(1,GPT,59ed68c9-7409-4a30-a393-33655a13fc61,0x800,0x12c000)/File(\EFI\FEDORA\SHIM.EFI)..BO
Boot0011* Fedora	HD(1,GPT,59ed68c9-7409-4a30-a393-33655a13fc61,0x800,0x12c000)/File(\EFI\FEDORA\SHIMX64.EFI)

Please help me solve this problem and feel free to ask for more information about the problem if you need.

What should I do now?
Should I format my boot partition and use chroot to make the new boot partition
Or should I reinstall grub
Or have I ran out of options and I have to reinstall Fedora?
Please suggest

Can somebody reply? I really need help.

Edit: please tell me if there is any other forum or subreddit which could help me. I really want to fix this issue permanently.

Thanks

This looks incorrect to me:

$ sudo grub2-mkconfig -o /etc/grub2.cfg

I do not believe Fedora puts the GRUB config files in /etc. I can’t find them there:

$ sudo su -
[sudo] password for user:
# find /etc -name 'grub*.cfg'
#

The GRUB config files are located at /boot. Here is from a non-EFI F34 system:

$ sudo su -
[sudo] password for user:
# find /boot -iname '*.cfg'
/boot/grub2/grub.cfg

So you should use something like this, from the output of find:

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

My thinking is, /boot is special. It is mounted first (or it used to be, iirc). If you put your grub.cfg on /etc, the drive may not be mounted yet. So GRUB will load but won’t be able to read its config file on /etc.

I would also delete /etc/grub.cfg.

If possible, I would also try to run dnf reinstall kernel kernel-core.

I have no idea about your other issues, like an encrypted drive. I don’t use encrypted drives in my test lab.


Here’s from another F34 machine I have that uses EFI:

$ sudo su -
[sudo] password for user:
# find /boot -name '*.cfg'
/boot/grub2/grub.cfg
/boot/efi/EFI/fedora/grub.cfg
# ls -Al /boot/grub2/grub.cfg
-rwx------. 1 root root 6379 May  4  2020 /boot/grub2/grub.cfg
# ls -al /boot/efi/EFI/fedora/grub.cfg
-rwx------. 1 root root 148 Apr 30 15:40 /boot/efi/EFI/fedora/grub.cfg

And:

# cat /boot/efi/EFI/fedora/grub.cfg
search --no-floppy --fs-uuid --set=dev fb320100-54cf-4f74-a778-2a0b9780c1de
set prefix=($dev)/boot/grub2
export $prefix
configfile $prefix/grub.cfg

One thing to keep in mind is, my machines are not a fresh install. The non-EFI system is about 8 years old. It has been upgraded repeatedly using DNF System Upgrade. The EFI system is about 3 years old. It also has been through about 6 DNF System Upgrades.

The output of efibootmgr shows multiple duplicates that may be interfering.
duplicates listed are
000B & 0010
0002 & 0003 & 0005 & 0007 & 0008

You probably should use efibootmgr to delete the duplicates.

IIRC you actually could delete all the entries there then reboot and it should rebuild the list correctly.

Your comment about the location of grub.cfg is spot on.
There are 2 links in /etc (/etc/grub2.cfg and /etc/grub2-efi.cfg) that both point to /boot/grub2/grub.cfg.
Fedora 34 changed from Fedora 33 and earlier to be more consistent with other linux distros and now does not put the main grub.cfg file for efi boot in /boot/efi/EFI/fedora but instead puts it, as noted above, for both legacy and efi boot in /boot/grub2.

1 Like

Hi I am having the same issue. I’ve narrowed it down to a TPM issue in Grub but my BIOS doesn’t support turning it off. I was trying to use the fed 34 Cinn spin version. I will post my won thread if that is needed or wanted. I can boot to the grub shell and rmmod tpm and then load the linux image and initrd image and can boot to a emergency shell and I’m stuck. Laptop is an ASUS Q524UQK.