diff --git a/live-build/auto/build b/live-build/auto/build index 3a964636..8f4cf05d 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -261,14 +261,14 @@ EOF chmod +x chroot/usr/bin/man fi - divert_grub chroot if [ -n "${PASSES}" ]; then PATH="config/:$PATH" lb chroot_layered "$@" else + divert_grub chroot divert_update_initramfs lb chroot "$@" + undivert_grub chroot fi - undivert_grub chroot # Let all configuration non multi-layered project here. # If those are moving to a multi-layer layout, this needs to be diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 3a3d50c0..113c7e30 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -175,6 +175,10 @@ create_chroot_pass () { lb chroot_devpts install ${*} lb chroot_proc install ${*} lb chroot_sysfs install ${*} + + # grub-probe should not be called as part of an image build so divert it + divert_grub chroot + # We run chroot_hacks only on root layers (update-initramfs diverted) if $(is_root_layer $pass); then divert_update_initramfs @@ -245,6 +249,9 @@ create_chroot_pass () { Chroot chroot "dpkg-query -W" > chroot.packages.${pass} + # Restore grub + undivert_grub chroot + # Deconfiguring chroot if $(is_root_layer $pass); then lb chroot_archives chroot remove ${*}