Web lists-archives.com

Re: Got tired of waiting for suspend/resume (something like that)

On 2018-02-01, Nicolas George <george@xxxxxxxx> wrote:
> David Wright (2018-02-01):
>> As far as finding the swap partition with fstab, ISTR a workaround.
>> Without the details, you make the swap partition with a tiny
>> filesystem in it, which gives it a stable UUID and LABEL. You then
>> specify an offset in every reference to its use, which skips over
>> the filesystem at its start.
> What are you trying to achieve with this baroque contraption?
> If a swap is encrypted normally, then just use its UUID.
> If a swap is encrypted with an ephemeral key, that means its contents is
> not wanted after a reboot, so there is no need to preserve the key,
> obviously. As to how to specify it in fstab, you need to use the name
> declared in crypttab.

Unfortunately my crypttab (which I've never touched or looked at)
reveals the following:

# <target name> <source device>         <key file>      <options>
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

Which is dangerous because that dev/sda5 gets wiped out at every

curty@einstein:~/tips$  find -L /dev/disk -samefile /dev/sda5

I probably should change my crypttab (as a sane precaution) to:

swap /dev/disk/by-id//dev/disk/by-id/ata-WDC_WD15EARS-22MVWB0_WD-WCAZA8328525-part5
/dev/urandom   swap,cipher=aes-cbc-essiv:sha256,size=256

Still, I'm uncertain what goes into /etc/fstab.

   /dev/mapper/swap none swap sw 0 0


> Using filesystem labels and UUID is IMHO a very bad design, because they
> reside inside the filesystem itself. Better use LVM, partition names or
> partition UUIDs.
> Regards,

“True terror is to wake up one morning and discover that your high school class
is running the country.” – Kurt Vonnegut