systemd relies on some udev properties to craft the message that will be displayed by the cryptsetup service when a password is required.
For this testcase, the scsi_debug module is loaded and the device created by it is used for the tests.
With xenial kernel 4.4.0-154-generic, udevadm returns for the scsi_debug block device:
$ udevadm info /dev/sdb P: /devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb N: sdb S: disk/by-id/scsi-35333333000001770 S: disk/by-id/wwn-0x5333333000001770 E: DEVLINKS=/dev/disk/by-id/scsi-35333333000001770 /dev/disk/by-id/wwn-0x5333333000001770 E: DEVNAME=/dev/sdb E: DEVPATH=/devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb E: DEVTYPE=disk E: ID_BUS=scsi E: ID_MODEL=scsi_debug E: ID_MODEL_ENC=scsi_debug\x20\x20\x20\x20\x20\x20 E: ID_REVISION=0184 E: ID_SCSI=1 E: ID_SCSI_SERIAL=6000 E: ID_SERIAL=35333333000001770 E: ID_SERIAL_SHORT=5333333000001770 E: ID_TARGET_PORT=300 E: ID_TYPE=disk E: ID_VENDOR=Linux E: ID_VENDOR_ENC=Linux\x20\x20\x20 E: ID_WWN=0x5333333000001770 E: ID_WWN_WITH_EXTENSION=0x5333333000001770 E: MAJOR=8 E: MINOR=16 E: SUBSYSTEM=block E: TAGS=:systemd: E: USEC_INITIALIZED=121942203
However, with kernel 4.4.0-156-generic the output is:
$ udevadm info /dev/sdb P: /devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb N: sdb E: DEVNAME=/dev/sdb E: DEVPATH=/devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0/block/sdb E: DEVTYPE=disk E: MAJOR=8 E: MINOR=16 E: SUBSYSTEM=block E: TAGS=:systemd: E: USEC_INITIALIZED=36737967
systemd expects one of the following properties to be set: "ID_PART_ENTRY_NAME\0" "DM_NAME\0" "ID_MODEL_FROM_DATABASE\0" "ID_MODEL\0";
But none of them is present with the newer kernel.
systemd relies on some udev properties to craft the message that will be displayed by the cryptsetup service when a password is required.
For this testcase, the scsi_debug module is loaded and the device created by it is used for the tests.
With xenial kernel 4.4.0-154-generic, udevadm returns for the scsi_debug block device:
$ udevadm info /dev/sdb pseudo_ 0/adapter0/ host2/target2: 0:0/2:0: 0:0/block/ sdb id/scsi- 353333330000017 70 id/wwn- 0x5333333000001 770 /dev/disk/ by-id/scsi- 353333330000017 70 /dev/disk/ by-id/wwn- 0x5333333000001 770 /devices/ pseudo_ 0/adapter0/ host2/target2: 0:0/2:0: 0:0/block/ sdb ENC=scsi_ debug\x20\ x20\x20\ x20\x20\ x20 353333330000017 70 SHORT=533333300 0001770 ENC=Linux\ x20\x20\ x20 0x5333333000001 770 WITH_EXTENSION= 0x5333333000001 770 D=121942203
P: /devices/
N: sdb
S: disk/by-
S: disk/by-
E: DEVLINKS=
E: DEVNAME=/dev/sdb
E: DEVPATH=
E: DEVTYPE=disk
E: ID_BUS=scsi
E: ID_MODEL=scsi_debug
E: ID_MODEL_
E: ID_REVISION=0184
E: ID_SCSI=1
E: ID_SCSI_SERIAL=6000
E: ID_SERIAL=
E: ID_SERIAL_
E: ID_TARGET_PORT=300
E: ID_TYPE=disk
E: ID_VENDOR=Linux
E: ID_VENDOR_
E: ID_WWN=
E: ID_WWN_
E: MAJOR=8
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZE
However, with kernel 4.4.0-156-generic the output is:
$ udevadm info /dev/sdb pseudo_ 0/adapter0/ host2/target2: 0:0/2:0: 0:0/block/ sdb /devices/ pseudo_ 0/adapter0/ host2/target2: 0:0/2:0: 0:0/block/ sdb D=36737967
P: /devices/
N: sdb
E: DEVNAME=/dev/sdb
E: DEVPATH=
E: DEVTYPE=disk
E: MAJOR=8
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZE
systemd expects one of the following properties to be set:
"ID_ PART_ENTRY_ NAME\0"
"DM_ NAME\0"
"ID_ MODEL_FROM_ DATABASE\ 0"
"ID_ MODEL\0" ;
But none of them is present with the newer kernel.