mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-28 01:01:12 -07:00
ffboot: probe slots without a journal replay
A read-only mount of an ext4 slot still replays its journal, which writes to the partition the probe was not meant to touch. The probe mounts with noload: the journal is left as it is and the slot's content is read as it stands. Acceptance: update.slots covers ffboot -l (covers map ffboot/**).
This commit is contained in:
@@ -63,7 +63,7 @@ probe_part () {
|
|||||||
if [ -z "$ROOT_DIR" ]; then
|
if [ -z "$ROOT_DIR" ]; then
|
||||||
P_MOUNTED=yes
|
P_MOUNTED=yes
|
||||||
ROOT_DIR=$(mktemp -d /tmp/ffboot.probe.XXXXXX) || return 1
|
ROOT_DIR=$(mktemp -d /tmp/ffboot.probe.XXXXXX) || return 1
|
||||||
if ! mount -o ro -t ext4 "$1" "$ROOT_DIR" 2>/dev/null; then
|
if ! mount -o ro,noload -t ext4 "$1" "$ROOT_DIR" 2>/dev/null; then
|
||||||
rmdir "$ROOT_DIR" 2>/dev/null
|
rmdir "$ROOT_DIR" 2>/dev/null
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user