Use ROOT_LABEL variable consistently and add documentation

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-30 18:41:11 +00:00
parent 20115fb370
commit 451b23b8e0
2 changed files with 5 additions and 3 deletions

View File

@@ -7,5 +7,7 @@ if [ -e /boot/grub/grub.cfg ]; then
else
echo "Error: Could not find /boot/grub/grub.cfg"
echo "Press any key to enter GRUB command line..."
# Sleep for a very long time (interruptible by any key press)
# This provides an effective "wait for keypress" in GRUB
sleep --verbose --interruptible 99999
fi

View File

@@ -43,8 +43,8 @@ printf '%s\n' \
'set timeout=3' \
'set default=0' \
'' \
'menuentry "SparkOS (Immutable Base + Overlay)" {' \
' linux /boot/vmlinuz root=LABEL=SparkOS ro init=/sbin/init console=tty1 quiet' \
"menuentry \"SparkOS (Immutable Base + Overlay)\" {" \
" linux /boot/vmlinuz root=LABEL=$ROOT_LABEL ro init=/sbin/init console=tty1 quiet" \
'}' \
> /staging/esp/boot/grub/grub.cfg
@@ -120,7 +120,7 @@ mcopy -i /tmp/esp.img /staging/esp/boot/grub/grub.cfg ::/boot/grub/
# Format root partition (ext4) with directory contents (no mount needed!)
echo "Formatting root partition (ext4) and populating..."
mke2fs -t ext4 -L "SparkOS" -d /staging/root /tmp/root.img >/dev/null 2>&1
mke2fs -t ext4 -L "$ROOT_LABEL" -d /staging/root /tmp/root.img >/dev/null 2>&1
# Write partitions back to image
echo "Writing partitions to image..."