How to setup Boot Loader for windows dual booting in Already existing Fedora?

I actually want to run Safe Exam Browser(SEB) in my computer, but currently i am running F44.

Since SEB is not supported in Linux. I am planning to duel boot windows. I had shrinked 50gb space in my existing fedora drive (for windows ) and ready with boot setup.

But the thing is, I rarely use windows, I normally want to boot to my fedora and I want to boot to windows only through manual steps like opening into UEFI or like clicking any keys repeatedy or whatever..

how to setup this kind of boot setup??

pls help guys :slight_smile:

You don’t need to change much in GRUB for this. Once Windows is installed, you can keep Fedora as your default OS and boot into Windows only when you need it.

1. Keep Fedora as the default

After installing Windows, boot into Fedora and run:

sudo efibootmgr

You’ll see entries similar to Fedora and Windows Boot Manager, each with a number like 0001 or 0000.

If Windows has changed the boot order, set Fedora first using the actual numbers from your output:

sudo efibootmgr -o 0001,0000

Replace those example numbers with yours, keeping Fedora first and Windows second. If Fedora already boots by default, you can skip this step.

2. Boot Windows only when you need it

You have two options:

  • Open your laptop’s one-time boot menu during startup and select Windows Boot Manager. The key depends on your laptop; check the manufacturer’s instructions.
  • Or, from Fedora, run:
sudo efibootmgr -n 0000
sudo reboot

Replace 0000 with the Windows Boot Manager entry number. This sets Windows for the next boot only; after that, your normal boot order remains unchanged.

One more thing: Disable Fast Startup in Windows to avoid potential issues when switching between Windows and Fedora.

That should let you use Fedora normally and boot into Windows only when you need SEB.

DON’T!
If you install windows on a system using one drive and already have linux installed it will wipe out the linux booting and recovery would be required.

It is never recommended to install windows after linux has been installed. The recommended way is to install fedora for dual boot on a system where windows is already installed.

If you very seldom use windows the simplest way would be to use libvirt with QEMU/KVM and create a virtual machine where you install windows. You then could access windows live while still having fedora running. Windows would be in the VM and fedora would be the host.

There are seldom issues when installing fedora on a system that already has windows installed, but almost 100% failure in being able to immediately boot fedora after installing windows if fedora was installed first.

Installing Windows in a VM as suggested above is the best way to go. However, if you have to install Windows after Linux then I suggest you buy a second drive. Physically remove your drive with Linux from your PC/laptop so that Windows install can’t screw it up. Then put your new drive in, install Windows on it. Then put the Linux drive back in. You may have to go into your UEFI BIOS and select which drive you want to boot.

I run Fedora from the primary drive and Windows from the secondary drive.
I installed Windows11 Pro “after” Fedora was already installed with zero issues.
With a modern UEFI BIOS the worst case scenario is that you might have to make Grub visible and Windows should be already there.
If not you can rewrite the grub config which then should automatic pick up the new Windows drive and add it to Grub.
Note that in Fedora you NEVER write to the Grub config file directly but rather edit /etc/default/grub

Also note that the only edits to /etc/default/grub should be if the user has specific needs for kernel command line options or maybe a specific grub option. Most apps that need command line options seem to add the necessary entries for the user (such as when installing the nvidia drivers from rpmfusion).

Also note that almost all kernel command line options can be managed by using the grubby command, which modifies all the appropriate entries at the same time. (/etc/default/grub, /etc/kernel/cmdline, and the *.conf files under /boot/loader/entries/, among others)