X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/6ded3355272edb9af63d97aad646bbd7c6f12583..HEAD:/IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh diff --git a/IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh b/IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh index 5fc8bf1..86dce82 100644 --- a/IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh +++ b/IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh @@ -36,7 +36,7 @@ if [ "$vtdiskname" = "unknown" ]; then exit 0 fi -if echo $vtdiskname | egrep -q "nvme.*p[0-9]$|mmc.*p[0-9]$"; then +if echo $vtdiskname | egrep -q "nvme.*p[0-9]$|mmc.*p[0-9]$|nbd.*p[0-9]$"; then vPart="${vtdiskname}p2" else vPart="${vtdiskname}2" @@ -45,8 +45,15 @@ fi # TinyCore linux distro doesn't contain dmsetup, we use aoe here sudo modprobe aoe aoe_iflist=lo if [ -e /sys/module/aoe ]; then - VBLADE_BIN=$(ventoy_get_vblade_bin) + if ! [ -d /lib64 ]; then + vtlog "link lib64" + NEED_UNLIB64=1 + ln -s /lib /lib64 + fi + + VBLADE_BIN=$(ventoy_get_vblade_bin) + sudo nohup $VBLADE_BIN -r -f $VTOY_PATH/ventoy_image_map 9 0 lo "$vtdiskname" > /dev/null & sleep 2 @@ -54,9 +61,14 @@ if [ -e /sys/module/aoe ]; then vtlog 'Wait for /dev/etherd/e9.0 ....' sleep 2 done - + sudo cp -a /dev/etherd/e9.0 "$vPart" + if [ -n "$NEED_UNLIB64" ]; then + vtlog "unlink lib64" + unlink /lib64 + fi + ventoy_find_bin_run rebuildfstab else vterr "aoe driver module load failed..."