[pkg-cryptsetup-devel] Bug#929782: cryptsetup-initramfs: Detects rootfs incorrectly

Lyberta lyberta at lyberta.net
Fri May 31 07:47:00 BST 2019


Package: cryptsetup-initramfs
Version: 2:2.1.0-3
Severity: important

Dear Maintainer,

Usually, all my systems use "encrypted_root" as a name for rootfs.

fstab looks like this:

/dev/mapper/encrypted_root      /       ext4    errors=remount-ro       0	1

crypttab looks like this:

encrypted_root  UUID=whatever   none    luks

However, when installing new system from a live system I can't mount new
rootfs as "encrypted_root" because it is already used by live rootfs, so
I mount it as "new_root". Remember that fstab and crypttab of all
systems have "encrypted_root" as the name of rootfs in them.

Now when I chroot into new system and do "update-initramfs -u" I get
"target 'new_root' is not found in /etc/crypttab".

This is very wrong. Somehow the update script gets the name of rootfs as
it is currently mounted (which doesn't matter) and uses it down the line.

The algorithm should be:

* Look in fstab and see the name of rootfs.
* Look in crypttab and see if the name exists there.
* If it exists, add crypt modules, if it doesn't, display warning as usual.

The script should never care how rootfs is mounted at the time of
running because it may be chroot in live system or rescue system or
whatever.



-- Package-specific info:

-- System Information:
Debian Release: 10.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.0.0-trunk-amd64 (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cryptsetup-initramfs depends on:
ii  busybox                                 1:1.30.1-4
ii  cryptsetup-run                          2:2.1.0-3
ii  initramfs-tools [linux-initramfs-tool]  0.133

Versions of packages cryptsetup-initramfs recommends:
ii  console-setup  1.191
ii  kbd            2.0.4-4

cryptsetup-initramfs suggests no packages.

-- no debconf information

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-cryptsetup-devel/attachments/20190531/e98abc1f/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list