The Dual-Boot Friction
I triple-boot the Capella-Outpost workstation: Argo OS (daily driver, Gentoo-based), EndeavourOS (testing ground), and Windows 10 (because my daughter needs Roblox, and I occasionally need something that won’t run under Wine without three days of incantations).
The Argo OS partition is where real work happens. EndeavourOS is the “let me try this kernel flag before I bake it into Gentoo” sandbox. Windows exists because a teenager lives in this house and she has zero interest in learning why emerge --sync takes so long. Fair enough.
The problem is switching between them. Rebooting to Windows is a six-step chore:
- Click Restart.
- Wait for BIOS POST.
- Mash the arrow keys to stop the GRUB countdown.
- Select Windows.
- Press Enter.
- Wait again.
Sounds fine on paper. In practice, step 3 is where everything falls apart.
My GRUB timeout is set to 5 seconds. That’s plenty of time if you’re sitting there staring at the monitor. But I’m not. I click “Reboot,” stand up, go pour coffee, come back 45 seconds later, and Argo OS is sitting at the login screen. Because of course it is. GRUB counted down, nobody pressed anything, and it booted the default.
This happened three times in one evening. I rebooted, went to tell my daughter “Windows is coming up,” walked back, and… Argo OS login screen. Rebooted again. Went to grab my coffee mug from the other room. Came back. Argo OS. Third time, I stood there like a hostage, watching the GRUB menu count down, and pressed the arrow key at 2 seconds. Dignity: gone.
I wanted a “Reboot to Windows” button on my Linux desktop. Click it, walk away, come back to Windows.
The Tool: grub2-reboot
GRUB supports a “boot once” variable. You can tell it: “Next time you boot, pick Entry #2. After that, go back to default.”
The command is simple:
sudo grub2-reboot "Windows 10 (on /dev/nvme0n1p1)"
sudo reboot
But I don’t want to type that every time.
The Problem: Finding the Name
The string "Windows 10 (on /dev/nvme0n1p1)" isn’t a guess. It has to match exactly what is in your grub.cfg. One wrong space, one missing parenthesis, and GRUB shrugs and boots the default. Ask me how I know.
To find the exact name, run this:
sudo grep "menuentry " /boot/grub2/grub.cfg | cut -d "'" -f 2
Or on some systems (like UEFI Fedora):
sudo grep "menuentry " /boot/efi/EFI/fedora/grub.cfg | cut -d "'" -f 2
You will get a list like:
Fedora Linux (6.8.9-200.fc40.x86_64) 40 (Workstation Edition)Windows 10 (on /dev/nvme0n1p1)EndeavourOS Linux (on /dev/sda1)
Copy that string exactly.
The Journey: grub2-reboot vs efibootmgr
grub2-reboot works. I used it for months. But it has a quirk that bugged me: it still goes through GRUB. The machine reboots, GRUB loads, reads the “boot once” variable, and then chainloads Windows. You still see the GRUB screen flash for a moment.
Then I discovered efibootmgr. On UEFI systems, the firmware itself maintains a boot order. You can talk to it directly --- skip GRUB entirely for the next boot.
# List your UEFI boot entries
efibootmgr -v
This spits out something like:
Boot0000* Argo OS (Gentoo)
Boot0001* Windows Boot Manager
Boot0002* EndeavourOS
Now you can set the next boot directly at the firmware level:
sudo efibootmgr --bootnext 0001
sudo reboot
The machine doesn’t even touch GRUB. It goes straight to the Windows bootloader. Faster, cleaner, and no more GRUB screen flash. After the one-time boot, the firmware reverts to the default order automatically.
I eventually switched all my shortcuts to efibootmgr. The grub2-reboot method is still valid (and works on BIOS systems too), but if you’re on UEFI, talking directly to the firmware feels right.
Creating the Shortcuts
We can create standard Linux .desktop entries. These appear in your Application Menu (GNOME, KDE, Rofi, whatever launcher you’re running).
~/.local/share/applications/reboot-windows.desktop:
[Desktop Entry]
Name=Reboot to Windows 10
Comment=Restart computer directly into Windows
Exec=pkexec sh -c 'efibootmgr --bootnext 0001 && reboot'
Icon=system-reboot
Terminal=false
Type=Application
Categories=System;
Key components:
pkexec: This triggers the GUI password prompt. We need root privileges to write to the EFI variables.- The Logic: It sets the “Next Boot” variable first. If that succeeds (
&&), then it triggers the reboot. No partial state.
Polkit: Killing the Password Prompt
That pkexec password prompt started to annoy me. I’m already logged in. I’m the only user on this machine. Asking me for my password to reboot my own computer feels like the OS doesn’t trust me.
Polkit lets you define rules for exactly this. I created a rule that allows my user to run efibootmgr and reboot without a password prompt:
/etc/polkit-1/rules.d/85-reboot-os.rules:
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec" &&
subject.user == "commander" &&
action.lookup("command") &&
(action.lookup("command").indexOf("efibootmgr") >= 0 ||
action.lookup("command").indexOf("reboot") >= 0)) {
return polkit.Result.YES;
}
});
Now the flow is: click the icon, confirmation dialog pops up (see below), click “Yes,” walk away. No password. Capella-Outpost reboots into Windows, and by the time I’ve refilled my coffee, my daughter is already logging into Roblox.
Adding Safety Rails (Zenity)
Accidentally clicking a “Reboot to Windows” button is annoying. It just… reboots. No warning. Especially dangerous when you’re mid-compile on a Gentoo package that’s been building for 40 minutes.
I added a confirmation dialog using zenity (a tool to display GTK dialogs from scripts):
#!/bin/bash
if zenity --question \
--title="Reboot to Windows" \
--text="Are you sure you want to reboot into Windows 10?" \
--default-cancel; then
pkexec sh -c 'efibootmgr --bootnext 0001 && reboot'
fi
The --default-cancel flag is important. If you accidentally hit Enter, it cancels instead of rebooting. Learned that one the hard way too.
I made a matching script for EndeavourOS:
#!/bin/bash
if zenity --question \
--title="Reboot to EndeavourOS" \
--text="Reboot into EndeavourOS?" \
--default-cancel; then
pkexec sh -c 'efibootmgr --bootnext 0002 && reboot'
fi
The Icon Hunt
The hardest part --- and I’m not kidding --- was finding icons.
I pulled standard SVG icons from the internet and saved them to ~/.local/share/icons/.
For EndeavourOS, I grabbed their official logo.
For Windows, I found a generic “OS” icon. Nothing fancy. It works.
Results
Now, my application launcher (Rofi) has these options:
Reboot(Standard)Reboot to Windows 10Reboot to EndeavourOS
I type “Win”, hit enter, and walk away. When I come back with my coffee, Windows is at the login screen. No GRUB menu. No countdown. No mashing arrow keys like it’s 2004.
The whole thing is maybe 20 lines of bash and a polkit rule. Took longer to find the icons than to write the scripts. But that’s always how it goes with Linux --- the actual engineering takes 10 minutes, and the cosmetic polish takes an hour.