When i invoke update-grub I receive an os-prober error. The bug is disrupting /etc/grub.d scripts and upon calling update-grub script several times (eg. multiple kernel installations) grub menu will not be created properly. It can be used to restrict access to remote shared hosts (eg. xen/windows, xen/bsd) and the access there can be impaired or completely impossible. ********* Description: # update-grub Generating grub configuration file ... Fehler: unknown LVM metadata header. (...) Found background image: .background_cache.png Found linux image: /boot/vmlinuz-5.9.0-5-amd64 Found initrd image: /boot/initrd.img-5.9.0-5-amd64 Found linux image: /boot/vmlinuz-X.X.X.X-gentoo-x86_64 Found initrd image: /boot/initramfs-X.X.X.X-gentoo-x86_64.img rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt rmdir: konnte '/var/lib/os-prober/mount' nicht entfernen: Das Gerät oder die Ressource ist belegt Adding boot menu entry for EFI firmware configuration done ********** Walkaround: #umount /var/lib/os-prober/mount ********** # update-grub Generating grub configuration file ... Fehler: unknown LVM metadata header. Found background image: .background_cache.png Fehler: unknown LVM metadata header. (...) Found linux image: /boot/vmlinuz-5.9.0-5-amd64 Found initrd image: /boot/initrd.img-5.9.0-5-amd64 Found linux image: /boot/vmlinuz-X.X.X.X-gentoo-x86_64 Found initrd image: /boot/initramfs-X.X.X.X-gentoo-x86_64.img grub-probe: Fehler: Laufwerk »lvmid/d0hDDB-bYf3-yoK8-IaTk-bben-cTKY- smX8jy/NpHyxT-HeoR-fXwP-BHUe-wshk-TExO-9DEKJ2« wurde nicht gefunden.. Found Windows Boot Manager on /dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi Found Gentoo/Linux on /dev/sdd4 Fehler: unknown LVM metadata header. /usr/sbin/grub-probe: Fehler: Laufwerk »lvmid/d0hDDB-bYf3-yoK8-IaTk-bben-cKTY- smX8jy/NpHyxT-HeoR-fXwP-BHUe-wshk-TExO-9DEKJ2« wurde nicht gefunden.. Found Gentoo/Linux on /dev/mapper/vg02-lv426 Adding boot menu entry for EFI firmware configuration done ********** All seems working fine around os-prober. ********** Possible walkaround "patch" ********** Open the file: @/etc/grub.d/00_header #!/bin/sh set -e #just after the header add two following lines and save: echo "umount remaining os-prober" exec umount /var/lib/os-prober/mount ***** execute #update-grub