Swap Space Not Activated On Boot

sktsee sktseer at gmail.com
Wed Sep 3 13:57:14 UTC 2014


On Tue, 02 Sep 2014 19:17:24 -0700, NoOp wrote:

> On 09/02/2014 04:46 PM, sktsee wrote:
>> On Sun, 31 Aug 2014 13:26:18 -0700, maihoaomv wrote:
>> 
>>> i installed  linux mint 17 xfce a month or so ago on my laptop. i
>>> encrypted my home folder at installation but cryptswap wouldn't work
>>> at the time. with some help from the linux mint  forum i managed to
>>> get swap to work (most of the time). the problem i'm having now is
>>> cryptswap doesn't always start at boot time. it worked most of the
>>> time at first but over time it's gotten to where it almost never
>>> starts. i have to manually start it with sudo swapon -a.
>>> 
>>> hopefully someone can show me what i'm doing wrong and help with solve
>>> this problem.
>>> thanks
>> 
>> [snip]
>> 
>> Edit the cryptswap1 entry in /etc/crypttab to identify the swap device
>> by its device path (/dev/sda2), or by its disk by-id path (example:
>> /dev/disk/by-id/ata-HDMANUFACTURER-MODEL-SERIALNUM-part2). If you have
>> multiple hard disks attached to your system then use disk by-id.
>> So your crypttab should contain a line like this:
>> 
>> cryptswap1   /dev/sda2    /dev/urandom 
>> swap,cipher=aes-cbc-essiv:sha256
>> 
>> 
> Read the bug reports that I posted to earlier...

I presume you're referring to this post? http://news.gmane.org/find-
root.php?message_id=lp2a1q%249h%241%40ger.gmane.org

If so, the first bug report highlights the problems with using UUID's to 
identify the swap device in /etc/crypttab and using the device path if 
you have multiple disks attached to your system. This is why I suggested 
to OP to use disk by-id as a source device. This is recommended by the 
cryptsetup FAQ.

As to the second bug report, that's just race condition brought about 
because of the interplay between the mountall and cryptdisks* jobs. I see 
that error too, but once the system finishes booting I have an encrypted 
swap present. And so far, its been persistent across boots.

-- 
sktsee





More information about the ubuntu-users mailing list