Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#66477 - [cryptsetup][json-c] luksFormat persistent error "Cannot not wipe header on device"

Attached to Project: Arch Linux
Opened by Stefan Haller (fgrsnau) - Thursday, 30 April 2020, 10:12 GMT
Last edited by Christian Hesse (eworm) - Thursday, 30 April 2020, 13:28 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

I am unable to run `cryptsetup luksFormat` on an up-to-date Arch Linux machine. I tested it on a second machine and also while running the linux and linux-lts kernels. Opening existing encrypted devices is working fine for me. Unfortunately, the --verbose flag is not very helpful in this case.

Additional info:
* cryptsetup 2.3.1-2

Steps to reproduce:
1. touch /tmp/test
2. fallocate -l 500M /tmp/test
3. cryptsetup luksFormat -v /tmp/test
4. Enter "YES" + passphrase "test" twice.

Output:

# cryptsetup luksFormat -v /tmp/test

WARNING!
========
This will overwrite data on /tmp/test irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /tmp/test:
Verify passphrase:
Cannot wipe header on device /tmp/test.
Command failed with code -1 (wrong or missing parameters).


This task depends upon

Closed by  Christian Hesse (eworm)
Thursday, 30 April 2020, 13:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  cryptsetup 2.3.1-3
Comment by Stefan Haller (fgrsnau) - Thursday, 30 April 2020, 10:15 GMT
I'm sorry, but I forgot to mention in the initial report that I tried to verify if this works with an older version of the package. Unfortunately I cannot run a downgraded version of cryptsetup due to the recent bump of libjson-c.so.
Comment by nl6720 (nl6720) - Thursday, 30 April 2020, 12:27 GMT
Try downgrading to cryptsetup 2.3.1-1 and json-c 0.13.1-3. It will work then.
Comment by Christian Hesse (eworm) - Thursday, 30 April 2020, 12:48 GMT Comment by Christian Hesse (eworm) - Thursday, 30 April 2020, 12:52 GMT
Looks like the rebuild changed the default to LUKS2...

Can you try this command: cryptsetup --type luks1 luksFormat /tmp/test
Comment by nl6720 (nl6720) - Thursday, 30 April 2020, 12:55 GMT
LUKS2 is the default "LUKS" since cryptsetup 2.1.

If this doesn't get fixed today, tomorrow's ISO will bring a nasty surprise for those wanting to install Arch.
Comment by Christian Hesse (eworm) - Thursday, 30 April 2020, 13:04 GMT
Please try cryptsetup 2.3.1-3 from [testing]!
Comment by Stefan Haller (fgrsnau) - Thursday, 30 April 2020, 13:14 GMT
It works with `--type luks1`. Thanks for the suggestion! (I actually tried `--type luks` before reporting this bug as I wrongly assumed the available options are either luks or luks2)

Loading...