diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install index 3359ec227c..0ae07fcf32 100755 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -85,7 +85,10 @@ fi KERNEL_VERSION="$1" KERNEL_IMAGE="$2" -if [[ -f /etc/machine-id ]]; then +# Reuse directory created without a machine ID present if it exists. +if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then + MACHINE_ID="Default" +elif [[ -f /etc/machine-id ]]; then read MACHINE_ID < /etc/machine-id else MACHINE_ID="Default"