Re: [Pkg-cryptsetup-devel] Bug#342079: cryptsetup: should check swap partition type

Michael Gebetsroither michael.geb at gmx.at
Mon Jan 23 12:35:38 UTC 2006


hi,

> if you like to have a swap test, just write a precheck script for swap
> partitions at /usr/share/cryptsetup/prechecks/swap, and add the option
> "precheck=swap" to the relevant entry in /etc/crypttab. i'll happily add
> it into the package if you send me a copy.

Swap has a ascii signature. SWAPSPACE2 for "new" swap partitions and
SWAP_SPACE for older ones.

something like this should do the job:
# dd if=/dev/mapper/cswap bs=4k count=1 2>/dev/null|strings |egrep
'(SWAPSPACE2)|(SWAP_SPACE)'
SWAPSPACE2
#

greets,
Michael Gebetsroither

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++



More information about the Pkg-cryptsetup-devel mailing list