Score:1

I have two grub.cfg files

cn flag

I'm trying to dual-boot Windows 10 and Kubuntu but since I tried setting grub as my boot manager with bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi in Windows' BCDEdit, my screen is Black until I log in to Windows (no BIOS POST or Grub menu). I just found out that I have to grub.cfg files. One in /boot/grub/grub.cfg on my / Partition and one on an unnamed FAT32 boot partition under \EFI\ubuntu\grub.cfg. I don't know which on is read when booting, I don't know if I should delete. Also if I'd run update-grub would only one file update? Maybe the one I don't need?

If you know what's going on here, please help me because I don't.

Thanks in advance!

manos avatar
cn flag
Also I just noticed it changes my bootmanager to SHIMX6.EFI every time I reboot.
oldfred avatar
cn flag
Shimx64.efi is for UEFI boot, but also works if Secure Boot is off. Ubuntu has a tiny 3 line grub.cfg in ESP that using configfile to load the full grub.cfg in your install. You need both. Better to use grub to dual boot. example UEFI configfile: https://askubuntu.com/questions/1205982/how-make-external-usb-disk-bootable-for-bios-and-uefi
Score:2
cn flag

Do not delete any of this two files. In recent versions of grub-efi both files are needed.

/boot/efi/EFI/ubuntu/grub.cfg is created during bootloader-installation and will be overwritten with grub-install. The file contains only a few lines which tell grub where to find further configuration files.

/boot/grub/grub.cfg is this further configuration file. It contains detailed configuration about grub's behaviour (menu, timeout, etc) and the menuentries (including submenus). This is the file which will be updated (overwritten) by update-grub.

shimx64.efi is needed when you have secure boot enabled in your firmware settings, you may try to disable secure boot and see if things work as expected then.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.