Sunday, May 29, 2016

Hibernation

By default, Slackware restarts from hibernation following the standard booting, loosing the state previously saved in the swap partition. To solve this, I edited the boot loader configuration, which in my case is ELILO. This is the result.

# /boot/efi/EFI/Slackware/elilo.conf

# The prompt line tells ELILO to display a prompt for you to choose a kernel.
#prompt

# tells ELILO to wait 5 seconds for you to respond. (This value is specified in 
# tenths of a second.) If you don't respond, it boots the image specified by the 
# default line.
#timeout=50

# Sets the default stanza to load (the name is sets by 'label=').
default=Slackware

# chooser specify kernel chooser to use: 'simple' or 'textmenu'.
#chooser=simple

# delay specifies the number of tenths of a second the boot loader should wait 
# before automatically booting a locked command line, a command line pre-stored 
# by "lilo -R", or the default 'image=' or 'other='.
#delay=10

# Stanzas
image=vmlinuz
label = Slackware
root = /dev/sda3
        read-only
        append="resume=/dev/sda2"

The magic here is done by the line append="resume=/dev/sda2", now ELILO knows that it have to start Slackware from the swap partition.

Reference: http://docs.slackware.com

No comments: