# ventoy **Repository Path**: g-system/ventoy ## Basic Information - **Project Name**: ventoy - **Description**: vbox + UDisk_Ventoy ./ventoy - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.ventoy.net/cn/doc_news.html - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-19 - **Last Updated**: 2025-11-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README **TODO** - vbox调试: vmdk主盘+ usb1.1配置盘 - 拆分:ks_pre.sh `@iso:/run/install/repo/ks/ @sysconfig @url` - external.cfg 全清安装/指定安装/自定调整安装 - preseed.cfg ubuntu/debian ```bash # DIR kickstart_openEuler ``` - usb.vmdk转接模式(模拟为硬盘模式) - oe.ks环境:对文件做读/写,会触发vbox错误`medium "ahci-0-0" (rc=VERR_ACCESS_DENIED)` ```bash # vboxErr The I/O cache encountered an error while updating data in medium "ahci-0-0" (rc=VERR_ACCESS_DENIED). Make sure there is enough free space on the disk and that the disk is working properly. Operation can be resumed afterwards. # %include /tmp/ks_pre2_diskformat # 1.不注释时,先跳出找不到它的err, vboxErr暂未出还可交互操作(ctl+alt+f2进shell); 点关闭vm:出vboxErr # 2.注释之,初进UI桌面/现鼠标时即出vboxErr; oe01b.cfg>> [手动mnt:echo 123>abc.txt;未真实写入盘] # C:\Program Files\Oracle\VirtualBox VBoxManage internalcommands createrawvmdk -filename "/usb.vmdk" -rawdisk /dev/sdX #nux VBoxManage internalcommands createrawvmdk -filename "c:/usb2.vmdk" -rawdisk \\.\PhysicalDrive1 #win(x: win-磁盘管理-磁盘号) # usb2_black_new.vmdk # Disk DescriptorFile version=1 CID=6c2e0558 parentCID=ffffffff createType="fullDevice" # Extent description RW 31260672 FLAT "\\.\PhysicalDrive1" 0 # The disk Data Base #DDB ddb.virtualHWVersion = "4" ddb.adapterType="ide" ddb.geometry.cylinders="16383" ddb.geometry.heads="16" ddb.geometry.sectors="63" ddb.uuid.image="56152f82-f624-4b43-ae93-fef32b76e07f" ddb.uuid.parent="00000000-0000-0000-0000-000000000000" ddb.uuid.modification="00000000-0000-0000-0000-000000000000" ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" ``` - Extension_Pack|U盘控制器模式 ```bash # VM内:取消原usb_disk3/1.vmdk, USB设备>控制器2.0>序列号尾号5031[对应usb_black_newU盘] # 1.启动后:默认优先从USB设备读取了(ventoy:对应usb_black_newU盘) # 2.启动后:宿主机对应设备会消失 # 3.安装过程:能识别到SYSCONFIG盘,并可操作读写 # 4.关VM: 宿主机对应设备恢复 ``` ## 附 - ventoy-conf ```bash # ventoy-common # https://www.ventoy.net/cn/doc_mbr_vs_gpt.html #优先MBR格式 # https://www.ventoy.net/cn/doc_name_identifier.html #_VTNORMAL/MEMDISK/GRUB2/WIMBOOT # ventoy-plugin # https://www.ventoy.net/cn/plugin_plugson.html #VentoyPlugson.exe # https://www.ventoy.net/cn/plugin_dual_option.html # theme: theme_legacy/uefi/ia32/aa64/mips # control: control_legacy/uefi/ia32/aa64/mips # auto_ins: auto_install_legacy/uefi/ia32/aa64/mips # https://www.ventoy.net/cn/plugin_imagelist.html #.ventoyignore E:\iso\livecd\livecd_arm64_down touch .ventoyignore # https://www.ventoy.net/cn/plugin_control.html "control": [ { "VTOY_MENU_LANGUAGE": "zh_CN" }, #菜单语言,"en_US","zh_CN" 等。默认en_US { "VTOY_DEFAULT_KBD_LAYOUT": "QWERTY_USA" }, #键盘布局,默认是 QWERTY_USA { "VTOY_DEFAULT_MENU_MODE": "0" }, #显示模式,"0":列表模式 "1":TreeView 模式。 默认0列表 { "VTOY_TREE_VIEW_MENU_STYLE": "0" }, #TreeView模式下的菜单风格,"0":显示DIR/SIZE "1":不显 默认0 { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" }, #过滤以 ._ 开头的文件(macOS)。"0": 不过滤 "1":过滤 { "VTOY_SORT_CASE_SENSITIVE": "0" }, #菜单排序, "0":大小写不敏感 "1":大小写敏感 默认0 { "VTOY_FILE_FLT_EFI": "1" }, #{ISO,VIM,EFI,IMG,VHD,VTOY}; "0": 不过滤.efi文件 "1": 过滤 默认0 { "VTOY_VHD_NO_WARNING": "0" }, #启动Win VHD(x)时,如果U盘分区不是NTFS格式,"0": 则显示告警信息 "1": 不显示 默认0 { "VTOY_WIN11_BYPASS_CHECK": "1" }, #Win11安装硬件检查, "0": 不绕过 "1": 绕过 默认1 { "VTOY_WIN11_BYPASS_NRO": "1" }, #Windows 11安装时的在线账户,"0": 不绕过 "1": 绕过 默认1 { "VTOY_MENU_TIMEOUT": "10" }, #菜单倒计时(秒)。默认不设置 { "VTOY_MAX_SEARCH_LEVEL": "max" }, #搜索子目录的层数,取值为:max 0 1 2 3 ... 默认值为:max { "VTOY_DEFAULT_SEARCH_ROOT": "/iso" }, #指定搜索ISO文件的根目录 { "VTOY_DEFAULT_IMAGE": "/iso/debian_netinstall.iso" }, #设置默认选中的镜像, 默认第1个 { "VTOY_SECONDARY_BOOT_MENU": "1" }, #二级启动菜单, "0": 不显示 "1": 显示 默认1 { "VTOY_SECONDARY_TIMEOUT": "3" } #二级菜单倒计时(秒),倒计时后,自动选第一项(normal mode) ], # https://www.ventoy.net/cn/plugin_autoinstall.html curl -O https://www.ventoy.net/download/unattended.xml curl -O https://www.ventoy.net/download/deepin.ini.txt curl -O https://www.ventoy.net/download/kickstart8.cfg.txt curl -O https://www.ventoy.net/download/kickstart7.cfg.txt curl -O https://www.ventoy.net/download/kickstart6.cfg.txt curl -O https://www.ventoy.net/download/preseed.cfg.txt curl -O https://www.ventoy.net/download/cloud-init-user-data.txt curl -O https://www.ventoy.net/download/autoYast.xml # https://www.ventoy.net/cn/plugin_password.html "password": { "bootpwd": "txt#123456", "isopwd": "txt#111", # "wimpwd": "txt#222", # "imgpwd": "txt#333", # "vhdpwd": "txt#444", # "efipwd": "txt#555", # "vtoypwd": "txt#666", "menupwd": [ { "file":"/iso/ubuntu-20.04-desktop-amd64.iso", "pwd":"md5#abc#0659c7992e268962384eb17fafe88364" #"盐"+密码文本#MD5值 } ] } ``` - vbox-vers - https://www.virtualbox.org/wiki/Download_Old_Builds - https://www.virtualbox.org/wiki/Download_Old_Builds_4_3 `EOF: 2015/12` - https://www.virtualbox.org/wiki/Download_Old_Builds_5_2 `EOF: 2020/07` - https://www.virtualbox.org/wiki/Download_Old_Builds_6_1 `EOF: 2024/01` - https://www.virtualbox.org/wiki/Download_Old_Builds_7_2 - - https://download.virtualbox.org/virtualbox/4.3.40/Oracle_VM_VirtualBox_Extension_Pack-4.3.40-110317a.vbox-extpack #15.1M - https://download.virtualbox.org/virtualbox/5.2.44/Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack #25.5M - https://download.virtualbox.org/virtualbox/7.2.2/Oracle_VirtualBox_Extension_Pack-7.2.2.vbox-extpack #21.7M ```bash # https://www.virtualbox.org/wiki/Download_Old_Builds # VirtualBox 4.3.40 (released August 22nd 2016) # VirtualBox 5.2.44 (released July 14 2020) # VirtualBox 6.1.50 (released January 16 2024) ##start.新UI # VirtualBox 7.2.0 (released August 14 2025) ## Administrator@sam-pincun MINGW64 /d/DOWN4/vbox_vers $ pwd /d/DOWN4/vbox_vers $ ls -lh total 755M -rwxr-xr-x 1 Administrator 197121 99M Sep 23 15:06 VirtualBox-4.3.40-110317-Win.exe* -rwxr-xr-x 1 Administrator 197121 106M Dec 11 2023 VirtualBox-5.2.44-139111-Win.exe* ## -rwxr-xr-x 1 Administrator 197121 109M Dec 11 2023 VirtualBox-5.2.8-121009-Win.exe* -rwxr-xr-x 1 Administrator 197121 107M Dec 11 2023 VirtualBox-6.1.36-152435-Win.exe* -rwxr-xr-x 1 Administrator 197121 106M Dec 11 2023 VirtualBox-7.0.10-158379-Win.exe* -rwxr-xr-x 1 Administrator 197121 168M Sep 23 10:57 VirtualBox-7.2.2-170484-Win.exe* ##ins.Err # -rw-r--r-- 1 Administrator 197121 16M Sep 23 15:08 Oracle_VM_VirtualBox_Extension_Pack-4.3.40-110317a.vbox-extpack -rw-r--r-- 1 Administrator 197121 26M Sep 23 12:01 Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack -rw-r--r-- 1 Administrator 197121 22M Sep 23 11:55 Oracle_VirtualBox_Extension_Pack-7.2.2.vbox-extpack ``` - gemmi-vbox10 `VBoxManage createmedium` ```bash # VBoxManage createmedium #vbox6+ C:\Program Files\Oracle\VirtualBox>VBoxManage createmedium disk --filename c:/usb_disk2.vmdk --variant RawDisk --format VMDK --property RawDrive=\\.\PhysicalDrive2 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: 9693fe7e-fe01-482a-96d9-0e9afb3473f4 # Disk DescriptorFile version=1 CID=55f28951 parentCID=ffffffff createType="fullDevice" # Extent description RW 31260672 FLAT "\\.\PhysicalDrive2" 0 # The disk Data Base #DDB ddb.virtualHWVersion = "4" ddb.adapterType="ide" ddb.geometry.cylinders="16383" ddb.geometry.heads="16" ddb.geometry.sectors="63" ddb.uuid.image="9693fe7e-fe01-482a-96d9-0e9afb3473f4" ddb.uuid.parent="00000000-0000-0000-0000-000000000000" ddb.uuid.modification="00000000-0000-0000-0000-000000000000" ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" ``` - ks_pre2_diskformat ```bash # ff: ventoy\script\sys_tes_ks_external.cfg %pre --log=/tmp/_log_pre2_external.log # 取得Ventoy标签的磁盘; 未匹配则回执notfind VTOY=$(ls -l /dev/disk/by-label/ |grep VTOYEFI) test -z "$VTOY" && VTOY="notfindX"; VTOY=${VTOY##*/}; VTOY=${VTOY%?} # 按by-id获取磁盘列表排序, 过滤:VTOY盘/id按usb打头的盘, 取top1为选用的安装盘 disks=$(ls -l /dev/disk/by-id/ |grep "\->" |awk '{print $11"|"$9}' |egrep -v "\-part|dm-name|^$" |sort) #by-id/by-path; 前者换插口不会变 VTOY_ID=$(echo "$disks" |egrep "$VTOY\|" |cut -d'|' -f2) INSDISK_ID=$(echo "$disks" |egrep -v "$VTOY\||\|usb" |head -1 |cut -d'|' -f2) INSDISK=$(echo "$disks" |grep "$INSDISK_ID" |cut -d'|' -f1); INSDISK=${INSDISK##*/}; #view echo "VTOY: $VTOY, VTOY_ID: $VTOY_ID" echo "INSDISK: $INSDISK, INSDISK_ID: $INSDISK_ID" echo "###availableDisks:" echo "$disks" #|egrep -v "$VTOY\|" touch /tmp/ks_pre2_diskformat test "notfind" != "$VTOY" && wipefs -f -a -b /dev/disk/by-id/$INSDISK_ID #/dev/sdb> by-id test "notfind" != "$VTOY" && echo """ ignoredisk --drives=/dev/$VTOY #ignoredisk --drives=/dev/disk/by-id/$VTOY_ID clearpart --all --drives=disk/by-id/$INSDISK_ID #10000 #10G part /boot/efi --fstype efi --size 200 --ondisk disk/by-id/$INSDISK_ID part / --fstype ext4 --size 10000 --ondisk disk/by-id/$INSDISK_ID """ > /tmp/ks_pre2_diskformat # dbg-for-safety echo "" > /tmp/ks_pre2_diskformat %end # 二次pre段所生成ks代码块 # %include /tmp/ks_pre2_diskformat ``` - win-diskpart `list-volume` ```bash mkdir ISO; cd ISO; # Administrator@sam-pincun MINGW64 /e/ISO $ mkdir debian ubuntu openEuler/cust -p # Administrator@sam-pincun MINGW64 /d/UserData/Desktop/=repos/_ee/_oee/_oe/ventoy/script (master) # $ echo -e "sel disk 2 \nlist part" |diskpart Microsoft DiskPart version 10.0.15063.0 Copyright (C) Microsoft Corporation. On computer: SAM-PINCUN DISKPART> Disk 2 is now the selected disk. DISKPART> Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 14 GB 1024 KB Partition 2 Primary 32 MB 14 GB DISKPART> # $ echo "list volume" |diskpart Microsoft DiskPart version 10.0.15063.0 Copyright (C) Microsoft Corporation. On computer: SAM-PINCUN DISKPART> Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 C sys NTFS Partition 115 GB Healthy Boot Volume 1 D ext NTFS Partition 216 GB Healthy Volume 2 FAT32 Partition 4300 MB Healthy System Volume 3 F VENTOY FAT32 Removable 7039 MB Healthy Volume 4 VTOYEFI FAT Removable 32 MB Healthy Volume 5 G SYSCONFIG FAT32 Removable 2048 MB Healthy Volume 6 H VENTOY FAT32 Removable 1027 MB Healthy Volume 7 E Ventoy exFAT Removable 14 GB Healthy DISKPART> ```