mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-04-08 05:35:41 -04:00
fix SystemRescue 11.02 boot (#2958)
This commit is contained in:
parent
b11c38779d
commit
6411db58ef
28
IMG/cpio/ventoy/init_chain
Normal file → Executable file
28
IMG/cpio/ventoy/init_chain
Normal file → Executable file
@ -72,26 +72,24 @@ ventoy_unpack_initramfs() {
|
|||||||
|
|
||||||
for vtx in '1F8B zcat' '1F9E zcat' '425A bzcat' '5D00 lzcat' 'FD37 xzcat' '894C lzopcat' '0221 lz4cat' '28B5 zstdcat' '3037 cat' '4C5A lunzip -c'; do
|
for vtx in '1F8B zcat' '1F9E zcat' '425A bzcat' '5D00 lzcat' 'FD37 xzcat' '894C lzopcat' '0221 lz4cat' '28B5 zstdcat' '3037 cat' '4C5A lunzip -c'; do
|
||||||
if [ "${vtx:0:4}" = "${vtmagic:0:4}" ]; then
|
if [ "${vtx:0:4}" = "${vtmagic:0:4}" ]; then
|
||||||
echo "vtx=$vtx" >> $VTLOG
|
echo "vtx=$vtx" >> $VTLOG
|
||||||
if [ $vtskip -eq 0 ]; then
|
dd if=$vtfile skip=$vtskip of=$vttmp iflag=skip_bytes status=none
|
||||||
if [ "${vtx:5}" = "xzcat" ]; then
|
mv $vttmp $vtfile
|
||||||
|
if [ "${vtx:5}" = "xzcat" ]; then
|
||||||
|
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 xzminidec...' >> $VTLOG
|
||||||
rm -f $VTOY_PATH/xzlog
|
rm -f $VTOY_PATH/xzlog
|
||||||
${vtx:5} $vtfile 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
cat $vtfile | xzminidec 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
||||||
if grep -q 'corrupted data' $VTOY_PATH/xzlog; then
|
|
||||||
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
|
if grep -q 'limit' $VTOY_PATH/xzlog; then
|
||||||
echo 'xzminidec failed, now try xzcat_musl ...' >> $VTLOG
|
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
|
|
||||||
${vtx:5} $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dd if=$vtfile skip=$vtskip iflag=skip_bytes status=none | ${vtx:5} | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
${vtx:5} $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
||||||
fi
|
fi
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user