Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
8dce0add
"docs/references/hyperparameter_tuning.md" did not exist on "c0ae70c8ed7b9c77164f7483b1075b15fe78ed34"
Commit
8dce0add
authored
Aug 29, 2020
by
longpanda
Browse files
update for new release
parent
1bf3e733
Changes
110
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
542 additions
and
1 deletion
+542
-1
IMG/cpio/ventoy/hook/crux/disk_hook.sh
IMG/cpio/ventoy/hook/crux/disk_hook.sh
+1
-1
IMG/cpio/ventoy/hook/debian/default-hook.sh
IMG/cpio/ventoy/hook/debian/default-hook.sh
+15
-0
IMG/cpio/ventoy/hook/debian/mll-disk.sh
IMG/cpio/ventoy/hook/debian/mll-disk.sh
+43
-0
IMG/cpio/ventoy/hook/debian/mll-hook.sh
IMG/cpio/ventoy/hook/debian/mll-hook.sh
+21
-0
IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh
IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh
+6
-0
IMG/cpio/ventoy/hook/debian/ventoy-hook.sh
IMG/cpio/ventoy/hook/debian/ventoy-hook.sh
+2
-0
IMG/cpio/ventoy/hook/default/ventoy-hook.sh
IMG/cpio/ventoy/hook/default/ventoy-hook.sh
+9
-0
IMG/cpio/ventoy/hook/dragora/disk_hook.sh
IMG/cpio/ventoy/hook/dragora/disk_hook.sh
+41
-0
IMG/cpio/ventoy/hook/dragora/ventoy-hook.sh
IMG/cpio/ventoy/hook/dragora/ventoy-hook.sh
+22
-0
IMG/cpio/ventoy/hook/lunar/ventoy-hook.sh
IMG/cpio/ventoy/hook/lunar/ventoy-hook.sh
+27
-0
IMG/cpio/ventoy/hook/lunar/ventoy-inotifyd-hook.sh
IMG/cpio/ventoy/hook/lunar/ventoy-inotifyd-hook.sh
+45
-0
IMG/cpio/ventoy/hook/lunar/ventoy-inotifyd-start.sh
IMG/cpio/ventoy/hook/lunar/ventoy-inotifyd-start.sh
+31
-0
IMG/cpio/ventoy/hook/photon/ventoy-hook.sh
IMG/cpio/ventoy/hook/photon/ventoy-hook.sh
+34
-0
IMG/cpio/ventoy/hook/photon/ventoy-inotifyd-hook.sh
IMG/cpio/ventoy/hook/photon/ventoy-inotifyd-hook.sh
+43
-0
IMG/cpio/ventoy/hook/photon/ventoy-inotifyd-start.sh
IMG/cpio/ventoy/hook/photon/ventoy-inotifyd-start.sh
+31
-0
IMG/cpio/ventoy/hook/pisilinux/ventoy-disk.sh
IMG/cpio/ventoy/hook/pisilinux/ventoy-disk.sh
+47
-0
IMG/cpio/ventoy/hook/pisilinux/ventoy-hook.sh
IMG/cpio/ventoy/hook/pisilinux/ventoy-hook.sh
+24
-0
IMG/cpio/ventoy/hook/ploplinux/disk_hook.sh
IMG/cpio/ventoy/hook/ploplinux/disk_hook.sh
+38
-0
IMG/cpio/ventoy/hook/ploplinux/ventoy-hook.sh
IMG/cpio/ventoy/hook/ploplinux/ventoy-hook.sh
+24
-0
IMG/cpio/ventoy/hook/rancher/disk_hook.sh
IMG/cpio/ventoy/hook/rancher/disk_hook.sh
+38
-0
No files found.
IMG/cpio/ventoy/hook/crux/disk_hook.sh
View file @
8dce0add
...
...
@@ -29,7 +29,7 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
fi
done
ventoy_extract_vtloopex
/dev/
${
vtdiskname
#/dev/
}
2 crux
ventoy_extract_vtloopex
${
vtdiskname
}
2 crux
vtLoopExDir
=
$VTOY_PATH
/vtloopex/crux/vtloopex
$BUSYBOX_PATH
/xz
-d
$vtLoopExDir
/dm-mod/
$(
uname
-r
)
/64/dax.ko.xz
...
...
IMG/cpio/ventoy/hook/debian/default-hook.sh
View file @
8dce0add
...
...
@@ -60,3 +60,18 @@ if [ -f $VTOY_PATH/autoinstall ]; then
fi
fi
#for ARMA aka Omoikane
if
[
-f
/mod.img
]
&&
[
-f
/mod/fs/cramfs.ko
]
;
then
echo
"mount mod.img and install dm-mod.ko"
>>
$VTLOG
$BUSYBOX_PATH
/insmod /mod/fs/cramfs.ko
$BUSYBOX_PATH
/mkdir
$VTOY_PATH
/modmnt
$BUSYBOX_PATH
/mount /mod.img
$VTOY_PATH
/modmnt
$BUSYBOX_PATH
/insmod
$VTOY_PATH
/modmnt/md/dm-mod.ko
$BUSYBOX_PATH
/umount
$VTOY_PATH
/modmnt
$BUSYBOX_PATH
/rmmod cramfs
fi
IMG/cpio/ventoy/hook/debian/mll-disk.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/debian/mll-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh
View file @
8dce0add
...
...
@@ -47,7 +47,13 @@ ventoy_os_install_dmsetup() {
if
[
$LINTCNT
-gt
1
]
;
then
vtlog
"more than one pkgs, need to filter..."
VER
=
$(
$BUSYBOX_PATH
/uname
-r
)
LINE
=
$(
$GREP
' md-modules.*\.udeb'
$VTOY_PATH
/iso_file_list |
$GREP
$VER
)
LINTCNT
=
$(
$GREP
' md-modules.*\.udeb'
$VTOY_PATH
/iso_file_list |
$GREP
-c
$VER
)
if
[
$LINTCNT
-gt
1
]
;
then
vtlog
"Still more than one pkgs, use the first one..."
LINE
=
$(
$GREP
' md-modules.*\.udeb'
$VTOY_PATH
/iso_file_list |
$GREP
-m1
$VER
)
fi
fi
install_udeb_from_line
"
$LINE
"
${
vt_usb_disk
}
fi
...
...
IMG/cpio/ventoy/hook/debian/ventoy-hook.sh
View file @
8dce0add
...
...
@@ -35,6 +35,8 @@ ventoy_get_debian_distro() {
else
echo
'puppy'
;
return
fi
elif
$GREP
-m1
-q
'Minimal.*Linux.*Live'
/init
;
then
echo
'mll'
;
return
fi
fi
...
...
IMG/cpio/ventoy/hook/default/ventoy-hook.sh
View file @
8dce0add
...
...
@@ -22,3 +22,12 @@
ventoy_systemd_udevd_work_around
ventoy_add_udev_rule
"
$VTOY_PATH
/hook/default/udev_disk_hook.sh %k"
if
[
-f
/init
]
;
then
vtSize
=
$(
$BUSYBOX_PATH
/stat
-c
'%s'
/init
)
if
!
[
-L
/init
]
;
then
if
[
$vtSize
-eq
0
]
;
then
rm
-f
/init
fi
fi
fi
IMG/cpio/ventoy/hook/dragora/disk_hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/dragora/ventoy-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/lunar/ventoy-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/lunar/ventoy-inotifyd-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/lunar/ventoy-inotifyd-start.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/photon/ventoy-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/photon/ventoy-inotifyd-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/photon/ventoy-inotifyd-start.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/pisilinux/ventoy-disk.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/pisilinux/ventoy-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/ploplinux/disk_hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/ploplinux/ventoy-hook.sh
0 → 100644
View file @
8dce0add
#!/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
IMG/cpio/ventoy/hook/rancher/disk_hook.sh
0 → 100644
View file @
8dce0add
#!/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
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment