Dual boot has unexpected results: Debian 11.4.0 and Fedora 36.1.5

I found a file on the internet whose contents are as follows:

menuentry 'Ubuntu or KDE Neon' --unrestricted {
        search --fs-uuid --no-floppy --set=AAEE-A568
        chainloader /EFI/ubuntu/shimx64.efi
menuentry 'Fedora' --unrestricted {
        search --fs-uuid --no-floppy --set=AAEE-A568
        chainloader /EFI/fedora/shimx64.efi
menuentry 'Windows' --unrestricted {
        search --fs-uuid --no-floppy --set=AAEE-A568
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi

It was recommended that I was to name it custom.cfg and place it in the same directory as grub.cfg.

Jeff, what do you think?

Thanks for your help.

You mean I should type the command in a Fedora terminal, yes?

Will you script run automatically every time I launch Fedora? Or do I need to type unique commands before Fedora’s GRUB menu appears on my screen?

Neither. The example was given in the context of what Jeff wrote

I seem to recall a recent discussion on this and that it may be necessary to create a custom menu entry in /etc/grub.d/40_custom to add debian to the fedora grub menu.

Se my version is the modified /etc/grub.d/40_custom. And like any other files in /etc/grub.d it will be used when running grub2-mkconfig. The example is given as an example only and should only be used as inspiration for your own solution.

Possibly if you put this into the 40_custom file and modify it as needed for debian it would work.

The UUID used for the --set in the search line is that of the efi partition in that example. I don’t know which UUID is needed since I have not tried anything like that.

I do know that (since I have seen it before) was intended to replace the default grub menu totally, but you only need to add the menuentry line for your debian system install since fedora builds the rest of the grub menu for you.

I blogged about multi booting, in case it helps


suggest that you install refind efi boot manager

refind isn’t available in the official repos, yes?

It is available from the official rEFInd download page

No, you can’t get if from any Fedora repository. And do study the documentation that comes with it before installing it.

If it works I don’t know. I will not install it on my system to try it out.

It works well and is easy to setup. I use it on several machines.

Do read the documentation. It is really important to understand uefi, but most are never exposed to it. Rod’s pages provide great background as well as covering a variety of installation scenarios.

Also consider creating a rEFInd bootable USB flash drive.

It requires me to disable Secure Boot, is that correct?


Thanks for taking the time to let me know of your work.

Your method requires me to disable Secure Boot, yes?

To be honest, disabling secure boot is the first thing I do with a new computer :wink:

Just to say that I never know what happens when secure boot is on

It is all in the extensive documentation given by Rod Smith.
Just remember that the shim only contains the certificate for one distribution. You have to onroll the certificate for the other distributions.

If you wish to use secure boot with fedora and using akmods to build your kernel modules then this is the best source I have found for how to sign the modules and enable booting with them.

Note that after doing the steps there, the currently installed modules will still not be signed because they have already been built.

The way to continue and have the signed modules available for the currently installed kernels is to

  1. sudo dnf remove kmod-nvidia
    to remove the unsigned modules.
  2. sudo dnf reinstall akmod-nvidia
    which should build and sign the new modules.
  3. wait at least 5 minutes for the modules to finish building then reboot so the newly signed modules will be loaded. During this boot, enter the bios and enable secure boot then everything should be working normally with secure boot enabled.

I plan to install Microsoft Windows 11, making it a triple boot.

Just a bit of advice.

Do not install windows in any form on a system that already has operating linux installs since it will wipe out the efi partition for linux.

If you install windows after-the-fact, you should first disconnect all the linux drives and install windows on a new drive, then recover linux after reconnecting the drives. It still will require some manipulation of grub to enable triple booting with fedora, debian, and windows.

Also worth reading is this file already on your system /usr/share/doc/akmods/README.secureboot

1 Like

My dear friend, I really appreciate it…

What did you mean by “wipe out”? The way you put it sounds so scary…

What is “after-the-fact”? Please explain.

What if I have only one drive?

I also have Windows, but with secure boot disabled

Exactly what I said. Windows install will remove an existing efi partition and create its own new efi partition, which will then necessitate an excrutiating recovery process to recover the existing linux installs.

After the fact – after you have an installed and functioning linux system then you decide “after the fact” to install windows. You are installing windows after you have already installed linux and recovery will be painful.

The normal and painless way is to install windows first then install linux to dual boot second or third or later. Linux does not destroy a windows install, but windows will most often destroy booting for a pre-existing linux install.

I have assisted a couple times in recovery with a windows install done after the linux install and it is not easy, though it is possible.

This thread is one where recovery was necessary after a windows (re)install and did succeed.