# Create /dev/disk/by-id/lvm-pv-uuid-<PV_UUID> symlink for each PV
ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-id/lvm-pv-uuid-$env{ID_FS_UUID_ENC}"
That is the difference causing the problem, and installer should NOT have that udev rule in order for not to have to change any logic in init scripts for grub device detection.
xenial - does not ask device to grub-install, finds /dev/vda correctly
~ # pvs
PV VG Fmt Attr PSize PFree
/dev/vda5 ubuntu-vg lvm2 a-- 29.28g 40.00m
~ # vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 2 0 wz--n- 29.28g 40.00m
~ # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu-vg -wi-ao---- 28.29g
swap_1 ubuntu-vg -wi-ao---- 976.00m
~ # ls -lah1 /dev/disk/by-id/ ubuntu- -vg-root -> ../../dm-0 ubuntu- -vg-swap_ 1 -> ../../dm-1 LVM-rKxFFLzSxoQ E5R09qa8ztKdfGK ZIxktySnE1WunTp z1cKQt8elMkWyzX F25Dhqgt -> ../../dm-0 LVM-rKxFFLzSxoQ E5R09qa8ztKdfGK ZIxktyoOA5IYfjt okmG0cVkmlrLRZf r0gbBZCh -> ../../dm-1
drwxr-xr-x 2 120 Oct 2 17:54 .
drwxr-xr-x 5 100 Oct 2 18:05 ..
lrwxrwxrwx 1 10 Oct 2 18:07 dm-name-
lrwxrwxrwx 1 10 Oct 2 18:05 dm-name-
lrwxrwxrwx 1 10 Oct 2 18:07 dm-uuid-
lrwxrwxrwx 1 10 Oct 2 18:05 dm-uuid-
/lib/udev/rules.d # grep -ril lvm * storage- dm.rules
55-dm.rules
60-persistent-
----
bionic - does not ask device to grub-install, finds /dev/vda correctly
PV VG Fmt Attr PSize PFree
/dev/vda1 ubuntu-vg lvm2 a-- <30.00g 12.00m
~ # vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 2 0 wz--n- <30.00g 12.00m
~ # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu-vg -wi-ao---- 29.03g
swap_1 ubuntu-vg -wi-ao---- 976.00m
~ # ls -lah1 /dev/disk/by-id/ ubuntu- -vg-root -> ../../dm-0 ubuntu- -vg-swap_ 1 -> ../../dm-1 LVM-tuUboqieQsJ tu1wB4OyTbAT5pR wXxZj7C8q7wogJH SUaOrIBRvJ2GL7Z cRFz4nCe -> ../../dm-0 LVM-tuUboqieQsJ tu1wB4OyTbAT5pR wXxZj7d1U7ckfbg o1bRtQnDa5XQsao XSpjCvfV -> ../../dm-1
drwxr-xr-x 2 root root 120 Oct 2 18:10 .
drwxr-xr-x 6 root root 120 Oct 2 18:27 ..
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-name-
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-name-
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-uuid-
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-uuid-
/lib/udev/rules.d # grep -ril lvm * storage- dm.rules
55-dm.rules
60-persistent-
95-dm-notify.rules
----
disco - does not ask, but has only /dev/vda to choose
~ # pvs
PV VG Fmt Attr PSize PFree
/dev/vda1 ubuntu-vg lvm2 a-- <30.00g 12.00m
~ # vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 2 0 wz--n- <30.00g 12.00m
~ # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu-vg -wi-ao---- 29.03g
swap_1 ubuntu-vg -wi-ao---- 976.00m
~ # ls -lah1 /dev/disk//by-id/ ubuntu- -vg-root -> ../../dm-0 ubuntu- -vg-swap_ 1 -> ../../dm-1 LVM-qBHgS7hD0Uk 4hjhprGFLVwCUek U0i6OBbMg8u7PfV rnT4mcYKuKXRqI4 ehzM7pLX -> ../../dm-0 LVM-qBHgS7hD0Uk 4hjhprGFLVwCUek U0i6OBjuHfJCKZ6 aVKKmZHq2VxntLe R46xIexG -> ../../dm-1
drwxr-xr-x 2 root root 120 Oct 2 18:09 .
drwxr-xr-x 6 root root 120 Oct 2 18:27 ..
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-name-
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-name-
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-uuid-
lrwxrwxrwx 1 root root 10 Oct 2 18:27 dm-uuid-
/lib/udev/rules.d # grep -ril lvm * storage- dm.rules
55-dm.rules
60-persistent-
95-dm-notify.rules
----
eoan - asks device to grub-install and shows /dev/mapper as default
~ # pvs
PV VG Fmt Attr PSize PFree
/dev/vda1 vgubuntu lvm2 a-- <30.00g 12.00m
~ # vgs
VG #PV #LV #SN Attr VSize VFree
vgubuntu 1 2 0 wz--n- <30.00g 12.00m
~ # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vgubuntu -wi-ao---- 29.03g
swap_1 vgubuntu -wi-ao---- 976.00m
~ # ls -lah1 /dev/disk/by-id/ vgubuntu- root -> ../../dm-0 vgubuntu- swap_1 -> ../../dm-1 LVM-uUYPMknWpQf kO3t3oKjW16vWmU eeTItFH9kCscuyN WWYybHdrB9ZENbF XKkJZUfb -> ../../dm-1 LVM-uUYPMknWpQf kO3t3oKjW16vWmU eeTItFfFw10F8np YWNaZWovPClX8tb ARfym9zo -> ../../dm-0 uuid-iXIOdp- tXsj-ditG- JaUC-8flA- XV51-RFV778 -> ../../vda1
drwxr-xr-x 2 root root 160 Oct 2 19:25 .
drwxr-xr-x 7 root root 140 Oct 2 19:25 ..
lrwxrwxrwx 1 root root 10 Oct 2 19:25 dm-name-
lrwxrwxrwx 1 root root 10 Oct 2 19:25 dm-name-
lrwxrwxrwx 1 root root 10 Oct 2 19:25 dm-uuid-
lrwxrwxrwx 1 root root 10 Oct 2 19:25 dm-uuid-
lrwxrwxrwx 1 root root 10 Oct 2 19:25 lvm-pv-
/lib/udev/rules.d # grep -ril lvm * storage- dm.rules
55-dm.rules
56-lvm.rules
60-persistent-
69-lvm-metad.rules
95-dm-notify.rules
in 69-lvm-metad.rules:
# Create /dev/disk/ by-id/lvm- pv-uuid- <PV_UUID> symlink for each PV FS_UUID_ ENC}==" ?*", SYMLINK+ ="disk/ by-id/lvm- pv-uuid- $env{ID_ FS_UUID_ ENC}"
ENV{ID_
That is the difference causing the problem, and installer should NOT have that udev rule in order for not to have to change any logic in init scripts for grub device detection.
----