You are not logged in.

#1 2016-10-24 20:15:58

Scoopta
Member
Registered: 2016-10-24
Posts: 4

Need a kernel parameter for crypttab device?

I recently installed arch after being a long time Debian user and I've got everything setup but not my encrypted volumes. My root partition encryption is working fine. The device I'm trying to decrypt is a secondary drive. In /etc/crypttab:

Storage    /dev/sdb1   /etc/luks-keys/Storage  luks

and in /etc/fstab I have

/dev/Storage/Storage   /mnt/Storage    ext4    0 0

yet it always seems to get stuck trying to mount. Doing dmesg | grep crypt shows the following line:

[    8.638678] systemd-cryptsetup-generator[351]: Not creating device 'Storage' because it was not specified on the kernel command line.

Do I have to specify a kernel parameter too? If so what is it?

Last edited by Scoopta (2016-10-24 21:33:42)

Offline

#2 2016-10-24 21:31:28

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: Need a kernel parameter for crypttab device?

Your post is extremely hard to read with all that dense text. File contents and program output are best placed inside code tags - as well as making it easier to read a post they also preserve formatting.

“/dev/Storage/Storage” doesn't look right to me - I would expect it to be “/dev/mapper/Storage”

Offline

#3 2016-10-24 21:34:30

Scoopta
Member
Registered: 2016-10-24
Posts: 4

Re: Need a kernel parameter for crypttab device?

ukhippo wrote:

Your post is extremely hard to read with all that dense text. File contents and program output are best placed inside code tags - as well as making it easier to read a post they also preserve formatting.

“/dev/Storage/Storage” doesn't look right to me - I would expect it to be “/dev/mapper/Storage”

I fixed the formatting. Also the mount is right as it's an LVM volume. When the device gets decrypted the crypt/LVM physical volume should be /dev/mapper/Storage with a logical volume as /dev/Storage/Storage

Last edited by Scoopta (2016-10-24 21:36:32)

Offline

#4 2016-10-24 22:28:24

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: Need a kernel parameter for crypttab device?

Scoopta wrote:

Also the mount is right as it's an LVM volume. When the device gets decrypted the crypt/LVM physical volume should be /dev/mapper/Storage with a logical volume as /dev/Storage/Storage

That's vital detail that wasn't mentioned. However, the logical volumes will also be in /dev/mapper (as “/dev/mapper/<vgname>-<lvname>”). What does a simple ls of that directory give?

Offline

#5 2016-10-24 22:30:44

Scoopta
Member
Registered: 2016-10-24
Posts: 4

Re: Need a kernel parameter for crypttab device?

ukhippo wrote:
Scoopta wrote:

Also the mount is right as it's an LVM volume. When the device gets decrypted the crypt/LVM physical volume should be /dev/mapper/Storage with a logical volume as /dev/Storage/Storage

That's vital detail that wasn't mentioned. However, the logical volumes will also be in /dev/mapper (as “/dev/mapper/<vgname>-<lvname>”). What does a simple ls of that directory give?

Nothing...well not nothing. It gives me the stuff for my root partition but nothing for the drive I'm attempting to mount. I'm aware of LVM volumes showing up there. They also show in /dev/<vgname>/<lvname> and that's normally how I mount them. Regardless the issue is with decryption itself. The drive is never decrypted as revealed by dmesg.

Last edited by Scoopta (2016-10-24 22:31:28)

Offline

#6 2016-10-24 22:35:38

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

Re: Need a kernel parameter for crypttab device?

You have to be a bit careful with /dev/mapper/ namespace, if your LUKS device is named storage and the LVM is named storage also it could cause problems, since you can't have two of the same name in /dev/mapper. Thus I prefix all of my LUKS devices with "luks".

Which mkinitcpio hooks are you using? the sd-encrypt hook expectes kernel parameters (mkinitcpio -H sd-encrypt) or alternatively uses a crypttab.initramfs file (but not crypttab).

Offline

#7 2016-10-24 23:16:46

Scoopta
Member
Registered: 2016-10-24
Posts: 4

Re: Need a kernel parameter for crypttab device?

frostschutz wrote:

You have to be a bit careful with /dev/mapper/ namespace, if your LUKS device is named storage and the LVM is named storage also it could cause problems, since you can't have two of the same name in /dev/mapper. Thus I prefix all of my LUKS devices with "luks".

Which mkinitcpio hooks are you using? the sd-encrypt hook expectes kernel parameters (mkinitcpio -H sd-encrypt) or alternatively uses a crypttab.initramfs file (but not crypttab).

Then that would be my problem. I am using sd-encrypt. You mentioned a crypttab.initramfs file. How would I go about using that. Although I do find it odd because dmesg shows the file is definitely being read.

Last edited by Scoopta (2016-10-24 23:21:32)

Offline

#8 2016-12-13 15:36:47

darkbasic
Member
Registered: 2015-06-22
Posts: 31

Re: Need a kernel parameter for crypttab device?

crypttab.initramfs does not solve the problem:

[    0.887494] systemd-cryptsetup-generator[68]: Not creating device 'cryptswap' because it was not specified on the kernel command line.
[    6.461355] systemd-cryptsetup-generator[243]: Not creating device 'cryptswap' because it was not specified on the kernel command line.
[    6.625274] systemd-cryptsetup-generator[269]: Not creating device 'cryptswap' because it was not specified on the kernel command line.

This is clearly a systemd bug. Am we the only ones using sd-encrypt?

Offline

#9 2016-12-13 15:46:31

darkbasic
Member
Registered: 2015-06-22
Posts: 31

Re: Need a kernel parameter for crypttab device?

Offline

Board footer

Powered by FluxBB