From f78f761be9c5b9ef65b61d8db5bed1d2c91df612 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Mon, 9 Mar 2026 21:23:26 -0600 Subject: [PATCH] Error handling for /newroot mount during single-stage boot Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 2 ++ overlays/wwinit/rootfs/init | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be445ea7..99052b72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Allow whitespace to be trimmed for wwdoc comments. #2109 - update go-chi to 5.2.5 to fix CVE-2025-69725 - Prevented profile `comment` field from being inherited by nodes. #2078 +- Error handling for /newroot mount during single-stage boot +- Bugfix for command-line arguments during single-stage image unpacking ### Added diff --git a/overlays/wwinit/rootfs/init b/overlays/wwinit/rootfs/init index 239822e4..345ff590 100755 --- a/overlays/wwinit/rootfs/init +++ b/overlays/wwinit/rootfs/init @@ -52,9 +52,10 @@ else else mount ${WWROOT} /newroot fi + mountpoint -q /newroot || die "warewulf: ERROR: failed to mount ${WWROOT} at /newroot" info "warewulf: copying image to /newroot..." - tar -cf - --exclude ./proc --exclude ./sys --exclude ./dev --exclude --exclude ./newroot . | tar -xf - -C /newroot + tar -cf - --exclude ./proc --exclude ./sys --exclude ./dev --exclude ./newroot . | tar -xf - -C /newroot mkdir /newroot/proc /newroot/dev /newroot/sys 2>/dev/null