Error handling for /newroot mount during single-stage boot

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2026-03-09 21:23:26 -06:00
parent 7b5d2de6ad
commit f78f761be9
2 changed files with 4 additions and 1 deletions

View File

@@ -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