lvm misdetected: as root=dm-2; should be dm-0 or rhel7-root

Bug #1893454 reported by Mustafa Kocaturk
6
This bug affects 1 person
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-0-rescue-094290ad3c25419d9b671b141b6ea616 root=/dev/dm-0
---
> linux /vmlinuz-0-rescue-094290ad3c25419d9b671b141b6ea616 root=/dev/dm-2
333c333
< linux /vmlinuz-0-rescue-094290ad3c25419d9b671b141b6ea616 root=/dev/dm-0
---
> linux /vmlinuz-0-rescue-094290ad3c25419d9b671b141b6ea616 root=/dev/dm-2
345c345
< linux /vmlinuz-3.10.0-862.3.2.el7.x86_64 root=/dev/dm-0
---
> linux /vmlinuz-3.10.0-862.3.2.el7.x86_64 root=/dev/dm-2

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-Z620-Workstation:~/Desktop Fri Aug 28 11:39:11 1 1 $ sudo dmsetup ls
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-Z620-Workstation:~/Desktop Fri Aug 28 11:39:58 1 0 $ ls -l /dev/dm-*
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.

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.