The Dual-Boot Friction
I triple-boot: Argo OS (Main), EndeavourOS (Testing), and Windows 10 (Gaming). Rebooting to Windows is a chore:
- Click Restart.
- Wait for BIOS POST.
- Mash the arrow keys to stop the GRUB countdown.
- Select Windows.
- Press Enter.
If I miss the countdown (because I went to get coffee), I boot back into Linux and have to start over. I wanted a “Reboot to Windows” button on my Linux desktop.
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. If you mistype a space, it won’t switch.
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.
Creating the Shortcuts
We can create standard Linux .desktop entries. These appear in your Application Menu (GNOME, KDE, Rofi, etc).
~/.local/share/applications/reboot-windows.desktop:
[Desktop Entry]
Name=Reboot to Windows 10
Comment=Restart computer directly into Windows
Exec=pkexec sh -c 'grub2-reboot "Windows 10 (on /dev/nvme0n1p1)" && 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 (grub2-rebootmodifies the BIOS NVRAM).- The Logic: It sets the “Next Boot” variable first. If that succeeds (
&&), then it triggers the reboot.
Adding Safety Rails (Zenity)
Accidentally clicking that button is annoying. It reboots you instantly.
I added a confirmation dialog using zenity (a tool to display GTK dialogs from scripts).
We wrapped it in a script:
#!/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 'grub2-reboot "Windows 10 (on /dev/nvme0n1p1)" && reboot'
fi
Now, when I click the icon, I get a nice popup asking “Are you sure?”.
The Icon Hunt
The hardest part 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.
Results
Now, my application launcher (Rofi) has these options:
Reboot(Standard)Reboot to Windows 10Reboot to EndeavourOS
I type “Win”, hit enter, type my password, and walk away.
When I come back with my coffee, Windows is at the login screen.
It feels like magic, but it’s just efibootmgr doing what it was designed to do.