mirror of https://github.com/ventoy/Ventoy
update for new release
parent
1bf3e73373
commit
8dce0adda6
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
1. LAKKA dm-mod.ko
|
||||||
|
LaKKa config
|
||||||
|
https://github.com/libretro/Lakka-LibreELEC/releases download source code
|
||||||
|
\projects\Generic\linux\linux.x86_64.conf
|
||||||
|
|
||||||
|
Linux Kernel
|
||||||
|
linux-4.11.12.tar.xz & patch-4.11.12-rt14.patch.xz
|
||||||
|
patch -p1 < ../patch-4.11.12-rt14
|
||||||
|
|
||||||
|
make menuconfig
|
||||||
|
select device mapper as module
|
||||||
|
make -j 16
|
||||||
|
get drivers\md\dm-mod.ko
|
||||||
|
|
||||||
|
2. LibreELEC dm-mod.ko
|
||||||
|
LibreELEC config
|
||||||
|
https://github.com/LibreELEC/LibreELEC.tv/releases download source code
|
||||||
|
\projects\Generic\linux\linux.x86_64.conf
|
||||||
|
|
||||||
|
Linux Kernel
|
||||||
|
linux-5.1.6.tar.xz
|
||||||
|
make menuconfig
|
||||||
|
select device mapper as module
|
||||||
|
make -j 16
|
||||||
|
get drivers\md\dm-mod.ko
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -f ventoy_efiboot.img.*
|
||||||
|
|
||||||
|
cd ISO
|
||||||
|
mkisofs -R -D -sysid VENTOY -V VENTOY -P "longpanda admin@ventoy.net" -p 'https://www.ventoy.net' -o ../ventoy_efiboot.img ./
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
xz --check=crc32 ventoy_efiboot.img
|
||||||
|
|
||||||
|
rm -f ../INSTALL/ventoy/ventoy_efiboot.img.xz
|
||||||
|
cp -a ventoy_efiboot.img.xz ../INSTALL/ventoy/
|
||||||
|
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,51 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
mkdir /sys
|
||||||
|
mount -t sysfs sys /sys
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||||
|
blkdev_num_mknod=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||||
|
|
||||||
|
vtlog "blkdev_num=$blkdev_num blkdev_num_mknod=$blkdev_num_mknod vtDM=$vtDM"
|
||||||
|
|
||||||
|
if [ -b /dev/$vtDM ]; then
|
||||||
|
vtlog "dev already exist ..."
|
||||||
|
else
|
||||||
|
vtlog "mknode dev ..."
|
||||||
|
mknod -m 660 /dev/$vtDM b $blkdev_num_mknod
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$BUSYBOX_PATH/mkdir /dev
|
||||||
|
$BUSYBOX_PATH/mknod -m 660 /dev/console b 5 1
|
||||||
|
|
||||||
|
$SED "/for device in/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/aryalinux/disk_hook.sh" -i /init
|
||||||
|
#$SED "/for device in/i exec $BUSYBOX_PATH/sh" -i /init
|
@ -0,0 +1,43 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
$SED "/^for DEVICE in/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/mll-disk.sh" -i /etc/02_overlay.sh
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_extract_vtloopex ${vtdiskname}2 dragora
|
||||||
|
vtLoopExDir=$VTOY_PATH/vtloopex/dragora/vtloopex
|
||||||
|
$BUSYBOX_PATH/xz -d $vtLoopExDir/dm-mod/$(uname -r)/64/dm-mod.ko.xz
|
||||||
|
$BUSYBOX_PATH/insmod $vtLoopExDir/dm-mod/$(uname -r)/64/dm-mod.ko
|
||||||
|
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/iso9660/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/dragora/disk_hook.sh" -i /init
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=/dev/dm-0#" -i /lib/dracut-lib.sh
|
||||||
|
|
||||||
|
$BUSYBOX_PATH/rm -f /usr/lib/systemd/system-generators/systemd-fstab-generator /lib/systemd/system-generators/systemd-fstab-generator
|
||||||
|
|
||||||
|
ventoy_set_inotify_script lunar/ventoy-inotifyd-hook.sh
|
||||||
|
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/lunar/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/01-ventoy-inotifyd-start.sh
|
@ -0,0 +1,45 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
if is_inotify_ventoy_part $3; then
|
||||||
|
|
||||||
|
vtlog "##### INOTIFYD: $2/$3 is created (YES) ..."
|
||||||
|
|
||||||
|
vtlog "find ventoy partition ..."
|
||||||
|
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||||
|
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||||
|
|
||||||
|
mount -t iso9660 /dev/$vtDM /sysroot
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
||||||
|
else
|
||||||
|
vtlog "##### INOTIFYD: $2/$3 is created (NO) ..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
vtHook=$($CAT $VTOY_PATH/inotifyd-hook-script.txt)
|
||||||
|
|
||||||
|
vtdisk=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdisk" = "unknown" ]; then
|
||||||
|
vtlog "... start inotifyd listen $vtHook ..."
|
||||||
|
$BUSYBOX_PATH/nohup $VTOY_PATH/tool/inotifyd $vtHook /dev:n 2>&- &
|
||||||
|
else
|
||||||
|
vtlog "... $vtdisk already exist ..."
|
||||||
|
$BUSYBOX_PATH/sh $vtHook n /dev "${vtdisk#/dev/}2"
|
||||||
|
fi
|
@ -0,0 +1,34 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED 's#/dev/cdrom#/dev/ventoy#' -i /installer/isoInstaller.py
|
||||||
|
|
||||||
|
ventoy_set_inotify_script photon/ventoy-inotifyd-hook.sh
|
||||||
|
|
||||||
|
[ -d /dev ] || $BUSYBOX_PATH/mkdir /dev
|
||||||
|
[ -d /sys ] || $BUSYBOX_PATH/mkdir /sys
|
||||||
|
|
||||||
|
$BUSYBOX_PATH/mount -t devtmpfs -o mode=0755,noexec,nosuid,strictatime devtmpfs /dev
|
||||||
|
$BUSYBOX_PATH/mount -t sysfs sys /sys
|
||||||
|
|
||||||
|
$BUSYBOX_PATH/rm -f /init
|
||||||
|
$BUSYBOX_PATH/sh $VTOY_PATH/hook/photon/ventoy-inotifyd-start.sh
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
if is_inotify_ventoy_part $3; then
|
||||||
|
|
||||||
|
vtlog "##### INOTIFYD: $2/$3 is created (YES) ..."
|
||||||
|
|
||||||
|
vtlog "find ventoy partition ..."
|
||||||
|
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 0660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
||||||
|
else
|
||||||
|
vtlog "##### INOTIFYD: $2/$3 is created (NO) ..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
vtHook=$($CAT $VTOY_PATH/inotifyd-hook-script.txt)
|
||||||
|
|
||||||
|
vtdisk=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdisk" = "unknown" ]; then
|
||||||
|
vtlog "... start inotifyd listen $vtHook ..."
|
||||||
|
$BUSYBOX_PATH/nohup $VTOY_PATH/tool/inotifyd $vtHook /dev:n 2>&- &
|
||||||
|
else
|
||||||
|
vtlog "... $vtdisk already exist ..."
|
||||||
|
$BUSYBOX_PATH/sh $vtHook n /dev "${vtdisk#/dev/}2"
|
||||||
|
fi
|
@ -0,0 +1,47 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/pisilinux/ventoy-disk.sh" -i /init
|
||||||
|
$SED "/^\"\$mount_handler\"/i\ export root=/dev/ventoy" -i /init
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 0660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/export *CMDLINE/i CMDLINE=\"root=/dev/ventoy \${CMDLINE}\"" -i /etc/rc.d/init.d/rc.S
|
||||||
|
$SED "1a $BUSYBOX_PATH/sh $VTOY_PATH/hook/ploplinux/disk_hook.sh" -i /etc/rc.d/init.d/rootmount
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 0660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,42 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
#exec /ventoy/busybox/sh
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
echo "/dev/ventoy" > cdrom.hint
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,45 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
PATH=$PATH:$VTOY_PATH/busybox
|
||||||
|
|
||||||
|
mkdir /ventoy_rdroot
|
||||||
|
|
||||||
|
mknod -m 660 /ram0 b 1 0
|
||||||
|
|
||||||
|
dd if=/initrd001 of=/ram0
|
||||||
|
rm -f /initrd001
|
||||||
|
|
||||||
|
mount /ram0 /ventoy_rdroot
|
||||||
|
|
||||||
|
vtSize=$(du -m -s $VTOY_PATH | awk '{print $1}')
|
||||||
|
let vtSize=vtSize+4
|
||||||
|
|
||||||
|
mkdir -p /ventoy_rdroot/ventoy
|
||||||
|
mount -t tmpfs -o size=${vtSize}m tmpfs /ventoy_rdroot/ventoy
|
||||||
|
cp -a /ventoy/* /ventoy_rdroot/ventoy/
|
||||||
|
|
||||||
|
|
||||||
|
cd /ventoy_rdroot
|
||||||
|
|
||||||
|
sed "/scan_cdroms *$/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/smgl/disk_hook.sh" -i sbin/smgl.init
|
||||||
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||||
|
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||||
|
vtSize=$(cat /sys/block/$vtDM/size)
|
||||||
|
|
||||||
|
cp -a /tmp/cd.list /tmp/cd_new.list
|
||||||
|
echo "$vtDM $vtSize UNK_MODEL " > /tmp/cd.list
|
||||||
|
cat /tmp/cd_new.list >> /tmp/cd.list
|
||||||
|
rm -f /tmp/cd_new.list
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,52 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||||
|
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||||
|
|
||||||
|
if [ "$1" = "fakecdrom" ]; then
|
||||||
|
if [ -e /dev/sr0 ]; then
|
||||||
|
for i in 0 1 2 3 4 5 6 7 8; do
|
||||||
|
if ! [ -e /dev/sr$i ]; then
|
||||||
|
mv /dev/sr0 /dev/sr$i
|
||||||
|
cp -a /dev/$vtDM /dev/sr0
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
cp -a /dev/$vtDM /dev/sr0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,25 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/Running installer/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/smoothwall/disk_hook.sh fakecdrom" -i /etc/install.rc
|
||||||
|
|
||||||
|
$SED "/cd \/sys\/block/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/smoothwall/disk_hook.sh" -i /etc/config-install.rc
|
||||||
|
$SED "/wc *-l *\/tmp\/cd.list/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/smoothwall/cd_list.sh" -i /etc/config-install.rc
|
@ -0,0 +1,64 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
|
||||||
|
ventoy_os_install_dmsetup_by_fuse() {
|
||||||
|
vtlog "ventoy_os_install_dmsetup_by_fuse $*"
|
||||||
|
|
||||||
|
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso $VTOY_PATH/mnt/squashfs
|
||||||
|
|
||||||
|
vtoydm -p -f $VTOY_PATH/ventoy_image_map -d $1 > $VTOY_PATH/ventoy_dm_table
|
||||||
|
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse
|
||||||
|
|
||||||
|
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
|
||||||
|
|
||||||
|
mount -t squashfs $VTOY_PATH/mnt/iso/system/squashfs_sys.img $VTOY_PATH/mnt/squashfs
|
||||||
|
|
||||||
|
KoName=$(ls $VTOY_PATH/mnt/squashfs/lib/modules/$2/kernel/drivers/md/dm-mod.ko*)
|
||||||
|
vtlog "insmod $KoName"
|
||||||
|
insmod $KoName
|
||||||
|
|
||||||
|
umount $VTOY_PATH/mnt/squashfs 2>>$VTLOG
|
||||||
|
umount $VTOY_PATH/mnt/iso 2>>$VTLOG
|
||||||
|
umount $VTOY_PATH/mnt/fuse 2>>$VTLOG
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
modprobe fuse
|
||||||
|
ventoy_os_install_dmsetup_by_fuse $vtdiskname $(uname -r)
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 0660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,47 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
modprobe dm-mod
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||||
|
mknod -m 0660 /dev/ventoy b $blkdev_num
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/getdevice *devicefile/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/t2/disk_hook.sh" -i /init
|
||||||
|
$SED "/getdevice *devicefile/a devicefile=/dev/ventoy" -i /init
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
vtlog "##### $0 $* #####"
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
if blkid | grep -q '/dev/dm'; then
|
||||||
|
vtlog 'Find /dev/dm ...'
|
||||||
|
break
|
||||||
|
else
|
||||||
|
vtlog 'Wait /dev/dm ...'
|
||||||
|
sleep 0.3
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i /linuxrc
|
||||||
|
|
||||||
|
#replace original blkid
|
||||||
|
$BUSYBOX_PATH/rm -f /usr/bin/blkid
|
||||||
|
$BUSYBOX_PATH/cp -a $BUSYBOX_PATH/blkid /usr/bin/blkid
|
@ -0,0 +1,62 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
vtKerVer=$(uname -r)
|
||||||
|
if uname -m | grep -q 64; then
|
||||||
|
vtBit=64
|
||||||
|
else
|
||||||
|
vtBit=32
|
||||||
|
fi
|
||||||
|
|
||||||
|
xz -d $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko.xz
|
||||||
|
insmod $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko
|
||||||
|
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
mkdir /ventoy/mnt
|
||||||
|
mount /dev/ventoy2 /ventoy/mnt
|
||||||
|
rm -f /ventoy/mnt/.please_resize_me
|
||||||
|
sync
|
||||||
|
umount /ventoy/mnt
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/mount_flash.*{/a\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/LibreELEC/ventoy-disk.sh" -i /init
|
||||||
|
|
@ -0,0 +1,45 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/mount.*devtmpfs/a\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/batocera/ventoy-disk.sh" -i /init
|
||||||
|
|
@ -0,0 +1,47 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
insmod $VTOY_PATH/modules/dm-mod.ko
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/local_mount_root *$/i $BUSYBOX_PATH/sh $VTOY_PATH/loop/freedombox/ventoy-disk.sh" -i /scripts/local
|
@ -0,0 +1,62 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
vtKerVer=$(uname -r)
|
||||||
|
if uname -m | grep -q 64; then
|
||||||
|
vtBit=64
|
||||||
|
else
|
||||||
|
vtBit=32
|
||||||
|
fi
|
||||||
|
|
||||||
|
xz -d $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko.xz
|
||||||
|
insmod $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko
|
||||||
|
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
mkdir /ventoy/mnt
|
||||||
|
mount /dev/ventoy2 /ventoy/mnt
|
||||||
|
rm -f /ventoy/mnt/.please_resize_me
|
||||||
|
sync
|
||||||
|
umount /ventoy/mnt
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/mount_flash.*{/a\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/lakka/ventoy-disk.sh" -i /init
|
||||||
|
|
@ -0,0 +1,47 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
modprobe dm-mod
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/for *dev *in .*root/i $BUSYBOX_PATH/sh $VTOY_PATH/loop/paldo/ventoy-disk.sh" -i /init
|
@ -0,0 +1,45 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/mount.*devtmpfs/a\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/recalbox/ventoy-disk.sh" -i /init
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
sed "/.* \/boot /d" -i /new_root/etc/fstab
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
@ -0,0 +1,48 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. /ventoy/hook/ventoy-hook-lib.sh
|
||||||
|
|
||||||
|
if is_ventoy_hook_finished; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
vtlog "####### $0 $* ########"
|
||||||
|
|
||||||
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
|
xz -d $VTOY_PATH/modules/dm-mod.ko.xz
|
||||||
|
insmod $VTOY_PATH/modules/dm-mod.ko
|
||||||
|
|
||||||
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
vtdiskname=$(get_ventoy_disk_name)
|
||||||
|
if [ "$vtdiskname" = "unknown" ]; then
|
||||||
|
vtlog "ventoy disk not found"
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||||
|
|
||||||
|
ventoy_create_dev_ventoy_part
|
||||||
|
|
||||||
|
PATH=$VTPATH_OLD
|
||||||
|
|
||||||
|
set_ventoy_hook_finish
|
@ -0,0 +1,30 @@
|
|||||||
|
#!/ventoy/busybox/sh
|
||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/default/10-dm.rules /lib/udev/rules.d/
|
||||||
|
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/default/13-dm-disk.rules /lib/udev/rules.d/
|
||||||
|
|
||||||
|
$SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/ubos/ventoy-disk.sh" -i /init
|
||||||
|
|
||||||
|
$SED "/^\"\$mount_handler\"/a\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/ubos/newroot-hook.sh" -i /init
|
||||||
|
|
||||||
|
$SED "/^\"\$mount_handler\"/a\ init=/usr/lib/systemd/systemd" -i /init
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
lunzip follows GPLv2+ license (see gpl-2.0.txt)
|
||||||
|
|
||||||
|
Ventoy does not modify its source code, only its binary is used.
|
@ -0,0 +1,8 @@
|
|||||||
|
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html#versions-13
|
||||||
|
|
||||||
|
sysctl kern.osreldate
|
||||||
|
/usr/src/sys/sys/param.h
|
||||||
|
#define __FreeBSD_version 1300102
|
||||||
|
|
||||||
|
Modify the /usr/src/sys/sys/param.h __FreeBSD_version to the value get by sysctl kern.osreldate in the OS.
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue