We need the /run/udev bind-mount to be present also when doing VM
installations for buster and newer, otherwise the installation
takes loooong due to the:
| WARNING: Device /dev/... not initialized in udev database even after waiting
10000000 microseconds
bug. As the /run/udev bind-mount is already gone we need
to resurrect before invoking update-grub in the VM installation.
rm -f "${MNTPOINT}/tmp/core.img"
fi
rm -f "${MNTPOINT}/tmp/core.img"
fi
+ # workaround for Debian bug #918590 with lvm + udev:
+ # WARNING: Device /dev/... not initialized in udev database even after waiting 10000000 microseconds
+ if [ -d /run/udev ] ; then
+ einfo "Setting up bind-mount /run/udev"
+ mkdir -p "${MNTPOINT}"/run/udev
+ mount --bind /run/udev "${MNTPOINT}"/run/udev
+ eend $?
+ fi
+
einfo "Updating grub configuration file."
chroot "${MNTPOINT}" update-grub
einfo "Updating grub configuration file."
chroot "${MNTPOINT}" update-grub
sed -i "s;root=[^ ]\\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg
fi
sed -i "s;root=[^ ]\\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg
fi
+ # workaround for Debian bug #918590 with lvm + udev:
+ # WARNING: Device /dev/... not initialized in udev database even after waiting 10000000 microseconds
+ if mountpoint "${MNTPOINT}"/run/udev &>/dev/null ; then
+ einfo "Unmounting bind-mount /run/udev"
+ umount "${MNTPOINT}"/run/udev
+ eend $?
+ fi
+
umount "${MNTPOINT}"/proc
umount "${MNTPOINT}"/sys
umount "${MNTPOINT}"/dev/pts
umount "${MNTPOINT}"/proc
umount "${MNTPOINT}"/sys
umount "${MNTPOINT}"/dev/pts