Incompatible libdevmapper on update-grub


#1

Hi!
On updating (or starting update-grub manually) I get:

>>> sudo update-grub                                                                                              
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found linux image: /boot/vmlinuz-4.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.15-x86_64.img
Found initrd fallback image: /boot/initramfs-4.15-x86_64-fallback.img
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Incompatible libdevmapper 1.02.146 (2017-12-18) and kernel driver (unknown version).
Command failed
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Incompatible libdevmapper 1.02.146 (2017-12-18) and kernel driver (unknown version).
Command failed
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

IgnorePkg list is empty.
How to resolve the issue?


Update-grub fail after a kernel update
[Testing Update] 2018-12-02 - Kernels, Pamac, Thunderbird, Texlive
[Testing Update] 2018-04-02 - Kernels, Gnome, Mesa, Pamac, Browsers, GStreamer, LibreOffice, PHP
Update-grub fail after a kernel update
#2

This is a low-level issue; there’s something very wrong with your system.

Output of inxi -Fxxz please.


#3
~ >>> /usr/bin/inxi -Fxxz                                                                                           
System:    Host: nas Kernel: 4.16.0-1-MANJARO x86_64 bits: 64 compiler: gcc v: 7.3.1 Console: tty 0 dm: N/A 
           Distro: Manjaro Linux 17.1.7 Hakoila 
Machine:   Type: Desktop Mobo: Gigabyte model: G41MT-D3 v: x.x serial: N/A BIOS: Award v: F1 date: 05/04/2010 
CPU:       Topology: Dual Core model: Intel Celeron E3200 type: MCP arch: Penryn rev: 10 L2 cache: 1024 KB 
           flags: lm nx pae sse sse2 sse3 ssse3 vmx bogomips: 9599 
           Speed: 1202 MHz min/max: 1200/2400 MHz Core speeds (MHz): 1: 1972 2: 1935 
Graphics:  Card-1: Intel 4 Series Integrated Graphics Controller driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:2e32 
           Display Server: No display server data found. Headless server? tty: 117x27 
           Message: Advanced graphics data unavailable in console. Try -G --display 
Audio:     Card-1: C-Media Inc CMI8788 [Oxygen HD Audio] driver: snd_oxygen v: kernel bus ID: 02:04.0 
           chip ID: 13f6:8788 
           Sound Server: ALSA v: k4.16.0-1-MANJARO 
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8168 
           v: 8.045.08-NAPI port: de00 bus ID: 04:00 chip ID: 10ec:8168 
           IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    HDD Total Size: 3.75 TiB used: 1.40 TiB (37.4%) 
           ID-1: /dev/sda model: SPCC_Solid_State size: 111.79 GiB serial: <filter> temp: 33 C 
           ID-2: /dev/sdb model: WDC_WD20EZRZ-00Z size: 1.82 TiB serial: <filter> temp: 38 C 
           ID-3: /dev/sdc model: WDC_WD20EZRZ-00Z size: 1.82 TiB serial: <filter> temp: 38 C 
RAID:      Device-1: data type: zfs status: ONLINE size: 1.81 TiB free: 431.00 GiB size: 1.81 TiB 
           free: 431.00 GiB components: online: N/A 
