mirror of https://github.com/ventoy/Ventoy.git
add support for austrumi64-4.3.5.iso/slacko64-7.0.iso
This commit is contained in:
parent
2f45cea46e
commit
807d313cd5
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
wait_for_usb_disk_ready
|
|
||||||
|
|
||||||
vtdiskname=$(get_ventoy_disk_name)
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
if [ "$vtdiskname" = "unknown" ]; then
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
vtlog "ventoy disk not found"
|
vtlog "ventoy disk not found"
|
||||||
|
@ -30,6 +28,14 @@ if [ "$vtdiskname" = "unknown" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if check_usb_disk_ready "$vtdiskname"; then
|
||||||
|
vtlog "check_usb_disk_ready ok"
|
||||||
|
else
|
||||||
|
vtlog "check_usb_disk_ready error"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2"
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2"
|
||||||
|
|
||||||
# blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
# blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
|
|
||||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
$SED "/^ *mdev *-s/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/austrumi/disk_hook.sh" -i /init
|
$SED "/find_usb *(/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/austrumi/disk_hook.sh" -i /init
|
||||||
$SED "s/BOOT_TYPE=livecd/BOOT_TYPE=usb/g" -i /init
|
$SED "s/BOOT_TYPE=livecd/BOOT_TYPE=usb/g" -i /init
|
||||||
|
|
||||||
|
|
|
@ -20,3 +20,9 @@
|
||||||
$SED '1 apmedia=usbhd' -i /init
|
$SED '1 apmedia=usbhd' -i /init
|
||||||
$SED "/^ *HAVE_PARTS=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/puppy-disk.sh" -i /init
|
$SED "/^ *HAVE_PARTS=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/puppy-disk.sh" -i /init
|
||||||
$SED "/^ *HAVE_PARTS=/a\ HAVE_PARTS='ventoy|iso9660'" -i /init
|
$SED "/^ *HAVE_PARTS=/a\ HAVE_PARTS='ventoy|iso9660'" -i /init
|
||||||
|
|
||||||
|
if [ -f /DISTRO_SPECS ]; then
|
||||||
|
if ! [ -d /dev ]; then
|
||||||
|
$BUSYBOX_PATH/mkdir /dev
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -126,6 +126,7 @@ fi
|
||||||
|
|
||||||
if [ -n "$VT_BUS_USB" ]; then
|
if [ -n "$VT_BUS_USB" ]; then
|
||||||
vtlog "$1 is USB device"
|
vtlog "$1 is USB device"
|
||||||
|
echo /dev/$1 > /ventoy/list-devices-usb-part
|
||||||
else
|
else
|
||||||
vtlog "$1 is NOT USB device (bus $ID_BUS)"
|
vtlog "$1 is NOT USB device (bus $ID_BUS)"
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,16 @@ wait_for_usb_disk_ready() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_usb_disk_ready() {
|
||||||
|
if echo $1 | $EGREP -q "nvme|mmc"; then
|
||||||
|
vtpart2=${1}p2
|
||||||
|
else
|
||||||
|
vtpart2=${1}2
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -e "${vtpart2}" ]
|
||||||
|
}
|
||||||
|
|
||||||
is_ventoy_disk() {
|
is_ventoy_disk() {
|
||||||
if $VTOY_PATH/tool/vtoydump -f $VTOY_PATH/ventoy_os_param -c "$1"; then
|
if $VTOY_PATH/tool/vtoydump -f $VTOY_PATH/ventoy_os_param -c "$1"; then
|
||||||
$BUSYBOX_PATH/true
|
$BUSYBOX_PATH/true
|
||||||
|
|
|
@ -313,6 +313,12 @@ ventoy_get_os_type() {
|
||||||
echo 'austrumi'; return
|
echo 'austrumi'; return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /DISTRO_SPECS ]; then
|
||||||
|
if $GREP -q '[Pp]uppy' /DISTRO_SPECS; then
|
||||||
|
echo 'debian'; return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "default"
|
echo "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,15 @@
|
||||||
size=1024
|
size=1024
|
||||||
fstype=ext4
|
fstype=ext4
|
||||||
label=casper-rw
|
label=casper-rw
|
||||||
|
config=''
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo 'Usage: CreatePersistentImg.sh [ -s size ] [ -t fstype ] [ -l LABEL ]'
|
echo 'Usage: CreatePersistentImg.sh [ -s size ] [ -t fstype ] [ -l LABEL ] [ -c CFG ]'
|
||||||
echo ' OPTION: (optional)'
|
echo ' OPTION: (optional)'
|
||||||
echo ' -s size in MB, default is 1024'
|
echo ' -s size in MB, default is 1024'
|
||||||
echo ' -t filesystem type, default is ext4 ext2/ext3/ext4/xfs are supported now'
|
echo ' -t filesystem type, default is ext4 ext2/ext3/ext4/xfs are supported now'
|
||||||
echo ' -l label, default is casper-rw'
|
echo ' -l label, default is casper-rw'
|
||||||
|
echo ' -c configfile name inside the persistence file. File content is "/ union"'
|
||||||
echo ''
|
echo ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +25,9 @@ while [ -n "$1" ]; do
|
||||||
elif [ "$1" = "-l" ]; then
|
elif [ "$1" = "-l" ]; then
|
||||||
shift
|
shift
|
||||||
label=$1
|
label=$1
|
||||||
|
elif [ "$1" = "-c" ]; then
|
||||||
|
shift
|
||||||
|
config=$1
|
||||||
elif [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
elif [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||||
print_usage
|
print_usage
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -76,5 +81,18 @@ mkfs -t $fstype $fsopt -L $label $freeloop
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
||||||
losetup -d $freeloop
|
if [ -n "$config" ]; then
|
||||||
|
if [ -d ./persist_tmp_mnt ]; then
|
||||||
|
rm -rf ./persist_tmp_mnt
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir ./persist_tmp_mnt
|
||||||
|
if mount $freeloop ./persist_tmp_mnt; then
|
||||||
|
echo '/ union' > ./persist_tmp_mnt/$config
|
||||||
|
sync
|
||||||
|
umount ./persist_tmp_mnt
|
||||||
|
fi
|
||||||
|
rm -rf ./persist_tmp_mnt
|
||||||
|
fi
|
||||||
|
|
||||||
|
losetup -d $freeloop
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
*save_env: loadenv
|
*save_env: loadenv
|
||||||
*search: search
|
*search: search
|
||||||
*serial: serial
|
*serial: serial
|
||||||
|
*setkey: setkey
|
||||||
*sha1sum: hashsum
|
*sha1sum: hashsum
|
||||||
*sha256sum: hashsum
|
*sha256sum: hashsum
|
||||||
*sha512sum: hashsum
|
*sha512sum: hashsum
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
videotest: font video gfxmenu
|
videotest: font video gfxmenu
|
||||||
|
setkey: extcmd
|
||||||
odc: archelp
|
odc: archelp
|
||||||
loopback: extcmd
|
loopback: extcmd
|
||||||
macho:
|
macho:
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
*save_env: loadenv
|
*save_env: loadenv
|
||||||
*search: search
|
*search: search
|
||||||
*serial: serial
|
*serial: serial
|
||||||
|
*setkey: setkey
|
||||||
*setpci: setpci
|
*setpci: setpci
|
||||||
*sha1sum: hashsum
|
*sha1sum: hashsum
|
||||||
*sha256sum: hashsum
|
*sha256sum: hashsum
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
videotest: font video gfxmenu
|
videotest: font video gfxmenu
|
||||||
|
setkey: extcmd
|
||||||
odc: archelp
|
odc: archelp
|
||||||
loopback: extcmd
|
loopback: extcmd
|
||||||
macho:
|
macho:
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
*search: search
|
*search: search
|
||||||
*sendkey: sendkey
|
*sendkey: sendkey
|
||||||
*serial: serial
|
*serial: serial
|
||||||
|
*setkey: setkey
|
||||||
*setpci: setpci
|
*setpci: setpci
|
||||||
*sha1sum: hashsum
|
*sha1sum: hashsum
|
||||||
*sha256sum: hashsum
|
*sha256sum: hashsum
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
videotest: font video gfxmenu
|
videotest: font video gfxmenu
|
||||||
|
setkey: extcmd
|
||||||
odc: archelp
|
odc: archelp
|
||||||
loopback: extcmd
|
loopback: extcmd
|
||||||
macho:
|
macho:
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
*save_env: loadenv
|
*save_env: loadenv
|
||||||
*search: search
|
*search: search
|
||||||
*serial: serial
|
*serial: serial
|
||||||
|
*setkey: setkey
|
||||||
*setpci: setpci
|
*setpci: setpci
|
||||||
*sha1sum: hashsum
|
*sha1sum: hashsum
|
||||||
*sha256sum: hashsum
|
*sha256sum: hashsum
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
videotest: font video gfxmenu
|
videotest: font video gfxmenu
|
||||||
|
setkey: extcmd
|
||||||
odc: archelp
|
odc: archelp
|
||||||
loopback: extcmd
|
loopback: extcmd
|
||||||
macho:
|
macho:
|
||||||
|
|
Loading…
Reference in New Issue