Add reboot with BootNext
This commit is contained in:
parent
6c8705b8cd
commit
bee5eb3984
3 changed files with 34 additions and 10 deletions
|
|
@ -168,14 +168,39 @@ rsync -e "ssh -F local.ssh_config" -av --chown contestant:contestant backups/con
|
|||
Stop the periodic backup command with Ctrl+C.
|
||||
Rename the `backups` folder to e.g. `backups-day1`.
|
||||
|
||||
You can shut down all machines.
|
||||
Machines should be rebooted from USB stick between contests (e.g. between practice and actual contest) to ensure all data is erased.
|
||||
There is a script which helps with this: It sets the color scheme to dark as a visual marker for not yet rebooted machines, and then shows a question dialog.
|
||||
You can then insert a boot USB stick and press Enter, and the machine will reboot.
|
||||
|
||||
```
|
||||
parallel-ssh -x "-F local.ssh_config" -h hostlist "nohup reboot-interactive > /dev/null 2> /dev/null &"
|
||||
```
|
||||
|
||||
If the machines don't boot from USB stick by default, you can run the following command beforehand to make them boot from USB stick.
|
||||
This is especially useful when the boot menu is password protected, because then you don't need to enter the password again.
|
||||
This command sets the EFI BootNext setting to the current boot option.
|
||||
The BootNext setting only applies for the next boot, and is then deleted by the EFI, so you have to run the command again before rebooting again.
|
||||
This should also work when you power off the machines and turn them back on later (e.g. on the next day).
|
||||
|
||||
```
|
||||
parallel-ssh -x "-F local.ssh_config" -h hostlist 'efibootmgr --bootnext $(efibootmgr | grep -xE "BootCurrent: [0-9a-fA-F]{4}" | cut "-d " -f2)'
|
||||
```
|
||||
|
||||
An alternative to setting BootNext is to reboot using kexec.
|
||||
This is a partial reboot which does not go through EFI, so it is faster, but less reliable.
|
||||
For example, in my testing it only works once; the second time the screen stays blank.
|
||||
You can try improving the reliability, but otherwise I would avoid this method.
|
||||
|
||||
```
|
||||
parallel-ssh -x "-F local.ssh_config" -h hostlist 'kexec --kexec-file-syscall --load /vmlinuz --initrd=/initrd.img --append="$(cat /proc/cmdline)"'
|
||||
```
|
||||
|
||||
When the event is over, you can shut down all machines:
|
||||
|
||||
```
|
||||
parallel-ssh -x "-F local.ssh_config" -h hostlist poweroff
|
||||
```
|
||||
|
||||
Machines should be shut down and booted again from USB stick between contests (e.g. between practice and actual contest) to ensure all data is erased.
|
||||
|
||||
## Contest lock screen
|
||||
|
||||
The contest lock screen is a gnome extension which can lock the screen and show a countdown until the contest starts.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue