From d0f3597b265bbe9796a58dedf2f781a1b5d7470e Mon Sep 17 00:00:00 2001 From: longpanda Date: Tue, 15 Feb 2022 23:59:28 +0800 Subject: [PATCH] Fix Kiosk boot issue in latest Ventoy release. (#1446) --- IMG/cpio/ventoy/init_chain | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/IMG/cpio/ventoy/init_chain b/IMG/cpio/ventoy/init_chain index a2feafa8..7f78e538 100644 --- a/IMG/cpio/ventoy/init_chain +++ b/IMG/cpio/ventoy/init_chain @@ -78,8 +78,14 @@ ventoy_unpack_initramfs() { rm -f $VTOY_PATH/xzlog ${vtx:5} $vtfile 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp) if grep -q 'corrupted data' $VTOY_PATH/xzlog; then - echo 'xzcat failed, now try xzcat_musl ...' >> $VTLOG - xzcat_musl $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp) + 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) + fi fi else ${vtx:5} $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)