Partition: ID-1: / size: 109.04 GiB used: 10.30 GiB (9.4%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 41.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 731 fan-2: 760 
Info:      Processes: 146 Uptime: 29 min Memory: 3.82 GiB used: 1.79 GiB (46.8%) Init: systemd v: 238 
           Compilers: gcc: 7.3.1 clang: 6.0.0 Shell: zsh v: 5.4.2 running in: tty 0 inxi: 2.9.08 
~ >>>        

[Stable Update] 2018-08-18 - Kernels, Xorg-Server, Mesa, Deepin, MATE, Perl, Python
#4

Hmm… I wonder whether this is a regression in 4.16, or simply that you haven’t rebooted after the kernel update. But if you can’t reboot until after you’ve run an update-grub that’s a horrible Catch-22.

Edit: update-grub working fine for me with 4.16.


#5

The issue has appeared before 4.16, and at both cases with 4.15 and (now) with 4.16 kernels the system can be rebooted. I don’t see any other signs of malfunctions (it is self-made headless NAS).


#6

Hmm… OK. Let’s dig into device-mapper:

pacman -Qi device-mapper
ls -l /usr/lib/*devmapper*
Mine
$ pacman -Qi device-mapper
Name            : device-mapper
Version         : 2.02.177-5
Description     : Device mapper userspace library and tools
Architecture    : x86_64
URL             : http://sourceware.org/dm/
Licenses        : GPL2  LGPL2.1
Groups          : base
Provides        : None
Depends On      : glibc  libsystemd
Optional Deps   : None
Required By     : cryptsetup  dmraid  docker  grub  lvm2  nfs-utils  parted
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 806.00 KiB
Packager        : Christian Hesse <arch@eworm.de>
Build Date      : Mon 12 Mar 2018 16:06:36 GMT
Install Date    : Tue 13 Mar 2018 20:41:37 GMT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
$ ls -l /usr/lib/*devmapper*
lrwxrwxrwx 1 root root     46 Mar 12 16:06 /usr/lib/libdevmapper-event-lvm2mirror.so -> device-mapper/libdevmapper-event-lvm2mirror.so
lrwxrwxrwx 1 root root     44 Mar 12 16:06 /usr/lib/libdevmapper-event-lvm2raid.so -> device-mapper/libdevmapper-event-lvm2raid.so
lrwxrwxrwx 1 root root     48 Mar 12 16:06 /usr/lib/libdevmapper-event-lvm2snapshot.so -> device-mapper/libdevmapper-event-lvm2snapshot.so
lrwxrwxrwx 1 root root     31 Mar 12 16:06 /usr/lib/libdevmapper-event-lvm2.so -> libdevmapper-event-lvm2.so.2.02
-r-xr-xr-x 1 root root  14504 Mar 12 16:06 /usr/lib/libdevmapper-event-lvm2.so.2.02
lrwxrwxrwx 1 root root     44 Mar 12 16:06 /usr/lib/libdevmapper-event-lvm2thin.so -> device-mapper/libdevmapper-event-lvm2thin.so
lrwxrwxrwx 1 root root     26 Mar 12 16:06 /usr/lib/libdevmapper-event.so -> libdevmapper-event.so.1.02
-r-xr-xr-x 1 root root  29544 Mar 12 16:06 /usr/lib/libdevmapper-event.so.1.02
lrwxrwxrwx 1 root root     20 Mar 12 16:06 /usr/lib/libdevmapper.so -> libdevmapper.so.1.02
-r-xr-xr-x 1 root root 385280 Mar 12 16:06 /usr/lib/libdevmapper.so.1.02

#7
>>> pacman -Qi device-mapper                                                                                      
Name            : device-mapper
Version         : 2.02.177-5
Description     : Device mapper userspace library and tools
Architecture    : x86_64
URL             : http://sourceware.org/dm/
Licenses        : GPL2  LGPL2.1
Groups          : base
Provides        : None
Depends On      : glibc  libsystemd
Optional Deps   : None
Required By     : cryptsetup  dmraid  grub  lvm2  nfs-utils  parted
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 806.00 KiB
Packager        : Christian Hesse <arch@eworm.de>
Build Date      : Mon 12 Mar 2018 07:06:36 PM MSK
Install Date    : Wed 28 Mar 2018 01:02:16 AM MSK
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
>>> ls -l /usr/lib/*devmapper*                                                                                    
lrwxrwxrwx 1 root root     46 Mar 12 19:06 /usr/lib/libdevmapper-event-lvm2mirror.so -> device-mapper/libdevmapper-event-lvm2mirror.so
lrwxrwxrwx 1 root root     44 Mar 12 19:06 /usr/lib/libdevmapper-event-lvm2raid.so -> device-mapper/libdevmapper-event-lvm2raid.so
lrwxrwxrwx 1 root root     48 Mar 12 19:06 /usr/lib/libdevmapper-event-lvm2snapshot.so -> device-mapper/libdevmapper-event-lvm2snapshot.so
lrwxrwxrwx 1 root root     31 Mar 12 19:06 /usr/lib/libdevmapper-event-lvm2.so -> libdevmapper-event-lvm2.so.2.02
-r-xr-xr-x 1 root root  14504 Mar 12 19:06 /usr/lib/libdevmapper-event-lvm2.so.2.02
lrwxrwxrwx 1 root root     44 Mar 12 19:06 /usr/lib/libdevmapper-event-lvm2thin.so -> device-mapper/libdevmapper-event-lvm2thin.so
lrwxrwxrwx 1 root root     26 Mar 12 19:06 /usr/lib/libdevmapper-event.so -> libdevmapper-event.so.1.02
-r-xr-xr-x 1 root root  29544 Mar 12 19:06 /usr/lib/libdevmapper-event.so.1.02
lrwxrwxrwx 1 root root     20 Mar 12 19:06 /usr/lib/libdevmapper.so -> libdevmapper.so.1.02
-r-xr-xr-x 1 root root 385280 Mar 12 19:06 /usr/lib/libdevmapper.so.1.02

#8

OK, so next:

modinfo dm-mod

and if it’s not found,

modprobe dm-mod

and try again.

Mine
$ modinfo dm-mod
filename:       /lib/modules/4.16.0-1-MANJARO/kernel/drivers/md/dm-mod.ko.xz
license:        GPL
author:         Joe Thornber <dm-devel@redhat.com>
description:    device-mapper driver
alias:          devname:mapper/control
alias:          char-major-10-236
srcversion:     FE426B1FF60F688A460378F
depends:        
retpoline:      Y
intree:         Y
name:           dm_mod
vermagic:       4.16.0-1-MANJARO SMP preempt mod_unload modversions 
parm:           reserved_rq_based_ios:Reserved IOs in request-based mempools (uint)
parm:           use_blk_mq:Use block multiqueue for request-based DM devices (bool)
parm:           dm_mq_nr_hw_queues:Number of hardware queues for request-based dm-mq devices (uint)
parm:           dm_mq_queue_depth:Queue depth for request-based dm-mq devices (uint)
parm:           stats_current_allocated_bytes:Memory currently used by statistics (ulong)
parm:           major:The major number of the device mapper (uint)
parm:           reserved_bio_based_ios:Reserved IOs in bio-based mempools (uint)
parm:           dm_numa_node:NUMA node for DM device memory allocations (int)

Incompatible libdevmapper on update from today
#9

Hm, interesting:

 >>> sudo modinfo dm-mod                                                                                           
filename:       /lib/modules/4.16.0-1-MANJARO/kernel/drivers/md/dm-mod.ko.xz
license:        GPL
author:         Joe Thornber <dm-devel@redhat.com>
description:    device-mapper driver
alias:          devname:mapper/control
alias:          char-major-10-236
srcversion:     FE426B1FF60F688A460378F
depends:        
retpoline:      Y
intree:         Y
name:           dm_mod
vermagic:       4.16.0-1-MANJARO SMP preempt mod_unload modversions 
parm:           reserved_rq_based_ios:Reserved IOs in request-based mempools (uint)
parm:           use_blk_mq:Use block multiqueue for request-based DM devices (bool)
parm:           dm_mq_nr_hw_queues:Number of hardware queues for request-based dm-mq devices (uint)
parm:           dm_mq_queue_depth:Queue depth for request-based dm-mq devices (uint)
parm:           stats_current_allocated_bytes:Memory currently used by statistics (ulong)
parm:           major:The major number of the device mapper (uint)
parm:           reserved_bio_based_ios:Reserved IOs in bio-based mempools (uint)
parm:           dm_numa_node:NUMA node for DM device memory allocations (int)


~ >>> sudo modprobe dm-mod                                                                                          
~ >>> sudo update-grub                                                                                              
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found linux image: /boot/vmlinuz-4.16-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.16-x86_64.img
Found initrd fallback image: /boot/initramfs-4.16-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.15-x86_64.img
Found initrd fallback image: /boot/initramfs-4.15-x86_64-fallback.img
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Then rebooted, and update-grub is going OK. Magic…
The only specific thing I see in the system is zfs HDD mirror.


#10

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.