diff --git a/extensions/grub.sh b/extensions/grub.sh index 878d1ab2bc..1eedbc0872 100644 --- a/extensions/grub.sh +++ b/extensions/grub.sh @@ -101,7 +101,7 @@ pre_umount_final_image__install_grub() { } fi - local install_grub_cmdline="update-initramfs -c -k all && update-grub && grub-install --verbose --target=${UEFI_GRUB_TARGET} --no-nvram --removable" # nvram is global to the host, even across chroot. take care. + local install_grub_cmdline="update-grub && grub-install --verbose --target=${UEFI_GRUB_TARGET} --no-nvram --removable" # nvram is global to the host, even across chroot. take care. display_alert "Installing GRUB EFI..." "${UEFI_GRUB_TARGET}" "" chroot "$chroot_target" /bin/bash -c "$install_grub_cmdline" >>"$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { exit_with_error "${install_grub_cmdline} failed!" diff --git a/lib/debootstrap.sh b/lib/debootstrap.sh index 9f6a299a8d..de98f9a0ca 100644 --- a/lib/debootstrap.sh +++ b/lib/debootstrap.sh @@ -763,7 +763,7 @@ update_initramfs() find ${chroot_target}/lib/modules/ -maxdepth 1 -type d -name "*${VER}*" ) if [ "$target_dir" != "" ]; then - update_initramfs_cmd="update-initramfs -uv -k $(basename $target_dir)" + update_initramfs_cmd="TMPDIR=/tmp update-initramfs -uv -k $(basename $target_dir)" else exit_with_error "No kernel installed for the version" "${VER}" fi diff --git a/lib/image-helpers.sh b/lib/image-helpers.sh index 344d9a79ca..0619621c81 100644 --- a/lib/image-helpers.sh +++ b/lib/image-helpers.sh @@ -33,6 +33,7 @@ mount_chroot() { local target=$1 + mount -t tmpfs tmpfs "${target}/tmp" mount -t proc chproc "${target}"/proc mount -t sysfs chsys "${target}"/sys mount -t devtmpfs chdev "${target}"/dev || mount --bind /dev "${target}"/dev @@ -52,11 +53,12 @@ umount_chroot() local target=$1 display_alert "Unmounting" "$target" "info" - while grep -Eq "${target}.*(dev|proc|sys)" /proc/mounts + while grep -Eq "${target}/*(dev|proc|sys|tmp)" /proc/mounts do umount -l --recursive "${target}"/dev >/dev/null 2>&1 umount -l "${target}"/proc >/dev/null 2>&1 umount -l "${target}"/sys >/dev/null 2>&1 + umount -l "${target}"/tmp >/dev/null 2>&1 sleep 5 done