Commit 8aeae9f3 authored by Ben Hutchings's avatar Ben Hutchings

hooks/resume: Disable resume when there are no suitable swap devices

In 0.131 the automatic selection of a resume device was changed to
disable resume if the largest swap device was encrypted with a
ephemeral key.

In 0.132 I changed the automatic selection to also reject zram
devices, but I also changed it to loop over all swap devices since
zram might well be used alongside a conventional swap device that we
could use.  Unfortunately, in case swap devices are available but none
are suitable, this results in selecting the last one.

Closes: #916696
Thanks: Trek <>
Signed-off-by: Ben Hutchings's avatarBen Hutchings <>
parent 40e544e1
......@@ -81,7 +81,10 @@ if ! ischroot && [ -r /proc/swaps ]; then
$ephemeral || break
if [ -n "$resume_auto" ] && ! $ephemeral; then
if $ephemeral; then
if [ -n "$resume_auto" ]; then
if [ -n "$dm_name" ]; then
elif UUID=$(blkid -s UUID -o value "$resume_auto"); then
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment