enigma131 / Ventoy

A new bootable USB solution.

Home Page:https://www.ventoy.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ventoy

This is a fork from original Ventoy V1.0.71 module. This modified version will try to install locally on hard disk 0 in partition 2 in replacement of MSR one. Menu will be done by adding a grub line for it. My try is done on GPT system. Functionality was asked here but not done.

Installing/compiling:

  1. Resize sda1 efi partition to 84 Mo, to have exactly 32 Mb (65536 secteor * 512 bytes) space for new sda2.
  2. Delete partion MSR, create sda2 starting at end of sda1 32 Mo, format it to fat 16 and rename it to VTOYEFI. There must be no space between sda1 and sda2 and sda1 must sart at sector 2048. sda2 must be hidden for Microsoft system. Here my result for command sudo fdisk -l :

Device Start End Sectors Size Type /dev/sda1 2048 174079 172032 84M EFI System /dev/sda2 174080 239615 65536 32M unknown /dev/sda3 239616 202612735 202373120 96.5G Microsoft basic data /dev/sda4 202612736 204797951 2185216 1G Windows recovery environment /dev/sda5 204797952 361048063 156250112 74.5G Linux filesystem /dev/sda6 361048064 468860927 107812864 51.4G Microsoft basic data

  1. Copy a Ventoy formatted USB stick 1.0.71 partition VTOYEFI to this partition
  2. Modify grub patition start (6 for me) instead 1 in (sda2) grub/grub.cfg -> set vtoy_iso_part=($vtoy_dev,6)
  3. Modify ventoy_cmd.c and ventoy_unix.c. Repack BOOTX64.EFI and replace it in sda2 part
  4. Modify ctoydump.c, then recompile vtoytool_64.

Uncompress original tool.cpio: (in ventoy_x86.cpio):

busybox cpio -i -m -F tool.cpio

Replace vtoytool_64, then create new cpio:

find tool | busybox cpio -o -H newc --owner=root:root >./tool.cpio

Recompress it:

xz tool.cpio

Uncompress original ventoy_x86.cpio:

busybox cpio -i -m -F ventoy_x86.cpio

Replace tool.cpio.xz form above Repack all, then replace result in sda2 part:

find ventoy | busybox cpio -o -H newc --owner=root:root >./ventoy_x86.cpio
  1. Modify vtoyjump.c, recompile vtoyjump64.exe and replace it in sda2 part.

  2. Create chainloader entry in grub menu

Edit Grub custom:

sudo nano /etc/grub.d/40_custom

Add the lines : menuentry 'Ventoy' { chainloader (hd0,2)/EFI/BOOT/BOOTX64.EFI } Save file, then:

sudo update-grub

Et voila!

About

A new bootable USB solution.

https://www.ventoy.net

License:GNU General Public License v3.0


Languages

Language:C 84.3%Language:Shell 5.2%Language:HTML 3.0%Language:C++ 2.2%Language:CSS 1.4%Language:Makefile 1.3%Language:JavaScript 1.0%Language:M4 0.6%Language:Roff 0.4%Language:Python 0.3%Language:Assembly 0.2%Language:QMake 0.0%Language:Perl 0.0%Language:SCSS 0.0%Language:Dockerfile 0.0%