In some debugging of another issue, we realized that installs with root on bcache such as in tests/vmtests/test_bcache_basic.py end up booting with root=/dev/bcache0 (or bcache*) rather than UUID=.
This is not good as bcache names are not guaranteed in any order.
The reason this was failing was that when we create a filesystem on /dev/bcache0 no symlinks would be updated in /dev/disk/by-uuid/. The lack of a by-uuid entry causes /etc/grub.d/10_linux to take the 'GRUB_DEVICE' path in
| if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
| || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
| || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
| LINUX_ROOT_DEVICE=${GRUB_DEVICE}
| else
| LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
| fi
For other devices the /dev/disk/by-uuid entries were (we believe) being created by the the udev watches in /lib/udev/rules.d/60-block.rules. However, the watch there does not cover bcache devices.
## /lib/udev/rules.d/60-block.rules
| # watch metadata changes, caused by tools closing the device node which was opened for writing
| ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*", OPTIONS+="watch"
In some debugging of another issue, we realized that installs with root on bcache such as in tests/vmtests/ test_bcache_ basic.py end up booting with root=/dev/bcache0 (or bcache*) rather than UUID=.
This is not good as bcache names are not guaranteed in any order.
The reason this was failing was that when we create a filesystem on /dev/bcache0 no symlinks would be updated in /dev/disk/by-uuid/. The lack of a by-uuid entry causes /etc/grub. d/10_linux to take the 'GRUB_DEVICE' path in
| if [ "x${GRUB_ DEVICE_ UUID}" = "x" ] || [ "x${GRUB_ DISABLE_ LINUX_UUID} " = "xtrue" ] \ by-uuid/ ${GRUB_ DEVICE_ UUID}" \ DEVICE= ${GRUB_ DEVICE} DEVICE= UUID=${ GRUB_DEVICE_ UUID}
| || ! test -e "/dev/disk/
| || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
| LINUX_ROOT_
| else
| LINUX_ROOT_
| fi
For other devices the /dev/disk/by-uuid entries were (we believe) being created by the the udev watches in /lib/udev/ rules.d/ 60-block. rules. However, the watch there does not cover bcache devices.
## /lib/udev/ rules.d/ 60-block. rules ="loop* |nvme*| sd*|vd* |xvd*|pmem* ", OPTIONS+="watch"
| # watch metadata changes, caused by tools closing the device node which was opened for writing
| ACTION!="remove", SUBSYSTEM=="block", KERNEL=