X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/99627752964e77e1e0365cc7395bf9803a7fb93f..bd8aebf166bd9a7a5f2fc0f54baf2aff3bea74cd:/IMG/cpio/ventoy/loop/easyos/ventoy-hook.sh diff --git a/IMG/cpio/ventoy/loop/easyos/ventoy-hook.sh b/IMG/cpio/ventoy/loop/easyos/ventoy-hook.sh index 7310b0d..75eabc6 100644 --- a/IMG/cpio/ventoy/loop/easyos/ventoy-hook.sh +++ b/IMG/cpio/ventoy/loop/easyos/ventoy-hook.sh @@ -1,6 +1,6 @@ #!/ventoy/busybox/sh #************************************************************************************ -# Copyright (c) 2020, longpanda +# Copyright (c) 2022, longpanda # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -23,10 +23,13 @@ $SED "/find drives/i $BUSYBOX_PATH/sh $VTOY_PATH/loop/easyos/ventoy-disk.sh; vtD $SED "1a boot_dev=ventoy1;wkg_dev=ventoy2" -i /init +$SED 's#\(dd *if=/dev/.*WKG_DRV.* *of=/dev/null.*skip\)=[0-9]*#\1=1048576#' -i /init +$SED "s#WKG_DEV=\"\"#WKG_DEV=ventoy2#g" -i /init + #check for ssd will read /sys/block/ventoy, will no exist, need a workaround $SED "s#/sys/block/\${WKG_DRV}/#/sys/block/\$vtDM/#g" -i /init -#skip the resizing process, can't resizing partition -$SED "s#640M#0M#g" -i /init +#resizing process +$SED "s#partprobe.*#$BUSYBOX_PATH/sh $VTOY_PATH/loop/easyos/ventoy-resize.sh \$WKG_DEV#g" -i /init