Ventoy icon indicating copy to clipboard operation
Ventoy copied to clipboard

Make it possible to change the size of the EFI partition

Open m9tdev opened this issue 5 years ago • 9 comments

At the moment the size of the EFI partition is hard-coded to 32MB. I would like to install other bootloaders on the same usb device, but the limit of 32MB is too small for that. I multiplied the VENTOY_PART_SIZE, VENTOY_PART_SIZE_MB and VENTOY_SECTOR_NUM values by 16 in the tool/ventoy_lib.sh file which succesfully results in a EFI partition of 512MB.

This all seems to work fine until I boot from it. I get the following error message:

!!!!!!!!!!!! WARNING !!!!!!!!!!!!
!!!!!!!!!!!! WARNING !!!!!!!!!!!!
!!!!!!!!!!!! WARNING !!!!!!!!!!!!

This is NOT a standard Ventoy device and is NOT supported.

You should follow the instructions in https://www.ventoy.net to use Ventoy.

From what I can find this comes from the GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c file because of the following if-statement:

    if ((partition->number != 1) || (partition->len != 65536) || (offset != partition->start))

I'm not sure if this is the only place where this is checked and I'm not really proficient in writing C, but if someone can point me in the right directions, maybe I can help to remove this check or at least make it a configurable variable instead of hard-coded.

m9tdev avatar Dec 14 '20 22:12 m9tdev

:thinking: I hope also that the collaboration with other boot managers can be improved another bit. The size requirements can be reconsidered then for the involved partitions, can't they?

elfring avatar Jan 27 '21 20:01 elfring

See https://github.com/ventoy/Ventoy/commit/8bbd5a14a3ca4820266bed6afc1314c3f41e76c3

a1ive avatar Jan 28 '21 00:01 a1ive

@a1ive: Do you know anybody who would like to add translations for the linked information?

elfring avatar Jan 28 '21 07:01 elfring

Anyway, why it's so small? What if some update will need bigger efi partition? It's already almost full

megapro17 avatar Oct 20 '21 03:10 megapro17

Same problem with me .... I want to integrate Grub2FM in efi partition mot 3rd partition

parvindergithub avatar Sep 18 '22 21:09 parvindergithub

Just add the grubfm_multiarch.iso to the first partition.

steve6375 avatar Sep 19 '22 06:09 steve6375

I would like to make this partition bigger as well. Some diagnostic tools can save reports and diagnostic files to FAT / EFI partitions, and VTOYEFI is just too small to fit them.

selurvedu avatar May 27 '23 12:05 selurvedu