Hello,
Few days ago I updated my F41 to F42 and yesterday I decided to remove Windows from EFI partition, because I didn’t boot Windows for 2+ years. I deleted EFI/Microsoft folder and tried:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
but it looks like it’s unsupported anymore. I see error related to “composefs”. How can I regenerate grub entries now?
Please do not use grub2-mkconfig
on Atomic Desktops.
The GRUB config is now a static GRUB config, so you should be able to directly edit /boot/grub2/grub.cfg
to remove the Windows entries.
Thanks for your help.
Can someone please show me how to add my windows install, located on a separate drive, to the static grub menu. I’m using Fedota 42 Kinoite. When I upgraded from Kinoite 41, Windows did not automatically get added.
I am a relatively newbie so some more detailed instructions would be appreciated.
Thank you.
The recommended path is to not add it to the GRUB menu. Select the Windows boot entry from your EFI firmware instead.
You need to either use systemd-boot
which does this automatically (without issues; Just Works), or create a manual entry as per the UAPI Boot Loader Spec (BLS).
You can of course use the EFI firmware menu, but if that’s complicated, the 2 options I said are possible.
I was able to modify the menu by adding these lines to /boot/grub2/user.cfg, replacing the respective <MENU-UUID>
for each entry:
# Add Windows 11 Pro Menu Entry as First Menu Item
menuentry 'Windows 11 Pro' --class windows {
search --fs-uuid --no-floppy --set=root <MENU1-UUID>
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
# Add WinPE 11 Menu Entry as Second Menu Item
menuentry 'WinPE 11' --class windows {
search --fs-uuid --no-floppy --set=root <MENU2-UUID>
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
# Set Third Menu Item as Default
set default=2
Great… Thanks, finally…
BTW, /efi
succeeding (${root})
shoule be /EFI
just in case some unwanted case-sensitivity switch is misconfigured (Yes, this is a possibility with the linux vfat driver during mount, IDK GRUB).
Let me disclaim that while the BLS spec is more supported and, well, portable to systemd-boot
, you might like to still use user.cfg
for the one menuentry of windows.
This is because systemd-boot
natively supports an automatic entry if the /EFI/Microsoft/Boot/bootmgfw.efi
file exists. (Your manual entry will override that, so no actual issues if you still use BLS)
If you still want to follow the BLS like I’d like to,
$(bootctl -p)/loader/entries/windows-11.conf
:
title Windows 11 Home Pro whatever
efi /EFI/Microsoft/Boot/bootmgfw.efi
$(bootctl -p)/loader/entries/winPE-11.conf
:
title WinPE 11 or whatever
efi /EFI/Microsoft/Boot/bootmgfw.efi
# BUT this is same EFI as previous... Why is it needed IDK;
# I don't use this... just the above one
AND let GRUB do it’s own thing with the entries…
PS $(bootctl -p)
outputs /efi
or /boot/efi
whichever is in use, I assume here that shared ESP is used. (Assumption I derive from the GRUB user.cfg
using (${root})
)
$(bootctl -x)
refers to the XBOOTLDR where the misc GRUB config files, linux kernel+initrd sets etc… exist. Kindly don’t confuse yourself.
I have a small silly doubt, since I have never tinkered with GRUB configs directly… What is the menu UUID?
Sorry, <MENU-UUID>
refers to the respective partition UUIDs.
If you do “search --fs-uuid” the UUID should be the file system UUID and not the partition UUID. These are different. You can run lsblk -f -o +PARTUUID
to demonstrate the difference.
Other than that, your message no 9 should be the solution.
Yes you are correct about the UUID, my mistake.