Fix Kiosk boot issue in latest Ventoy release. (#1446)

This commit is contained in:
longpanda 2022-02-15 23:59:28 +08:00
parent 045f53d768
commit d0f3597b26

View file

@ -78,9 +78,15 @@ ventoy_unpack_initramfs() {
rm -f $VTOY_PATH/xzlog rm -f $VTOY_PATH/xzlog
${vtx:5} $vtfile 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp) ${vtx:5} $vtfile 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
if grep -q 'corrupted data' $VTOY_PATH/xzlog; then if grep -q 'corrupted data' $VTOY_PATH/xzlog; then
echo 'xzcat failed, now try xzcat_musl ...' >> $VTLOG echo 'xzcat failed, now try xzminidec...' >> $VTLOG
rm -f $VTOY_PATH/xzlog
cat $vtfile | xzminidec 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
if grep -q 'limit' $VTOY_PATH/xzlog; then
echo 'xzminidec failed, now try xzcat_musl ...' >> $VTLOG
xzcat_musl $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp) xzcat_musl $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
fi fi
fi
else else
${vtx:5} $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp) ${vtx:5} $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
fi fi