[dm-crypt] Debian 7.10 random key swap Device /dev/sda2 is not a valid LUKS device.

David Christensen dpchrist at holgerdanske.com
Wed Apr 6 06:25:06 CEST 2016


dm-crypt:

I have a Debian 7.10 (Wheezy) computer with a random-key swap device. 
The disk and swap are working.


When I try to backup the LUKS header:

     # cryptsetup luksHeaderBackup /dev/sda2 --header-backup-file 
luksheaderbackup-sda2.bin
     Device /dev/sda2 is not a valid LUKS device.


Is this expected/ normal behavior for a dm-crypt/ LUKS random-key swap 
partition?


David



# cat /etc/debian_version
7.10

# dpkg-query -l cryptsetup
Desired=Unknown/Install/Remove/Purge/Hold
| 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  cryptsetup     2:1.4.3-4    amd64        disk encryption support - 
startup

# grep sda2 /etc/crypttab
sda2_crypt /dev/sda2                                 /dev/urandom 
  cipher=aes-xts-plain64,size=256,swap

# grep sda2 /etc/fstab
/dev/mapper/sda2_crypt                    none                    swap 
        sw                                              0       0

# swapon -s
Filename				Type		Size	Used	Priority
/dev/mapper/sda2_crypt                  partition	488444	0	-1

# cryptsetup -v isLuks /dev/sda2
Device /dev/sda2 is not a valid LUKS device.
Command failed with code 22: Device /dev/sda2 is not a valid LUKS device.

# cryptsetup -v luksDump /dev/sda2
Device /dev/sda2 is not a valid LUKS device.
Command failed with code 22: Device /dev/sda2 is not a valid LUKS device.


More information about the dm-crypt mailing list