mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-11-16 10:53:14 +01:00
Fix Persistence intermittently fails on Ubuntu 24.04 (#3718)
This commit is contained in:
@@ -31,6 +31,19 @@ if [ -e /init ] && $GREP -q '^mountroot$' /init; then
|
||||
$SED "s#^ *LIVEMEDIA=.*#LIVEMEDIA=/dev/mapper/ventoy#" -i /scripts/casper
|
||||
fi
|
||||
fi
|
||||
|
||||
#workaround for issue #3718
|
||||
if [ -f $VTOY_PATH/ventoy_persistent_map -a -f /scripts/casper-helpers ]; then
|
||||
echo 'fix casper cow udev issue' >> $VTLOG
|
||||
if $GREP -q '^find_cow_device\(\).*{' /scripts/casper-helpers; then
|
||||
VTINS_LINE=$($GREP -n '^find_cow_device\(\).*{' /scripts/casper-helpers | $AWK -F':' '{print $1}')
|
||||
$AWK "NR < $VTINS_LINE" /scripts/casper-helpers > /ventoy/casper-helpers-tmp
|
||||
$CAT $VTOY_PATH/hook/debian/casper-perst-wa.sh >> /ventoy/casper-helpers-tmp
|
||||
$AWK "NR > $VTINS_LINE" /scripts/casper-helpers >> /ventoy/casper-helpers-tmp
|
||||
$CAT /ventoy/casper-helpers-tmp > /scripts/casper-helpers
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ -e "$CD_DETECT" ]; then
|
||||
echo "$CD_DETECT exist, now add hook in it..." >> $VTLOG
|
||||
$SED "1 a $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/disk_mount_hook.sh" -i "$CD_DETECT"
|
||||
|
||||
Reference in New Issue
Block a user