Comment 54 for bug 953875

Revision history for this message
frostschutz (frostschutz) wrote :

> swapon -a by default

I'm not worried about default behaviour, just wondering what can go wrong long term.

How about putting a keyless LUKS header on it. You can't do anything with it (as the manpage states, "Removing the last passphrase makes the LUKS container permanently inaccessible."). But it provides a UUID and it makes the device look like it's supposed to be encrypted, which it is.

    echo swap | cryptsetup --batch-mode --iter-time=1 --uuid="$uuid" luksFormat "$dev"
    echo swap | cryptsetup --batch-mode luksKillSlot "$dev" 0

And then forget & ignore this header (only the first 4K need to be left intact) and use plain cryptsetup with offset as it were.

I'm not sure what various mount helpers would make of such a "LUKS" partition though. Ideally with the crypt mapping in place they should recognize it as already open.

But maybe I'm just overthinking things. Sorry for butting in. :)