- Package:
- debian-installer
- Source:
- debian-installer
- Description:
- Debian Installer documentation
- Submitter:
- Kev Clearwater
- Date:
- 2015-03-14 17:00:05 UTC
- Severity:
- normal
Recently, the cryptsetup scripts have changed from an ext2 to an ext4 default filesystem for the tmp option in crypttab. d-i only allows ext2 or swap for an encrypted volume with a /dev/urandom key. This is causing the fstab to try and mount tmp as an ext2 volume, when it has been formatted as ext4. It fails. A possible fix might be to specify tmp=ext2 in the crypttab options instead of just tmp.
I see, I wasn't aware of that. When executing update-initramfs -u in a chroot via a live CD, I get: update-initramfs: Generating /boot/initrd.img-3.16.0-4-amd64 cryptsetup: WARNING: could not determine root device from /etc/fstab Warning: /sbin/fsck.btrfs doesn't exist, can't install to initramfs, ignoring. <perl locale warnings> More details of the setup are described in the following mailing list message (please ignore issue #1), including fstab, crypttab contents and blkid output: https://lists.debian.org/debian-user/2015/02/msg00323.html (please excuse the use of '<etc>' in the UUID's, I couldn't be bothered to type them all out in full) The filesystem after installation does contain an install of cryptsetup, just no copy in initrd. I added 'cryptsetup' into the /etc/initramfs-tools/modules file before executing update-initramfs -u, resulting in the above output, and no cryptsetup binary or config files present in the /boot initrd image. I'm not going to dispute whether the fault lies with initramfs-tools or partman-crypto, because I don't have a clue. All I know at this time is that comparing two VM installs, one using luks + btrfs and one using luks + ext4, otherwise identical, the btrfs one lacks cryptsetup in its initrd after installation, causing boot failure, while the ext4 one is fine, and using a live CD + chroot to try to fix things via update-initramfs, the tool runs fine on the ext4 install, but fails on the btrfs install. I am guessing that both problems have a common cause. Thank you for taking some time to respond to my issue. I appreciate any help you can offer in resolving it.
Dear Maintainer,
I installed debain with encrypted hard disk. The /tmp directory is mounted to
a separate partition with a random key. In /etc/crypttab the line
sda3_crypt /dev/sda3 /dev/urandom cipher=aes-xts-plain64,size=256,tmp
was generated, in /etc/fstab the line
/dev/mapper/sda3_crypt /tmp ext2 defaults 0 2
was generated. During boot I got the message
Mounting local filesystems...mount: wrong fs type, bad option, bad
superblock on /dev/mapper/sda3_crypt,
missing codepage or helper program, or other error
[...]
And indeed, the /tmp file system was not mounted. According to crypttab(5), I
changed the corresponding line in /etc/crypttab to
sda3_crypt /dev/sda3 /dev/urandom cipher=aes-xts-plain64,size=256,tmp=ext2
Now the /tmp file system is mounted on boot as expected.
It seems to me that the original crypttab entry is either invalid (as the
option 'tmp' needs to be followed by '=<tmpfs>') or the default file system for
tmp is not ext2.
For the sake of completeness I append /etc/crypttab and /etc/fstab. The only
manual change I have made is the above mentioned line in crypttab.
Thank you for the (otherwise) really great automated installation process.
Sincerely
Lars
--- /etc/crypttab ------------------------------------------------------------
sda2_crypt UUID=afc745bf-6b36-4f43-a483-b49d28ab7eea none luks
sda3_crypt /dev/sda3 /dev/urandom cipher=aes-xts-plain64,size=256,tmp=ext2
sda5_crypt /dev/sda5 /dev/urandom cipher=aes-xts-plain64,size=256,swap
--- /etc/fstab ---------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/sda2_crypt / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=04d34b71-b02b-4f10-8a04-d399793a087c /boot ext4 defaults 0 2
/dev/mapper/sda3_crypt /tmp ext2 defaults 0 2
/dev/mapper/sda5_crypt none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0