'sudo update-grub' and resultant 'device-mapper: reload ioctl on osprober-linux-sda4 failed: Device or resource busy'

If you're running Zorin OS with the ZFS file system, whenever you make a change to grub then run sudo update-grub, you'll notice several errors:

device-mapper: reload ioctl on osprober-linux-sda4 failed: Device or resource busy
Command failed.

This is because os_prober doesn't properly handle ZFS-owned storage devices... they're not really 'mounted', so os_prober errors out.

There's a work-around. In grub, you can put the lines:

# Prevent 'device-mapper: reload ioctl on osprober-linux-sda4 failed: Device or resource busy Command failed.' on sudo update-grub.
GRUB_DISABLE_OS_PROBER=true

It takes effect immediately.

One caveat: Doing the above will disable Grub from finding other OS's, so if you're dual-booting Windows, the Grub menu will no longer have Windows in it. Ubuntu 22.04 disabled OS Prober due to a potential security hole... and thus it doesn't put Windows into the Grub menu by default... the fix is:
sudoedit /etc/default/grub

Put this line into the grub file:

# Enable putting Windows into grub menu
GRUB_DISABLE_OS_PROBER=false

... save the file, exit your text editor then:
sudo update-grub

1 Like

Thanks for sharing. I am still sticking with Ext4 FS. :wink: