Quick post, mainly for my future self…
Today I had to reinstall Windows. Because that’s what you apparently have to do with Windows, even if you barely ever use it. As always after a Windows installation, afterwards the machine directly booted into Windows. No sign of my usual grub boot menu.
So I downloaded grml, wrote it to a USB thumb drive and booted from it by selecting the device in the BIOS (or whatever the mainboard firmware is called nowadays). After some struggling with grub-install
, I found out that in the age of EFI, there is a much simpler way to get things in order again: efibootmgr
to the rescue!
Directly after the Windows re-installation, its output looked (roughly) like that:
# efibootmgr
BootCurrent: 0002
Timeout: 5 seconds
BootOrder: 0000,0003,0001,0002,0004
Boot0000* Windows Boot Manager
Boot0001* UEFI:CD/DVD Drive
Boot0002* UEFI:Removable Device
Boot0003* ubuntu
Boot0004* UEFI:Network Device
After a simple efibootmgr --bootorder 0003,0000,0001,0002,0004
I got this:
# efibootmgr
BootCurrent: 0002
Timeout: 5 seconds
BootOrder: 0003,0000,0001,0002,0004
Boot0000* Windows Boot Manager
Boot0001* UEFI:CD/DVD Drive
Boot0002* UEFI:Removable Device
Boot0003* ubuntu
Boot0004* UEFI:Network Device
And tadaa, once I rebooted grub greeted me (with its Windows entry down the bottom, and the Linux entry pre-selected as it should be).