diff --git a/meta/classes/image-postproc-extension.bbclass b/meta/classes/image-postproc-extension.bbclass
index 4a901cb..7e3b8e0 100644
--- a/meta/classes/image-postproc-extension.bbclass
+++ b/meta/classes/image-postproc-extension.bbclass
@@ -53,15 +53,14 @@ image_postprocess_mark() {
         --build-id "${BUILD_ID}" --variant "${DESCRIPTION}" --version "${PV}"
 }
 
+ENABLE_SYSTEMD_FIRST_BOOT ??= "0"
 ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_machine_id"
 image_postprocess_machine_id() {
-    # systemd(1) takes care of recreating the machine-id on first boot
-    # for systemd < v247, set to empty string, else set to uninitialized
-    # (required if initramfs with ro root is used)
     SYSTEMD_VERSION=$( sudo chroot ${IMAGE_ROOTFS} dpkg-query --showformat='${source:Upstream-Version}' --show systemd || echo "0" )
-    MACHINE_ID="uninitialized"
-    if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; then
-        MACHINE_ID=""
+    MACHINE_ID=""
+    if [ "${ENABLE_SYSTEMD_FIRST_BOOT}" = "1" ] && \
+        dpkg --compare-versions "$SYSTEMD_VERSION" "gt" "247"; then
+        MACHINE_ID="uninitialized"
     fi
     echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine-id'
     sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id'
