mirror of
https://github.com/ventoy/Ventoy.git
synced 2024-11-11 13:10:38 +00:00
Fix the issue when booting latest systemrescue
This commit is contained in:
parent
006f26d07d
commit
86b13727ca
@ -115,6 +115,8 @@ fi
|
||||
|
||||
if [ "$VTOY_ARCH" = "x86_64" ]; then
|
||||
echo "Use x86_64 busybox toolkit ..." >>$VTLOG
|
||||
$BUSYBOX_PATH/xzcat $BUSYBOX_PATH/xzcat64_musl.xz > $BUSYBOX_PATH/xzcat_musl
|
||||
$BUSYBOX_PATH/chmod +x $BUSYBOX_PATH/xzcat_musl
|
||||
ln -s $BUSYBOX_PATH/xzminidec64 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetup64 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzip64 $VTOY_PATH/tool/lunzip
|
||||
@ -124,6 +126,8 @@ if [ "$VTOY_ARCH" = "x86_64" ]; then
|
||||
ln -s $VTOY_PATH/tool/zstdcat64 $VTOY_PATH/tool/zstdcat
|
||||
elif [ "$VTOY_ARCH" = "i386" ]; then
|
||||
echo "Use i386 busybox toolkit ..." >>$VTLOG
|
||||
$BUSYBOX_PATH/xzcat $BUSYBOX_PATH/xzcat32_musl.xz > $BUSYBOX_PATH/xzcat_musl
|
||||
$BUSYBOX_PATH/chmod +x $BUSYBOX_PATH/xzcat_musl
|
||||
ln -s $BUSYBOX_PATH/xzminidec32 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetup32 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzip32 $VTOY_PATH/tool/lunzip
|
||||
|
@ -49,7 +49,12 @@ done
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
vtlog "ln -s /dev/$vtDM $1"
|
||||
|
||||
if [ -e "$1" ]; then
|
||||
vtlog "$1 already exist"
|
||||
else
|
||||
ln -s /dev/$vtDM "$1"
|
||||
fi
|
||||
else
|
||||
vtLABEL=$($BUSYBOX_PATH/blkid /dev/$vtDM | $SED 's/.*LABEL="\([^"]*\)".*/\1/')
|
||||
vtlog "vtLABEL is $vtLABEL"
|
||||
@ -59,8 +64,12 @@ else
|
||||
vtlog "vtLABEL is $vtLABEL from cmdline"
|
||||
fi
|
||||
|
||||
if [ -e "/dev/disk/by-label/$vtLABEL" ]; then
|
||||
vtlog "$1 already exist"
|
||||
else
|
||||
ln -s /dev/$vtDM "/dev/disk/by-label/$vtLABEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
# OK finish
|
||||
set_ventoy_hook_finish
|
||||
|
@ -77,12 +77,10 @@ ventoy_unpack_initramfs() {
|
||||
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
|
||||
cat $vtfile | xzminidec | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
||||
echo 'xzcat failed, now try xzcat_musl ...' >> $VTLOG
|
||||
xzcat_musl $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
||||
fi
|
||||
|
||||
else
|
||||
${vtx:5} $vtfile | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
||||
fi
|
||||
|
BIN
IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz
Normal file
BIN
IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz
Normal file
Binary file not shown.
BIN
IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz
Normal file
BIN
IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user