Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to change the size of the EFI partition #648

Open
mathieupost opened this issue Dec 14, 2020 · 9 comments
Open

Make it possible to change the size of the EFI partition #648

mathieupost opened this issue Dec 14, 2020 · 9 comments

Comments

@mathieupost
Copy link

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.

@elfring
Copy link

elfring commented Jan 27, 2021

🤔 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?

@a1ive
Copy link
Contributor

a1ive commented Jan 28, 2021

See 8bbd5a1

@elfring
Copy link

elfring commented Jan 28, 2021

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

@megapro17
Copy link

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

@parvindergithub
Copy link

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

@steve6375
Copy link

Just add the grubfm_multiarch.iso to the first partition.

@selurvedu
Copy link

selurvedu commented May 27, 2023

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.

@Prototyped
Copy link

I'd like to boot a Windows-to-go VHDX, which requires the Windows boot manager and its support files to live on the EFI system partition. They don't fit alongside the Ventoy bootloader and support files in just 32 MB. :(

C:\Windows\System32>cd /d f:\

f:\>dir f:
 Volume in drive F is VTOYEFI
 Volume Serial Number is F767-A619

 Directory of f:\

23/08/2023  01:23    <DIR>          grub
23/08/2023  01:23    <DIR>          ventoy
23/08/2023  01:23    <DIR>          EFI
23/08/2023  01:23               829 ENROLL_THIS_KEY_IN_MOKMANAGER.cer
23/08/2023  01:23    <DIR>          tool
14/07/2024  08:13            13,471 z690 UD DDR4 Crambs
               2 File(s)         14,300 bytes
               4 Dir(s)      14,781,952 bytes free

f:\>bcdboot g:\Windows /s f: /f UEFI
Failure when attempting to copy boot files.

f:\>dir
 Volume in drive F is VTOYEFI
 Volume Serial Number is F767-A619

 Directory of f:\

23/08/2023  01:23    <DIR>          grub
23/08/2023  01:23    <DIR>          ventoy
23/08/2023  01:23    <DIR>          EFI
23/08/2023  01:23               829 ENROLL_THIS_KEY_IN_MOKMANAGER.cer
23/08/2023  01:23    <DIR>          tool
14/07/2024  08:13            13,471 z690 UD DDR4 Crambs
               2 File(s)         14,300 bytes
               4 Dir(s)         448,000 bytes free

@steve6375
Copy link

Ventoy can boot from VHD files directly. The size of the EFI partition cannot be changed and it's contents will be wiped and replaced every time you update the Ventoy version anyway.
https://ventoy.net/en/plugin_vhdboot.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants