Aha, I followed the instructions and put it where it said to prior. I guess that’s why it didn’t work.
OK, during my lunch break, I took a few minutes to follow your suggestion to put the generic grub.cfg into /boot/loader/grub.cfg (loader links to loader.0 here, of course) and it didn’t work.
I do get a grub menu, but it’s not useful, as the only entry is for UEFI settings:
It’s better than grub> at least. Still not really useful for booting (except into UEFI).
Is there anything else I should try?
I do have access to other unaffected machines running Silverblue. However, all the grub.cfg files in boot have sections custom to the kernels installed, not generic like this one. I’m not sure if there’s something specific this grub.cfg is looking for that might not be on these systems with custom ostree entries.
I could also install Fedora 41 Silverblue directly in a VM, in case that would be useful to copy files from as well.
Looks like I did not linked you the correct config but the one for /boot/EFI/fedora/grub.cfg.
You should be able to take the config from an F40 installation and replace the UUID with the one for your system and use that. I’ll try to copy one here as well.
If you take the one from F41, you will have to add the /boot/grub2/bootuuid.cfg file as well and update the UUID there. It’s the UUID of the boot partition.
Oh, I still have the one in /boot/EFI/fedora/grub.cfg
I’ve already tried a config from a working system. It doesn’t work of course, as it has differing deployments. I tried writing one by hand using the same patter with other deployments, but I get errors that grub can’t find things.
I finished work for the day a little bit ago, tried a bunch of different config options with UUIDs from blkid. That did not work, so I backed up what I have already and tried a chroot with filesystems mounted, including dev and pts and everything, but grub2-mkconfig cannot find /.
Sorry for the confusing instructions. Please keep everything from /boot/EFI as it is right now.
Then write the following to /boot/grub2/grub.cfg:
# This file is copied from https://github.com/coreos/coreos-assembler/blob/main/src/grub.cfg
# Changes:
# - Dropped Ignition glue, that can be injected into platform.cfg
# petitboot doesn't support -e and doesn't support an empty path part
if [ -d (md/md-boot)/grub2 ]; then
# fcct currently creates /boot RAID with superblock 1.0, which allows
# component partitions to be read directly as filesystems. This is
# necessary because transposefs doesn't yet rerun grub2-install on BIOS,
# so GRUB still expects /boot to be a partition on the first disk.
#
# There are two consequences:
# 1. On BIOS and UEFI, the search command might pick an individual RAID
# component, but we want it to use the full RAID in case there are bad
# sectors etc. The undocumented --hint option is supposed to support
# this sort of override, but it doesn't seem to work, so we set $boot
# directly.
# 2. On BIOS, the "normal" module has already been loaded from an
# individual RAID component, and $prefix still points there. We want
# future module loads to come from the RAID, so we reset $prefix.
# (On UEFI, the stub grub.cfg has already set $prefix properly.)
set boot=md/md-boot
set prefix=($boot)/grub2
else
if [ -f ${config_directory}/bootuuid.cfg ]; then
source ${config_directory}/bootuuid.cfg
fi
if [ -n "${BOOT_UUID}" ]; then
search --fs-uuid "${BOOT_UUID}" --set boot --no-floppy
else
search --label boot --set boot --no-floppy
fi
fi
set root=$boot
if [ -f ${config_directory}/grubenv ]; then
load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
load_env
fi
if [ -f $prefix/console.cfg ]; then
# Source in any GRUB console settings if provided by the user/platform
source $prefix/console.cfg
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
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
}
# Other package code will be injected from here
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=1
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=1
fi
# Import user defined configuration
# tracker: https://github.com/coreos/fedora-coreos-tracker/issues/805
if [ -f $prefix/user.cfg ]; then
source $prefix/user.cfg
fi
blscfg
Get the UUID for your /boot partition:
$ sudo blkid | grep boot
/dev/nvme0n1p2: LABEL="boot" UUID="<COPY THIS ONE HERE>" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="..."
Add it to /boot/grub2/bootuuid.cfg:
set BOOT_UUID="<COPY THIS ONE HERE>"
My current /boot/efi/EFI/fedora/grub.cfg config for reference:
if [ -e (md/md-boot) ]; then
# The search command might pick a RAID component rather than the RAID,
# since the /boot RAID currently uses superblock 1.0. See the comment in
# the main grub.cfg.
set prefix=md/md-boot
else
if [ -f ${config_directory}/bootuuid.cfg ]; then
source ${config_directory}/bootuuid.cfg
fi
if [ -n "${BOOT_UUID}" ]; then
search --fs-uuid "${BOOT_UUID}" --set prefix --no-floppy
else
search --label boot --set prefix --no-floppy
fi
fi
if [ -d ($prefix)/grub2 ]; then
set prefix=($prefix)/grub2
configfile $prefix/grub.cfg
else
set prefix=($prefix)/boot/grub2
configfile $prefix/grub.cfg
fi
boot
@siosm: OK, first: Thank you so much! This is working now!
And a HUGE thanks for helping me out throughout this entire post. You’ve saved me so much time… I even had an rsync going to an old 4 TB spinning disk in a USB adapter… it might’ve otherwise been an all weekend thing duplicating it back and forth (with a reinstall in-between).
A few details:
Grepping for “boot” didn’t work (as it wasn’t mounted as boot when I mounted the partition in GNOME Disks on the live media), but it was easy enough to figure it out. It was, in fact, nvme0n1p2 in this case.
The grub.cfg you shared is so much cleaner and easier to follow than anything else I’ve seen. It’s actually easy to follow and it works.
On my first attempt since your latest comment, I moved the grub.cfg in the efi partition and copied yours in place. I was met with grub> for whatever reason. I went back to the live boot, moved your example out of the way and my older one back, and everything worked!
For reference, here’s what I had in /boot/efi/EFI/fedora/grub.cfg (which works, with the rest of the steps in your comment right above this one):
It looks like I was able to do an update as well! I just rebooted, and everything works! I’m now on 41.20250205.0 (2025-02-05T02:21:24Z) on a working system.