Score:0

Command to reboot headless Ubuntu Server 20.04 and boot from pxe or USB once?

co flag

Is it possible to issue a reboot command in Ubuntu Server that triggers boot from USB or PXE after reboot? Basically it's a headless system and I would like to run a backup tool without having to hookup a screen/keyboard to it. When the backup tool loaded I can SSH into it and run the backup remotely, then reboot and boot Ubuntu again.

Since Mac and Windows allows to choose the boot medium from within the OS, I guess this is also possible on Ubuntu somehow? The Bios is an UEFI Bios.

Thanks

djdomi avatar
za flag
set the pxe boot first as boot option and then use the pxe server to indicate that you want to do a backup or whatever... remember that you can backup the entire system still while on duty
Score:0
in flag

In theory, yes you can modify the EFI settings to change boot order. (in practice expect bugs and gotchas)

Most common Linux tool is efibootmgr.

Unfortunately I do not have exact details for you, since it was a very long time since I used it. Some related data. https://superuser.com/questions/1451233/change-the-boot-order-with-no-option-in-uefi-settings

In case of legacy pcbios mode, this is much harder and involves changing the correct parts of the nvram to change settings, and that is different between models, and in some times even different between bios versions.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.