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

Jonas Meurer jonas at freesources.org
Mon Jan 23 16:43:48 UTC 2006


On 23/01/2006 Michael Gebetsroither wrote:
> > 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
> #

great. maybe you find time to improve trunk/debian/prechecks/swap to use
this way for checking for a swap device. it seems quite more
appropriately then checking for a swap partition with fdisk (like my
current swap precheck does).

...
 jonas



More information about the Pkg-cryptsetup-devel mailing list