update-initramfs cryptsetup must correctly take into account PARTLABEL inside /etc/fstab

Bug #1580308 reported by Etienne URBAH
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
New
Undecided
Unassigned
initramfs-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Systematically,

- With a /etc/fstab using UUID or LABEL, update-initramfs works correctly

- With a /etc/fstab using PARTLABEL, update-initramfs displays following error messages :
cryptsetup: WARNING: failed to detect canonical device of PARTLABEL=Ubuntu-Gnome
cryptsetup: WARNING: could not determine root device from /etc/fstab
cryptsetup: WARNING: failed to detect canonical device of PARTLABEL=USR-Ubuntu

The cryptsetup part of update-initramfs must correctly take into account PARTLABEL inside /etc/fstab

Thank you in advance

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: initramfs-tools 0.122ubuntu8
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: X-Cinnamon
Date: Tue May 10 21:14:24 2016
InstallationDate: Installed on 2014-11-03 (553 days ago)
InstallationMedia: Ubuntu-GNOME 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: Upgraded to xenial on 2016-05-09 (1 days ago)
mtime.conffile..etc.initramfs-tools.initramfs.conf: 2016-02-21T22:22:01

Revision history for this message
Etienne URBAH (eurbah) wrote :
Revision history for this message
Thomas Mayer (thomas303) wrote :

Doing updates with apt-get, I get messages like

cryptsetup: WARNING: failed to detect canonical device of /dev/sdXY

Besides the warning message, everything seems to run fine.

I'm using ubuntu 16.04 with recent updates.

related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=671056

Revision history for this message
Thomas Mayer (thomas303) wrote :

The warning appears although I use UUIDs all over the place in my /etc/fstab.

Revision history for this message
Thomas Mayer (thomas303) wrote :

A also need to add that my hard disks are unencrypted from the perspective of the OS (I use hardware encrypted SSDs).

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

Are you using btrfs? If so, the relevant Debian bug report is probably https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784881

Revision history for this message
Etienne URBAH (eurbah) wrote :

I am NOT using 'btrfs'.
I am using 'PARTLABEL' in '/etc/fstab'.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
A (publicface) wrote :
Download full text (5.9 KiB)

# more /etc/fstab
/dev/md1 / ext3 defaults,noatime 1 1
/dev/sda2 none swap sw
/dev/sdb2 none swap sw
/dev/vg00/usr /usr ext4 noatime,errors=remount-ro 0 2
/dev/vg00/var /var ext4 noatime,errors=remount-ro 0 2
/dev/vg00/home /home ext4 noatime,errors=remount-ro 0 2
#/dev/hdd/data /data ext4 noatime,errors=remount-ro 0 2
proc /proc proc nodev,noexec,nosuid 0 0

# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=8154408k,nr_inodes=2038602,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1641468k,mode=755)
/dev/md1 on / type ext3 (rw,noatime,data=ordered)
/dev/mapper/vg00-usr on /usr type ext4 (rw,noatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,clone_children)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/mapper/vg00-home on /home type ext4 (rw,noatime,errors=remount-ro,data=ordered)
/dev/mapper/vg00-var on /var type ext4 (rw,noatime,errors=remount-ro,data=ordered)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=1641468k,mode=700)

# cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, usin...

Read more...

Revision history for this message
Tipi Koivisto (tipit) wrote :

I got it [1] now also for the first time when doing apt upgrade and it is pretty scary when considering that /dev/sda3 is the root folder [2].

[1]
...
Setting up update-manager-core (1:17.04.8) ...
Setting up update-manager (1:17.04.8) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Processing triggers for initramfs-tools (0.125ubuntu9) ...
update-initramfs: Generating /boot/initrd.img-4.11.8-041108-generic
cryptsetup: WARNING: failed to detect canonical device of /dev/sda3
cryptsetup: WARNING: could not determine root device from /etc/fstab

[2]
df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 16353300 0 16353300 0% /dev
tmpfs 3276344 108148 3168196 4% /run
/dev/sda3 51343840 16054812 32651204 33% /
tmpfs 16381712 700604 15681108 5% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 16381712 0 16381712 0% /sys/fs/cgroup
/dev/loop0 85120 85120 0 100% /snap/core/3017
/dev/loop2 83456 83456 0 100% /snap/core/2898
/dev/sda1 523248 1176 522072 1% /boot/efi
/dev/sda4 419291016 332865984 86408648 80% /home
tmpfs 3276340 64 3276276 1% /run/user/1000
/home/me/.Private 419291016 332865984 86408648 80% /home/me
/dev/loop3 85120 85120 0 100% /snap/core/3247

Revision history for this message
Anatoli Babenia (abitrolly) wrote :

cryptsetup: WARNING: failed to detect canonical device is fixed in cryptsetup/2:2.0.3-2 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784881

The version is not available in Ubuntu 18.10 - https://packages.ubuntu.com/bionic-updates/cryptsetup - which means initramfs update fail for encrypted disks.

Revision history for this message
Anatoli Babenia (abitrolly) wrote :

Not included in 18.04 LTS. This causes servers to hang after update and reboot - https://community.scaleway.com/t/arm64-hangs-with-ubuntu-18-04-fully-updated/7681

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.