From 1bc337bfb409d2deb8f394face1d19d5d09d2616 Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 28 May 2026 13:38:05 -0600 Subject: [PATCH] Addressing Greptile P2s on the Ventoy ephemeral fallback. - Treat virtual disks (vd*/xvd*/hd*) as direct, not ephemeral. A blank VM disk imaged with the ISO can safely hold a persistence partition; previously these fell through the wildcard to loop mode and never accumulated state. - Move the ephemeral note_action inside the mountpoint guard so a manual wrolpi-bootstrap.service restart mid-session doesn't re-fire the "NOT writing to disk" first-boot dialog. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../usr/local/sbin/wrolpi-bootstrap.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/debian-live-config/config/includes.chroot/usr/local/sbin/wrolpi-bootstrap.sh b/debian-live-config/config/includes.chroot/usr/local/sbin/wrolpi-bootstrap.sh index 073ddf4d..a9b54555 100644 --- a/debian-live-config/config/includes.chroot/usr/local/sbin/wrolpi-bootstrap.sh +++ b/debian-live-config/config/includes.chroot/usr/local/sbin/wrolpi-bootstrap.sh @@ -81,7 +81,12 @@ for mp in /usr/lib/live/mount/medium /run/live/medium /lib/live/mount/medium; do if part=$(findmnt -nr -o SOURCE "$mp" 2>/dev/null) && [ -n "$part" ]; then LIVE_MEDIUM=$part case "$part" in - /dev/sd*|/dev/nvme*|/dev/mmcblk*) + /dev/sd*|/dev/nvme*|/dev/mmcblk*|/dev/vd*|/dev/xvd*|/dev/hd*) + # Real partitions on real (or virtual) disks: SCSI/USB (sd*), + # NVMe, SD/eMMC (mmcblk*), VirtIO (vd*), Xen (xvd*), legacy + # IDE (hd*). A blank VM disk imaged with the ISO can safely + # hold a persistence partition, so treat virtual disks as direct + # rather than letting them fall through to the ephemeral default. MODE=direct BOOT_DRIVE="/dev/$(lsblk -no PKNAME "$part")" log "live medium $part on $BOOT_DRIVE (mode: direct)" @@ -207,8 +212,11 @@ if [ "$MODE" = "loop" ]; then # exploratory session and capped so we can't OOM the box. mount -t tmpfs -o mode=0755 tmpfs /media/wrolpi log "ephemeral mode: /media/wrolpi is tmpfs (data lost on reboot)" + # Inside the guard so a manual service restart mid-session (tmpfs + # already mounted) doesn't re-trigger the "NOT writing to disk" + # first-boot dialog. + note_action "Running ephemerally from RAM (Ventoy / multiboot USB detected). Your data WILL NOT persist across reboots." fi - note_action "Running ephemerally from RAM (Ventoy / multiboot USB detected). Your data WILL NOT persist across reboots." fi # --- /media/wrolpi/config + Postgres data layout ------------------------