Fedora 34: error from Grub at boot time

I installed Fedora on my laptop (XPS 15 9510) on a single drive, no windows, formatted everything, while booting I get this message from Grub super fast:

error: …/…/grub-core/commands/loadenv.c:216:sparse file not allowed

Any idea what it is and how it can be fixed/removed, thanks

1 Like

That is usually caused by /boot being on a sparse filesystem such as btrfs or some other thinly provisioned media.

You need to set grub’s save default to false.

1 Like

Boot = FAT32, Root = btrfs (default in Fedora 34), please could you explain how to set the default value to false, I just started with Fedora, so please detailed explanation will be appreciated, thank you

You made /boot fat32? Are you sure?

Can we see the output of lsblk -o name,size,type,fstype,mountpoint

Sorry, VFAT

That is your ESP that is fat32/vfat. /boot is part of your btrfs partition. I didn’t know the installer let you do that. I thought it required an ext4 /boot partition.

I don’t use grub but normally you would edit /etc/default/grub and change GRUB_SAVE_DEFAULT to false. Then run grub-mkconfig to regnerate the grub config. Since moving to BLS not everything works the same but it is worth a shot.

Unfortunately, didn’t work, if I change to ext4, would that solve the problem?

I would wait for someone else to come along who has more experience with grub before taking any extreme measures. The error message is harmless.

You should, for reliability, have the /boot/efi as it is.
You then should have /boot as ext4 and / can be btrfs as you have it.

I have heard that /boot can be btrfs as you have it but apparently that does not work. When I did a new install in a VM the auto installer created an ext4 partition for me as /boot.

Just a note. I see you have 100G for swap. That seems enormous to me, and since fedora uses zram by default for swap it is usually not needed unless you intend to hibernate. Maybe part of that could be used as ext4 for /boot (1 G would be way more than enough).

For /boot/efi vfat is good to use. This should be default.
Being curious, I created a VM do test btrfs for /boot and this seems to be working fine.

However, this is not an uefi setup, just mbr.

One thing to note, the setup partitioning process is a bit unintuitive. I created 3 btrfs volumes in order to get 3 different UUIDs.

If those volumes are not created, it creates sub volumes with a UUID that they all share.

Looks like a /boot partition with a btrfs file system should be fine.