mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
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) <noreply@anthropic.com>
This commit is contained in:
parent
82dd7782d3
commit
1bc337bfb4
1 changed files with 10 additions and 2 deletions
|
|
@ -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 ------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue