<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>I have created an encrypted drive using the following commands:</p>
<p>#>cryptsetup --verify-passphrase -- hash=sha256
--keyfile=/dir/file create testcui /dev/sdb</p>
<p>#>mkfs.ext4 /dev/mapper/testcui</p>
<p>I did this all at single user level. running centos 7 on a VM.</p>
<p>this all work well until I reboot the system and then it fails to
mount the device and drops down it to emergency mode. This is the
journalctl output I get. ( yeah I know about the acls on the key
file ) device name "testcui"</p>
<p>Sep 20 14:19:53 jubilee systemd[1]: Starting Cryptography Setup
for /dev/mapper/testcui...<br>
-- Subject: Unit <a class="moz-txt-link-abbreviated"
href="mailto:systemd-cryptsetup@-dev-mapper-testcui.service">systemd-cryptsetup@-dev-mapper-testcui.service</a>
has begun start-up<br>
-- Defined-By: systemd<br>
-- Support: <a class="moz-txt-link-freetext"
href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
-- <br>
-- Unit <a class="moz-txt-link-abbreviated"
href="mailto:systemd-cryptsetup@-dev-mapper-testcui.service">systemd-cryptsetup@-dev-mapper-testcui.service</a>
has begun starting up.<br>
Sep 20 14:19:53 jubilee systemd-cryptsetup[501]: Key file
/etc/keys is world-readable. This is not a good idea!<br>
Sep 20 14:19:53 jubilee systemd-cryptsetup[501]: Set cipher aes,
mode cbc-essiv:sha256, key size 256 bits for device /dev/sdb.<br>
Sep 20 14:19:53 jubilee systemd-cryptsetup[501]: <b>Failed to
activate with key file '/etc/keys': Invalid argument</b><br>
Sep 20 14:19:53 jubilee systemd[1]: Started Forward Password
Requests to Plymouth.<br>
</p>
<p>What is the invalid argument that it is complaining about?</p>
<p>Once in emergency mode I can :</p>
<p>#>cryptsetup create testcui /dev/sdb</p>
<p>( passcode)</p>
<p>And it continues just fine.<br>
</p>
<p>-- crypttab --</p>
<p># test disk<br>
#<br>
/dev/mapper/testcui /dev/sdb /etc/keys plain<br>
</p>
<p>--fstab--</p>
#<br>
# /etc/fstab<br>
# Created by anaconda on Tue Dec 15 12:05:51 2015<br>
#<br>
# Accessible filesystems, by reference, are maintained under
'/dev/disk'<br>
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for
more info<br>
#<br>
UUID=c4cc85f2-9dbb-4bf8-8b3e-edaa5af3dae9 /
xfs defaults 1 1<br>
UUID=2f178edb-b16e-4ea1-85c3-d8243b07a75b /boot
xfs defaults 1 2<br>
UUID=a34fac21-a385-494a-a6cc-cae22b87c8c9 swap
swap defaults 0 0<br>
/dev/mapper/testcui /cui ext4 defaults 1 2
<div class="moz-signature">-- <br>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<title></title>
<meta name="GENERATOR" content="OpenOffice.org 2.3 (Win32)">
<meta name="AUTHOR" content="Jerry Lowry">
<meta name="CREATED" content="20090409;12470500">
<meta name="CHANGED" content="0;0">
<style type="text/css">
<!--
@page { size: 8.5in 11in; margin: 0.79in }
P { margin-bottom: 0.08in; direction: ltr; color: #000000; widows: 0; orphans: 0 }
P.western { font-family: "Times New Roman", serif; font-size: 12pt; so-language: en-US }
P.cjk { font-family: "Lucida Sans Unicode"; font-size: 12pt; so-language: zxx }
P.ctl { font-family: "Tahoma"; font-size: 12pt; so-language: zxx }
-->
</style>
<p class="western" style="margin-bottom: 0in"><font face="Arial,
sans-serif"><font size="2">---------------------------------------------------------------------------<br>
Jerold
Lowry<br>
Principal Network/Systems Engineer<br>
Engineering Design Team
(EDT), Inc. a HEICO company<br>
3423 NW John Olsen Pl
<br>
Hillsboro, Oregon 97124 (U.S.A.)<br>
Phone: 503-690-1234 /
800-435-4320<br>
Fax: 503-690-1243<br>
Web: </font></font><font color="#000080"><u><a
href="http://www.edt.com/"><font face="Arial, sans-serif"><font
size="2">www.edt.com</font></font></a></u></font><font
face="Arial, sans-serif"><font size="2"><br>
</font></font><br>
</p>
<p class="western" style="margin-bottom: 0in"> </p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
</div>
</body>
</html>