mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-16 17:11:13 +00:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
430f81ac49 | ||
|
038c0533d9 | ||
|
102b179cd9 | ||
|
6785f5d049 | ||
|
0c812ed5e9 | ||
|
9f2b9b0867 | ||
|
c79b072680 | ||
|
6b4509a550 | ||
|
feea11e2bb | ||
|
35c952d891 | ||
|
82053680bf | ||
|
6d5de12f52 | ||
|
84b2ee7ee3 | ||
|
da1b306e81 |
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -12,26 +12,26 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run docker-compose up
|
||||
run: docker-compose up
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ventoy-windows
|
||||
path: INSTALL/ventoy-*windows*
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ventoy-linux
|
||||
path: INSTALL/ventoy-*linux*
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ventoy-livecd
|
||||
path: INSTALL/ventoy-*livecd*
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: SHA256SUM
|
||||
path: INSTALL/sha256.txt
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: xxx-build-log
|
||||
path: DOC/build.log
|
||||
|
@@ -5,7 +5,7 @@ use an old version of dmsetup
|
||||
http://vault.centos.org/5.3/os/SRPMS/device-mapper-1.02.28-2.el5.src.rpm
|
||||
https://www.fefe.de/dietlibc/dietlibc-0.34.tar.xz
|
||||
|
||||
======== Build Envrioment ========
|
||||
======== Build Environment ========
|
||||
build for 32bit, static linked with dietlibc
|
||||
1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso
|
||||
2. yum install gcc kernel-devel package
|
||||
|
@@ -1,8 +1,8 @@
|
||||
|
||||
==========================================
|
||||
1. Compile Enviroment
|
||||
1. Compile Environment
|
||||
==========================================
|
||||
My build envrioment is CentOS 7.8 x86_64. So here I first explain how to create the build environment from scratch.
|
||||
My build environment is CentOS 7.8 x86_64. So here I first explain how to create the build environment from scratch.
|
||||
Because Ventoy is based on many open source projects, so the environment is important. I suggest you test it on a virtual machine firstly.
|
||||
|
||||
1.1 Install CentOS 7.8
|
||||
@@ -54,7 +54,7 @@
|
||||
mv /opt/output /opt/mips64el-linux-musl-gcc730
|
||||
|
||||
|
||||
2.4 Set PATH envrioment
|
||||
2.4 Set PATH environment
|
||||
export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin:/opt/mips64el-linux-musl-gcc730/bin
|
||||
better to add this line to /root/.bashrc and relogin as root
|
||||
|
||||
|
@@ -405,13 +405,6 @@ static grub_ssize_t zstd_decompress_wrap(char *inbuf, grub_size_t insize, grub_o
|
||||
{
|
||||
char *udata = NULL;
|
||||
int usize = data->blksz;
|
||||
|
||||
if (off == 0)
|
||||
{
|
||||
ZSTD_decompress(outbuf, len, inbuf, insize);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (usize < 8192)
|
||||
usize = 8192;
|
||||
|
||||
@@ -422,7 +415,6 @@ static grub_ssize_t zstd_decompress_wrap(char *inbuf, grub_size_t insize, grub_o
|
||||
ZSTD_decompress(udata, usize, inbuf, insize);
|
||||
grub_memcpy(outbuf, udata + off, len);
|
||||
grub_free(udata);
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
@@ -551,7 +543,7 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir,
|
||||
break;
|
||||
case grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_DIR):
|
||||
off = grub_le_to_cpu16 (dir->ino.long_dir.offset);
|
||||
endoff = grub_le_to_cpu16 (dir->ino.long_dir.size) + off - 3;
|
||||
endoff = grub_le_to_cpu32 (dir->ino.long_dir.size) + off - 3;
|
||||
chunk = grub_le_to_cpu32 (dir->ino.long_dir.chunk);
|
||||
break;
|
||||
default:
|
||||
|
@@ -229,10 +229,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (! file)
|
||||
goto fail;
|
||||
|
||||
/* Get the root device's device path. */
|
||||
dev = grub_device_open (0);
|
||||
if (! dev)
|
||||
goto fail;
|
||||
dev = file->device;
|
||||
|
||||
if (dev->disk)
|
||||
dev_handle = grub_efidisk_get_device_handle (dev->disk);
|
||||
@@ -257,15 +254,12 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (dev_handle)
|
||||
dp = grub_efi_get_device_path (dev_handle);
|
||||
|
||||
if (! dp)
|
||||
if (dp != NULL)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_DEVICE, "not a valid root device");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
file_path = make_file_path (dp, filename);
|
||||
if (! file_path)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
//grub_printf ("file path: ");
|
||||
//grub_efi_print_device_path (file_path);
|
||||
@@ -390,16 +384,12 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
grub_file_close (file);
|
||||
grub_device_close (dev);
|
||||
|
||||
grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
||||
if (dev)
|
||||
grub_device_close (dev);
|
||||
|
||||
if (file)
|
||||
grub_file_close (file);
|
||||
|
||||
|
@@ -26,6 +26,10 @@ ventoy_get_debian_distro() {
|
||||
if $EGREP -q "ID=.*antix|ID=.*mx" /etc/initrd-release; then
|
||||
echo 'antix'; return
|
||||
fi
|
||||
elif [ -e /etc/initrd_release ]; then
|
||||
if $EGREP -q "ID=.*antix|ID=.*mx" /etc/initrd_release; then
|
||||
echo 'antix'; return
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /DISTRO_SPECS ]; then
|
||||
|
40
IMG/cpio/ventoy/hook/deepin/disk_mount_hook.sh
Normal file
40
IMG/cpio/ventoy/hook/deepin/disk_mount_hook.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/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
|
||||
|
||||
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
|
||||
|
||||
vtlog "${vtdiskname#/dev/}2 found..."
|
||||
$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/udev_disk_hook.sh "${vtdiskname#/dev/}2"
|
||||
|
||||
if [ -f /ventoy/autoinstall ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /ventoy/autoinstall
|
||||
fi
|
151
IMG/cpio/ventoy/hook/deepin/udev_disk_hook.sh
Normal file
151
IMG/cpio/ventoy/hook/deepin/udev_disk_hook.sh
Normal file
@@ -0,0 +1,151 @@
|
||||
#!/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
|
||||
|
||||
ventoy_os_install_dmsetup() {
|
||||
|
||||
vtlog "ventoy_os_install_dmsetup $1 ..."
|
||||
|
||||
vt_usb_disk=$1
|
||||
|
||||
# dump iso file location
|
||||
$VTOY_PATH/tool/vtoydm -i -f $VTOY_PATH/ventoy_image_map -d ${vt_usb_disk} > $VTOY_PATH/iso_file_list
|
||||
|
||||
# install dmsetup
|
||||
LINE=$($GREP ' dmsetup.*\.udeb' $VTOY_PATH/iso_file_list)
|
||||
if [ $? -eq 0 ]; then
|
||||
install_udeb_from_line "$LINE" ${vt_usb_disk}
|
||||
fi
|
||||
|
||||
# install libdevmapper
|
||||
LINE=$($GREP ' libdevmapper.*\.udeb' $VTOY_PATH/iso_file_list)
|
||||
if [ $? -eq 0 ]; then
|
||||
install_udeb_from_line "$LINE" ${vt_usb_disk}
|
||||
fi
|
||||
|
||||
# install md-modules
|
||||
LINE=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list)
|
||||
if [ $? -eq 0 ]; then
|
||||
LINTCNT=$($GREP -i -c ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list)
|
||||
if [ $LINTCNT -gt 1 ]; then
|
||||
vtlog "more than one pkgs, need to filter..."
|
||||
VER=$($BUSYBOX_PATH/uname -r)
|
||||
|
||||
LINE=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -i $VER)
|
||||
LINTCNT=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -i -c $VER)
|
||||
if [ $LINTCNT -gt 1 ]; then
|
||||
vtlog "Still more than one pkgs, use the first one..."
|
||||
LINE=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -i -m1 $VER)
|
||||
fi
|
||||
fi
|
||||
install_udeb_from_line "$LINE" ${vt_usb_disk}
|
||||
fi
|
||||
|
||||
# insmod md-mod if needed
|
||||
if $GREP -q 'device-mapper' /proc/devices; then
|
||||
vtlog "device mapper module is loaded"
|
||||
else
|
||||
vtlog "device mapper module is NOT loaded, now load it..."
|
||||
|
||||
VER=$($BUSYBOX_PATH/uname -r)
|
||||
KO=$($FIND /lib/modules/$VER/kernel/drivers/md -name "dm-mod*")
|
||||
vtlog "KO=$KO"
|
||||
|
||||
insmod $KO
|
||||
fi
|
||||
|
||||
vtlog "dmsetup install finish, now check it..."
|
||||
if dmsetup info >> $VTLOG 2>&1; then
|
||||
vtlog "dmsetup work ok"
|
||||
else
|
||||
vtlog "dmsetup not work, now try to load eglibc ..."
|
||||
|
||||
# install eglibc (some ubuntu 32 bit version need it)
|
||||
LINE=$($GREP 'libc6-.*\.udeb' $VTOY_PATH/iso_file_list)
|
||||
if [ $? -eq 0 ]; then
|
||||
install_udeb_from_line "$LINE" ${vt_usb_disk}
|
||||
fi
|
||||
|
||||
if dmsetup info >> $VTLOG 2>&1; then
|
||||
vtlog "dmsetup work ok after retry"
|
||||
else
|
||||
vtlog "dmsetup still not work after retry"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if is_ventoy_hook_finished || not_ventoy_disk "${1:0:-1}"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vtlog "==== $0 $* ===="
|
||||
|
||||
dmsetup_path=$(ventoy_find_bin_path dmsetup)
|
||||
if [ -z "$dmsetup_path" ]; then
|
||||
ventoy_os_install_dmsetup "/dev/${1:0:-1}"
|
||||
fi
|
||||
|
||||
if ! $GREP -q 'device-mapper' /proc/devices; then
|
||||
ventoy_os_install_dmsetup "/dev/${1:0:-1}"
|
||||
fi
|
||||
|
||||
ventoy_udev_disk_common_hook $*
|
||||
|
||||
#
|
||||
# Some distro default only accept usb partitions as install medium.
|
||||
# So if ventoy is installed on a non-USB device, we just mount /cdrom here except
|
||||
# for these has boot=live or boot=casper parameter in cmdline
|
||||
#
|
||||
VT_BUS_USB=""
|
||||
if [ -n "$ID_BUS" ]; then
|
||||
if echo $ID_BUS | $GREP -q -i usb; then
|
||||
VT_BUS_USB="YES"
|
||||
fi
|
||||
else
|
||||
if $BUSYBOX_PATH/ls -l /sys/class/block/${1:0:-1} | $GREP -q -i usb; then
|
||||
VT_BUS_USB="YES"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$VT_BUS_USB" ]; then
|
||||
vtlog "$1 is USB device"
|
||||
echo /dev/$1 > /ventoy/list-devices-usb-part
|
||||
else
|
||||
vtlog "$1 is NOT USB device (bus $ID_BUS)"
|
||||
|
||||
if $EGREP -q 'boot=|casper' /proc/cmdline; then
|
||||
vtlog "boot=, or casper, don't mount"
|
||||
else
|
||||
vtlog "No boot param, need to mount"
|
||||
echo /dev/$1 > /ventoy/list-devices-usb-part
|
||||
fi
|
||||
fi
|
||||
|
||||
#special process for Linx
|
||||
if $BUSYBOX_PATH/uname -r | $GREP -q "^2\.6"; then
|
||||
if $GREP -q "linx" /proc/version; then
|
||||
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})
|
||||
echo "/dev/$vtDM" > /ventoy/list-devices-usb-part
|
||||
fi
|
||||
fi
|
||||
|
||||
# OK finish
|
||||
set_ventoy_hook_finish
|
42
IMG/cpio/ventoy/hook/deepin/ventoy-hook.sh
Normal file
42
IMG/cpio/ventoy/hook/deepin/ventoy-hook.sh
Normal file
@@ -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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
|
||||
if [ -e /init ] && $GREP -q '^mountroot$' /init; then
|
||||
echo "Here before mountroot ..." >> $VTLOG
|
||||
|
||||
$SED "/^mountroot$/i\\$BUSYBOX_PATH/sh $VTOY_PATH/hook/deepin/disk_mount_hook.sh" -i /init
|
||||
$SED "/^mountroot$/i\\export LIVEMEDIA=/dev/mapper/ventoy" -i /init
|
||||
$SED "/^mountroot$/i\\export LIVE_MEDIA=/dev/mapper/ventoy" -i /init
|
||||
|
||||
if $GREP -q 'live-media=' /proc/cmdline; then
|
||||
if [ -f /scripts/casper ] && $GREP -q '^ *LIVEMEDIA=' /scripts/casper; then
|
||||
$SED "s#^ *LIVEMEDIA=.*#LIVEMEDIA=/dev/mapper/ventoy#" -i /scripts/casper
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Here use udev hook ..." >> $VTLOG
|
||||
ventoy_systemd_udevd_work_around
|
||||
ventoy_add_udev_rule "$VTOY_PATH/hook/deepin/udev_disk_hook.sh %k"
|
||||
fi
|
||||
|
||||
if [ -f $VTOY_PATH/autoinstall ]; then
|
||||
echo "Do auto install ..." >> $VTLOG
|
||||
$SED '/maybe_break[[:space:]]*init/i\/ventoy/busybox/sh /ventoy/hook/deepin/ventoy_autoinstall.sh >>/ventoy/autoinstall.log 2>&1' -i /init
|
||||
fi
|
122
IMG/cpio/ventoy/hook/deepin/ventoy_autoinstall.sh
Normal file
122
IMG/cpio/ventoy/hook/deepin/ventoy_autoinstall.sh
Normal file
@@ -0,0 +1,122 @@
|
||||
#!/ventoy/busybox/sh
|
||||
|
||||
. /ventoy/hook/ventoy_hook_lib.sh
|
||||
|
||||
change_var_value() {
|
||||
local vfile=$1
|
||||
local vkey=$2
|
||||
local vVal=$3
|
||||
local quote=$4
|
||||
local vline
|
||||
|
||||
if [ $quote -eq 0 ]; then
|
||||
vline="$vkey = $vVal"
|
||||
else
|
||||
vline="$vkey = \"$vVal\""
|
||||
fi
|
||||
|
||||
if grep -q -m1 "^$vkey[[:space:]]*=" $vfile; then
|
||||
sed "s#^$vkey[[:space:]]*=.*#$vline#g" -i $vfile
|
||||
else
|
||||
echo "$vline" >> $vfile
|
||||
fi
|
||||
}
|
||||
|
||||
setting_script_process() {
|
||||
local sfile=$1
|
||||
local vItem
|
||||
local vB64Item
|
||||
|
||||
vItem=$(grep '^language[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
change_var_value $sfile 'select_language_default_locale' "$vItem" 0
|
||||
fi
|
||||
|
||||
vItem=$(grep '^timezone[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
change_var_value $sfile 'timezone_default' "$vItem" 0
|
||||
fi
|
||||
|
||||
vItem=$(grep '^hostname[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
change_var_value $sfile 'system_info_default_hostname' "$vItem" 1
|
||||
change_var_value $sfile 'DI_HOSTNAME' "$vItem" 1
|
||||
fi
|
||||
|
||||
vItem=$(grep '^root_password[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
vB64Item=$(echo -n "$vItem" | base64)
|
||||
change_var_value $sfile 'system_info_default_root_password' "$vB64Item" 1
|
||||
change_var_value $sfile 'DI_ROOTPASSWORD' "$vB64Item" 1
|
||||
fi
|
||||
|
||||
vItem=$(grep '^default_username[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
change_var_value $sfile 'system_info_default_username' "$vItem" 1
|
||||
change_var_value $sfile 'DI_USERNAME' "$vItem" 1
|
||||
fi
|
||||
|
||||
vItem=$(grep '^default_password[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
change_var_value $sfile 'system_info_default_password' "$vItem" 1
|
||||
change_var_value $sfile 'DI_PASSWORD' "$vItem" 1
|
||||
fi
|
||||
|
||||
vItem=$(grep '^install_disk[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
|
||||
if [ -n "$vItem" ]; then
|
||||
echo "DI_FULLDISK_MULTIDISK_DEVICE = $vItem" >> $sfile
|
||||
echo "DI_ROOTDISK = $vItem" >> $sfile
|
||||
echo "DI_BOOTLOADER = $vItem" >> $sfile
|
||||
fi
|
||||
|
||||
change_var_value $sfile 'skip_virtual_machine_page' 'true' 0
|
||||
change_var_value $sfile 'skip_select_language_page' 'true' 0
|
||||
change_var_value $sfile 'skip_select_language_page_on_first_boot' 'true' 0
|
||||
change_var_value $sfile 'skip_system_keyboard_page' 'true' 0
|
||||
change_var_value $sfile 'skip_system_info_page' 'true' 0
|
||||
change_var_value $sfile 'skip_qr_code_system_info_page' 'true' 0
|
||||
change_var_value $sfile 'skip_timezone_page' 'true' 0
|
||||
change_var_value $sfile 'skip_partition_page' 'true' 0
|
||||
change_var_value $sfile 'system_info_password_validate_required' '0' 0
|
||||
change_var_value $sfile 'system_info_password_strong_check' 'false' 0
|
||||
change_var_value $sfile 'partition_do_auto_part' 'true' 0
|
||||
change_var_value $sfile 'system_info_disable_license' 'true' 0
|
||||
change_var_value $sfile 'system_info_disable_experience' 'true' 0
|
||||
change_var_value $sfile 'system_info_disable_privacy_license' 'true' 0
|
||||
|
||||
#filesystem.squashfs search ini
|
||||
#first_page_state=0,表示不跳过首页,展示首页让用户自己选择
|
||||
#first_page_state=1,表示跳过首页,并且自动点击一键安装
|
||||
#first_page_state=2,表示跳过首页,并且自动点击自定义安装
|
||||
#first_page_state=3,表示跳过首页,并且直接以全盘安装方式自动安装
|
||||
change_var_value $sfile 'first_page_state' '3' 0
|
||||
}
|
||||
|
||||
update_settings() {
|
||||
local script=$1
|
||||
local newscript
|
||||
|
||||
echo "update_settings for $script ..."
|
||||
|
||||
newscript=$(basename $script)
|
||||
cp -a $script /ventoy/vini_${newscript}
|
||||
setting_script_process /ventoy/vini_${newscript}
|
||||
|
||||
rm -f $script
|
||||
cp -a /ventoy/vini_${newscript} $script
|
||||
}
|
||||
|
||||
sh /ventoy/hook/common/auto_install_varexp.sh /ventoy/autoinstall
|
||||
|
||||
update_settings /root/usr/share/deepin-installer/resources/default_settings.ini
|
||||
|
||||
ls -1 /root/usr/share/deepin-installer/resources/override/ | while read line; do
|
||||
update_settings /root/usr/share/deepin-installer/resources/override/$line
|
||||
done
|
||||
|
||||
ls -1 /root/usr/share/deepin-installer/resources/oem/ | while read line; do
|
||||
update_settings /root/usr/share/deepin-installer/resources/oem/$line
|
||||
done
|
||||
|
||||
|
||||
|
@@ -125,6 +125,7 @@ fi
|
||||
|
||||
#iso-scan (currently only for Fedora)
|
||||
if $GREP -q Fedora /etc/os-release; then
|
||||
if /ventoy/tool/vtoydump -a /ventoy/ventoy_os_param; then
|
||||
if ventoy_iso_scan_check; then
|
||||
echo "iso_scan process ..." >> $VTLOG
|
||||
|
||||
@@ -140,6 +141,7 @@ if $GREP -q Fedora /etc/os-release; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "common process ..." >> $VTLOG
|
||||
|
@@ -64,9 +64,9 @@ ventoy_get_os_type() {
|
||||
elif $GREP -q '[Uu]buntu' /proc/version; then
|
||||
echo 'debian'; return
|
||||
|
||||
# Deepin : do the same process with debian
|
||||
# Deepin :
|
||||
elif $GREP -q '[Dd]eepin' /proc/version; then
|
||||
echo 'debian'; return
|
||||
echo 'deepin'; return
|
||||
|
||||
# rhel5/CentOS5 and all other distributions based on them
|
||||
elif $GREP -q 'el5' /proc/version; then
|
||||
@@ -169,9 +169,9 @@ ventoy_get_os_type() {
|
||||
elif $GREP -q 'fuyu' /etc/os-release; then
|
||||
echo 'openEuler'; return
|
||||
elif $GREP -q 'deepin' /etc/os-release; then
|
||||
echo 'debian'; return
|
||||
echo 'deepin'; return
|
||||
elif $GREP -q 'chinauos' /etc/os-release; then
|
||||
echo 'debian'; return
|
||||
echo 'deepin'; return
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
VTOY_PATH=$PWD/..
|
||||
|
||||
date +"%Y/%m/%d %H:%M:%S"
|
||||
echo downloading envrionment ...
|
||||
echo downloading environment ...
|
||||
|
||||
wget -q -P $VTOY_PATH/DOC/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/dietlibc-0.34.tar.xz
|
||||
wget -q -P $VTOY_PATH/DOC/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/musl-1.2.1.tar.gz
|
||||
@@ -14,6 +14,6 @@ wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/a
|
||||
wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz
|
||||
|
||||
date +"%Y/%m/%d %H:%M:%S"
|
||||
echo downloading envrionment finish...
|
||||
echo downloading environment finish...
|
||||
|
||||
sh all_in_one.sh CI
|
||||
|
@@ -2395,7 +2395,7 @@ function mimg_common_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.91"
|
||||
set VENTOY_VERSION="1.0.93"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
|
93
INSTALL/grub/menu/sl_si.json
Normal file
93
INSTALL/grub/menu/sl_si.json
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"VTLANG_LANGUAGE_NAME": "Slovenija (Slovenski)",
|
||||
|
||||
"VTLANG_STR_HOTKEY_LIST": "L:Jezik F1:Pomoč F2:Prebrskaj F3:ListView F4:Localboot F5:Orodja F6:ExMenu",
|
||||
"VTLANG_STR_HOTKEY_TREE": "L:Jezik F1:Pomoč F2:Prebrskaj F3:TreeView F4:Localboot F5:Orodja F6:ExMenu",
|
||||
"VTLANG_RETURN_PREVIOUS": "Vrnitev v prejšnji meni [Esc]",
|
||||
"VTLANG_RETURN_PRV_NOESC": "Vrnitev v prejšnji meni",
|
||||
|
||||
"VTLANG_MENU_LANG": "Izbira jezika menija",
|
||||
|
||||
"VTLANG_LB_SBOOT_WINDOWS": "Iskanje in zagon sistema Windows",
|
||||
"VTLANG_LB_SBOOT_G4D": "Iskanje in zagon Grub4dos",
|
||||
"VTLANG_LB_SBOOT_HDD1": "Zagon 1. lokalnega diska",
|
||||
"VTLANG_LB_SBOOT_HDD2": "Zagon 2. lokalnega diska",
|
||||
"VTLANG_LB_SBOOT_HDD3": "Zagon 3. lokalnega diska",
|
||||
"VTLANG_LB_SBOOT_X64EFI": "Iskanje in zagon BOOTX64.EFI",
|
||||
"VTLANG_LB_SBOOT_IA32EFI": "Iskanje in zagon BOOTIA32.EFI",
|
||||
"VTLANG_LB_SBOOT_AA64EFI": "Iskanje in zagon BOOTAA64.EFI",
|
||||
"VTLANG_LB_SBOOT_XORBOOT": "Iskanje in zagon xorboot",
|
||||
|
||||
"VTLANG_FILE_CHKSUM": "File checksum",
|
||||
"VTLANG_CHKSUM_MD5_CALC": "Izračunaj md5sum",
|
||||
"VTLANG_CHKSUM_SHA1_CALC": "Izračunaj sha1sum",
|
||||
"VTLANG_CHKSUM_SHA256_CALC": "Izračunaj sha256sum",
|
||||
"VTLANG_CHKSUM_SHA512_CALC": "Izračunaj sha512sum",
|
||||
"VTLANG_CHKSUM_MD5_CALC_CHK": "Izračunaj in preveri md5sum",
|
||||
"VTLANG_CHKSUM_SHA1_CALC_CHK": "Izračunaj in preveri sha1sum",
|
||||
"VTLANG_CHKSUM_SHA256_CALC_CHK": "Izračunaj in preveri sha256sum",
|
||||
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Izračunaj in preveri sha512sum",
|
||||
|
||||
"VTLANG_POWER": "Napajanje",
|
||||
"VTLANG_POWER_REBOOT": "Ponovni zagon",
|
||||
"VTLANG_POWER_HALT": "Halt",
|
||||
"VTLANG_POWER_BOOT_EFIFW": "Ponovni zagon v nastavitev EFI",
|
||||
|
||||
"VTLANG_KEYBRD_LAYOUT": "Postavitev tipkovnice",
|
||||
"VTLANG_HWINFO": "Informacije o strojni opremi",
|
||||
|
||||
"VTLANG_RESOLUTION_CFG": "Nastavitev ločljivosti",
|
||||
"VTLANG_SCREEN_MODE": "Način prikaza na zaslonu",
|
||||
"VTLANG_SCREEN_TEXT_MODE": "Vsili besedilni način",
|
||||
"VTLANG_SCREEN_GUI_MODE": "Vsili grafični način",
|
||||
|
||||
"VTLANG_THEME_SELECT": "Izbira teme",
|
||||
|
||||
"VTLANG_UEFI_UTIL": "Pripomočki Ventoy UEFI",
|
||||
"VTLANG_UTIL_SHOW_EFI_DRV": "Prikaži gonilnike EFI",
|
||||
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Popravek napake Windows BlinitializeLibrary",
|
||||
|
||||
"VTLANG_JSON_CHK_JSON": "Preverite konfiguracijo vtičnika json (ventoy.json)",
|
||||
"VTLANG_JSON_CHK_CONTROL": "Preverite konfiguracijo globalnega nadzornega vtičnika",
|
||||
"VTLANG_JSON_CHK_THEME": "Preverite konfiguracijo vtičnika teme",
|
||||
"VTLANG_JSON_CHK_AUTOINS": "Preverite konfiguracijo vtičnika za samodejno namestitev",
|
||||
"VTLANG_JSON_CHK_PERSIST": "Preverite konfiguracijo vtičnika persistence",
|
||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Preverite konfiguracijo vtičnika menija",
|
||||
"VTLANG_JSON_CHK_MENU_TIP": "Preverite konfiguracijo vtičnika za nasvete menija",
|
||||
"VTLANG_JSON_CHK_MENU_CLASS": "Preverite konfiguracijo vtičnika razreda menija",
|
||||
"VTLANG_JSON_CHK_INJECTION": "Check injection plugin configuration",
|
||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Preverite konfiguracijo vtičnika Auto Memdisk.",
|
||||
"VTLANG_JSON_CHK_IMG_LIST": "Preverite konfiguracijo vtičnika za seznam slik",
|
||||
"VTLANG_JSON_CHK_IMG_BLIST": "Preverite konfiguracijo vtičnika za črno listo slik",
|
||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Preverite boot conf zamenjajte plugin konfiguracijo",
|
||||
"VTLANG_JSON_CHK_DUD": "Preverite konfiguracijo vtičnika dud",
|
||||
"VTLANG_JSON_CHK_PASSWORD": "Preverite konfiguracijo vtičnika za geslo",
|
||||
|
||||
"VTLANG_NORMAL_MODE": "Zagon v običajnem načinu",
|
||||
"VTLANG_WIMBOOT_MODE": "Zagon v načinu wimboot",
|
||||
"VTLANG_GRUB2_MODE": "Zagon v načinu grub2",
|
||||
"VTLANG_MEMDISK_MODE": "Zagon v načinu memdisk",
|
||||
|
||||
"VTLANG_RET_TO_LISTVIEW": "Vrnitev na ListView",
|
||||
"VTLANG_RET_TO_TREEVIEW": "Vrnitev v TreeView",
|
||||
|
||||
"VTLANG_NO_AUTOINS_SCRIPT": "Zagon brez predloge za samodejno namestitev",
|
||||
"VTLANG_AUTOINS_USE": "Zagon z",
|
||||
|
||||
"VTLANG_NO_PERSIST": "Boot without persistence",
|
||||
"VTLANG_PERSIST_USE": "Zagon z",
|
||||
|
||||
"VTLANG_BROWER_RETURN": "Nazaj",
|
||||
|
||||
"VTLANG_ENTER_EXIT": "za izhod pritisnite tipko Enter",
|
||||
"VTLANG_ENTER_REBOOT": "pritisnite tipko Enter za ponovni zagon",
|
||||
"VTLANG_ENTER_CONTINUE": "za nadaljevanje pritisnite tipko Enter",
|
||||
|
||||
"VTLANG_CTRL_TEMP_SET": "Začasne nadzorne nastavitve",
|
||||
"VTLANG_WIN11_BYPASS_CHECK": "Obid preverjanja CPU/TPM/SecureBoot pri namestitvi sistema Windows 11",
|
||||
"VTLANG_WIN11_BYPASS_NRO": "Obid zahteve po spletnem računu pri namestitvi sistema Windows 11",
|
||||
"VTLANG_LINUX_REMOUNT": "Priklopi Ventoy particijo po zagonu Linuxa",
|
||||
"VTLANG_SECONDARY_BOOT_MENU": "Prikaz sekundarnega zagonskega menija",
|
||||
|
||||
"MENU_STR_XXX": ""
|
||||
}
|
@@ -143,7 +143,7 @@ if grep "$DISK" /proc/mounts; then
|
||||
fi
|
||||
|
||||
#check swap partition
|
||||
if swapon --help 2>&1 | grep -q '^ \-s,'; then
|
||||
if swapon --help 2>&1 | grep -q '^ -s,'; then
|
||||
if swapon -s | grep -q "^${DISK}[0-9]"; then
|
||||
vterr "$DISK is used as swap, please swapoff it first!"
|
||||
exit 1
|
||||
|
@@ -905,7 +905,7 @@
|
||||
"STR_PART_CLUSTER":"Taille de cluster",
|
||||
"STR_PART_CLUSTER_DEFAULT":"Valeur par défaut du système",
|
||||
"STR_DONATE":"Faire un don",
|
||||
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.",
|
||||
"STR_4KN_UNSUPPORTED":"Actuellement, Ventoy ne prend pas en charge les appareils natifs 4K.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1489,7 +1489,7 @@
|
||||
"STR_PART_CLUSTER":"Dimensiunea clusterului",
|
||||
"STR_PART_CLUSTER_DEFAULT":"Valoarea implicită a sistemului",
|
||||
"STR_DONATE":"Donează",
|
||||
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.",
|
||||
"STR_4KN_UNSUPPORTED":"Momentan, Ventoy nu suporta dispozitive native 4k.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1822,13 +1822,13 @@
|
||||
"name":"Serbian Latin (Srpski)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur",
|
||||
"Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur, Kosta Stojiljković",
|
||||
|
||||
"STR_ERROR":"Greška",
|
||||
"STR_WARNING":"Upozorenje",
|
||||
"STR_INFO":"Informacija",
|
||||
"STR_INCORRECT_DIR":"Molim Vas, pokrenite me u pravom direktorijumu!",
|
||||
"STR_INCORRECT_TREE_DIR":"Nemojте me pokretati ovde, molim Vas preuzmite objavljeni instalacioni paket i pokrenite me tamo.",
|
||||
"STR_INCORRECT_TREE_DIR":"Nemojtе me pokretati ovde, molim Vas preuzmite objavljeni instalacioni paket i pokrenite me tamo.",
|
||||
"STR_DEVICE":"Uređaj",
|
||||
"STR_LOCAL_VER":"Ventoy u paketu",
|
||||
"STR_DISK_VER":"Ventoy u uređaju",
|
||||
@@ -1879,7 +1879,7 @@
|
||||
"STR_PART_CLUSTER":"Veličina klastera",
|
||||
"STR_PART_CLUSTER_DEFAULT":"Podrazumevana sistemska vrednost",
|
||||
"STR_DONATE":"Donirajte",
|
||||
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.",
|
||||
"STR_4KN_UNSUPPORTED":"Ventoy trenutno ne podržava 4K izvorne uređaje.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1887,7 +1887,7 @@
|
||||
"name":"Serbian Cyrillic (Српски)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur",
|
||||
"Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur, Kosta Stojiljković",
|
||||
|
||||
"STR_ERROR":"Грешка",
|
||||
"STR_WARNING":"Упозорење",
|
||||
@@ -1923,7 +1923,7 @@
|
||||
"STR_SHOW_ALL_DEV":"Прикажи све уређаје",
|
||||
"STR_PART_ALIGN_4KB":"Поравнајте партиције са 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Комуникациона грешка:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Комуникациона грешка: ненормално даљинско управљање",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Комуникациона грешка: Ненормално даљинско управљање",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Комуникациона грешка: Захтев је истекао",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Комуникациона грешка: Сервис је недоступан",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Статус демона ажуриран, покушајте поново касније.",
|
||||
@@ -1944,7 +1944,7 @@
|
||||
"STR_PART_CLUSTER":"Величина кластера",
|
||||
"STR_PART_CLUSTER_DEFAULT":"Подразумевана системска вредност",
|
||||
"STR_DONATE":"Донирајте",
|
||||
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.",
|
||||
"STR_4KN_UNSUPPORTED":"Ventoy тренутно не подржава 4К изворне уређаје.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
|
@@ -164,7 +164,7 @@
|
||||
}
|
||||
|
||||
function CommonPasswordEntry(tbl, name, cn, en) {
|
||||
var tr = '<tr><td>'+name+'</td><td><input type="text" class="form-control" id="id_'+name+'" disabled="disabled"/></td>' +
|
||||
var tr = '<tr><td>'+name+'</td><td><input type="password" class="form-control" id="id_'+name+'" disabled="disabled"/></td>' +
|
||||
'<td><button id="id_btn_set_'+name+'" class="btn btn-primary btn-sm btn-add CommPwdSetBtn"><span class="fa fa-edit"></span><span id="id_span_edit"></span></button> ' +
|
||||
'<button id="id_btn_clr_'+name+'" class="btn btn-danger btn-sm btn-del CommPwdClearBtn"><span class="fa fa-trash"></span><span id="id_span_clear"></span></button></td>' +
|
||||
'<td><span id="id_span_desc_cn">' + cn + '</span>' +
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
@@ -444,6 +445,29 @@ static int vtoy_vlnk_printf(ventoy_os_param *param, char *diskname)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int vtoy_check_iso_path_alpnum(ventoy_os_param *param)
|
||||
{
|
||||
char c;
|
||||
int i = 0;
|
||||
|
||||
while (param->vtoy_img_path[i])
|
||||
{
|
||||
c = param->vtoy_img_path[i];
|
||||
|
||||
if (isalnum(c) || c == '_' || c == '-')
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vtoy_check_device(ventoy_os_param *param, const char *device)
|
||||
{
|
||||
unsigned long long size;
|
||||
@@ -560,6 +584,7 @@ int vtoydump_main(int argc, char **argv)
|
||||
int rc;
|
||||
int ch;
|
||||
int print_path = 0;
|
||||
int check_ascii = 0;
|
||||
int print_fs = 0;
|
||||
int vlnk_print = 0;
|
||||
char filename[256] = {0};
|
||||
@@ -567,7 +592,7 @@ int vtoydump_main(int argc, char **argv)
|
||||
char device[64] = {0};
|
||||
ventoy_os_param *param = NULL;
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:f:p:t:s:v::")) != -1)
|
||||
while ((ch = getopt(argc, argv, "a:c:f:p:t:s:v::")) != -1)
|
||||
{
|
||||
if (ch == 'f')
|
||||
{
|
||||
@@ -586,6 +611,11 @@ int vtoydump_main(int argc, char **argv)
|
||||
print_path = 1;
|
||||
strncpy(filename, optarg, sizeof(filename) - 1);
|
||||
}
|
||||
else if (ch == 'a')
|
||||
{
|
||||
check_ascii = 1;
|
||||
strncpy(filename, optarg, sizeof(filename) - 1);
|
||||
}
|
||||
else if (ch == 't')
|
||||
{
|
||||
vlnk_print = 1;
|
||||
@@ -660,6 +690,10 @@ int vtoydump_main(int argc, char **argv)
|
||||
{
|
||||
rc = vtoy_check_device(param, device);
|
||||
}
|
||||
else if (check_ascii)
|
||||
{
|
||||
rc = vtoy_check_iso_path_alpnum(param);
|
||||
}
|
||||
else
|
||||
{
|
||||
// print os param, you can change the output format in the function
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,7 +4,7 @@ Build a static linked, small zstdcat tool
|
||||
use an old version of zstd
|
||||
https://codeload.github.com/facebook/zstd/zip/v1.0.0
|
||||
|
||||
======== Build Envrioment ========
|
||||
======== Build Environment ========
|
||||
build for 32bit, static linked with dietlibc
|
||||
1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso
|
||||
2. yum install gcc gettext gettext-devel
|
||||
|
@@ -2191,7 +2191,7 @@ static BOOL VentoyIsNeedBypass(const char *isofile, const char MntLetter)
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("This is not Windows 11, not need to bypass.", Major);
|
||||
Log("This is not Windows 11, not need to bypass %u.", Major);
|
||||
}
|
||||
|
||||
End:
|
||||
|
Reference in New Issue
Block a user