You are not logged in.

#1 2022-05-03 16:22:36

millus
Member
Registered: 2019-07-21
Posts: 193

[SOLVED] luksHeaderBackup creates a tiny (20kB) file?

I wanted to back up the luks header of an encrypted partition, so I ran

cryptsetup luksHeaderBackup --header-backup-file luksheader /dev/sda3

but the resulting file was only 20kB in size!
And when I tried to verify it, I promptly got this:

cryptsetup luksOpen --test-passphrase luksheader
Device luksheader is too small. Need at least 16777216 bytes.
Device luksheader is not a valid LUKS device.

Any idea what could have gone wrong here?

Last edited by millus (2022-05-03 17:14:12)

Offline

#2 2022-05-03 16:35:36

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: [SOLVED] luksHeaderBackup creates a tiny (20kB) file?

LUKS uses key material larger than 20kb so even for the smallest LUKS header that's unusual.

Does luksDump work? If luksHeaderBackup keeps producing 20kb files maybe add --verbose and/or --debug

Offline

#3 2022-05-03 16:40:54

millus
Member
Registered: 2019-07-21
Posts: 193

Re: [SOLVED] luksHeaderBackup creates a tiny (20kB) file?

Ok, thanks. First I ran the header backup from a Mint live stick, now I tried the same from a Partition Magic live stick and this time it produced a 16M header file!

Offline

#4 2022-05-03 16:48:12

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: [SOLVED] luksHeaderBackup creates a tiny (20kB) file?

if the Mint stick was quite old then maybe you tried to backup a LUKS 2 header, with old version of cryptsetup that only supports LUKS 1.

Offline

#5 2022-05-03 17:13:59

millus
Member
Registered: 2019-07-21
Posts: 193

Re: [SOLVED] luksHeaderBackup creates a tiny (20kB) file?

Ohhh, I see!

Offline

Board footer

Powered by FluxBB