this post was submitted on 16 Dec 2025
39 points (93.3% liked)

Linux

10668 readers
344 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] hallettj@leminal.space 3 points 3 days ago* (last edited 3 days ago)

I have to dual boot for work, so every day I have to reboot into a different OS install. It's on its own drive with its own bootloader, so I can't use systemctl reboot --boot-loader-entry. But I was able get a smooth process using efibootmgr.

This is my Nushell implementation:

def boot-to [
  device: string@boot-devices # Identifier of device to boot to (e.g. 0003)
] {
  sudo efibootmgr --bootnext $device
  systemctl reboot
}

# This function exists to provide tab completion for boot-to
def boot-devices [] {
  efibootmgr | parse --regex 'Boot(?<value>\S+)\* (?<description>(?:\w+ )*\w+)'
}