lvm misdetected: as root=dm-2; should be dm-0 or rhel7-root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-prober (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This is a problem that requires editing the grub.cfg after every update as follows:
diff -r1.2 /boot/grub/grub.cfg
320c320
< linux /vmlinuz-
---
> linux /vmlinuz-
333c333
< linux /vmlinuz-
---
> linux /vmlinuz-
345c345
< linux /vmlinuz-
---
> linux /vmlinuz-
The target kernel expects to find the root filesystem on dm-0, also known as rhel_smt2-root, not on dm-2.
However, Ubuntu kernel numbers the dm-* devices differently, as follows:
mu@mu-HP-
200828_113958
rhel_smt2-swap (253:4)
rhel_smt2-root (253:2)
vgubuntu-root (253:0)
vgubuntu-swap_1 (253:1)
rhel_smt2-home (253:3)
mu@mu-HP-
200828_114013
brw-rw---- 1 root disk 253, 0 Aug 28 10:30 /dev/dm-0
brw-rw---- 1 root disk 253, 1 Aug 28 10:30 /dev/dm-1
brw-rw---- 1 root disk 253, 2 Aug 28 10:30 /dev/dm-2
brw-rw---- 1 root disk 253, 3 Aug 28 10:30 /dev/dm-3
brw-rw---- 1 root disk 253, 4 Aug 28 10:30 /dev/dm-4
That is, the dm- minor device numbering differs.
Symptom: The boot menuentry breaks whenever os-update is called, practically after every new kernel update, and rhel7 becomes unbootable.
Suggested workaround: Use the OS-defined name, rhel_smt2-root, instead of dm-2 in the root= parameter. Reverse lookup of minor device number in the first table gives the OS name.