diff --git a/IMG/cpio/sbin/init b/IMG/cpio/sbin/init index 3fd3cc5e..15686c4e 100644 --- a/IMG/cpio/sbin/init +++ b/IMG/cpio/sbin/init @@ -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 diff --git a/IMG/cpio/ventoy/hook/arch/ventoy-disk.sh b/IMG/cpio/ventoy/hook/arch/ventoy-disk.sh index c1765376..31e65f09 100644 --- a/IMG/cpio/ventoy/hook/arch/ventoy-disk.sh +++ b/IMG/cpio/ventoy/hook/arch/ventoy-disk.sh @@ -49,7 +49,12 @@ done if [ -n "$1" ]; then vtlog "ln -s /dev/$vtDM $1" - 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,7 +64,11 @@ else vtlog "vtLABEL is $vtLABEL from cmdline" fi - ln -s /dev/$vtDM "/dev/disk/by-label/$vtLABEL" + 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 diff --git a/IMG/cpio/ventoy/init_chain b/IMG/cpio/ventoy/init_chain index 6f87a5d2..a2feafa8 100644 --- a/IMG/cpio/ventoy/init_chain +++ b/IMG/cpio/ventoy/init_chain @@ -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 diff --git a/IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz b/IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz new file mode 100644 index 00000000..78563c4b Binary files /dev/null and b/IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz differ diff --git a/IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz b/IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz new file mode 100644 index 00000000..98e453b4 Binary files /dev/null and b/IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz differ