User Tools

Site Tools


linux:suspend-reboot

This is an old revision of the document!


Suspend to disk and reboot

In order to easier switch between different operating systems on a pc, one can suspend to disk and configure grub to automatically reboot after suspending.

The command s2disk has options to easily trigger a reboot after suspending. This command is part of the uswsusp package on debian systems.

apt-get install uswsusp

An example script to suspend to disk and reboot immediately is:

#!/bin/sh
sudo grub-set-default 2 # here '2' is whichever option is Windows
sudo s2disk -P 'shutdown method = reboot'

The file /etc/default/grub contains the main configuration and the default entry for the linux system - usually 0. This will then ensure that after rebooting from windows, the linux system will be loaded again.

linux/suspend-reboot.1492948956.txt.gz · Last modified: 2023/05/29 11:53 (external edit)