Jump to content











Photo
- - - - -

Integrate grub4dos UEFI and MBR in Ventoy devices

grub4dos uefi grub4dos mbr ventoy

  • Please log in to reply
34 replies to this topic

#26 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 24 September 2022 - 03:20 PM

@alacran

I see some of your menus (e.g. UEFI-vhds.lst) assume that the USB boot drive is hd0.

 

With UEFI this cannot be assumed. Unlike MBR\Legacy grub4dos/grub2 etc.  the boot drive is often not hd0 - it can be hd4 or hd1 or anything.

hd0 under UEFI could be the users main system hard disk!

 

It seems to me in this case Ventoy takes care to make the boot device hd0, and in turn runs ventoy_grub.cfg when selected, and from it, it's loaded bootia32_g4d.efi or bootx64_g4d.efi, from $vtoy_efi_part that is in the second partition (hd0, msdos2), then the G4E menu.lst when loaded is in (hd0,1), and it seachs for the secondary UEFI menu files in (hd0,0), and if found makes root (just to make sure) where is located /Ventoy.tag [first partition of USB device or (hd0,0)], before chainload to the secondary menus.  So I think the potential issue you mentioned is avoided.  Don't you think?

 

I decided to use tag files to avoid this issue, as I also have into my internal HD G4E and MBR menus, with same names in some cases, from my previous tests, and also same apply for VHDs.

 

P.S. Just in case you didn't know. Another internal variable is @uefi

 

so under grub4dos, @uefi is not set, but under grub4efi64 it is set to 64 and under grub4efi32 it is set to 32

 

So you can use the same menu.lst file for all boot environments by checking this variable

 

I didn't know this variable.

 

In fact my first idea was to unify as much as possible the secondary menus, but it is not very practical in this case as in MBR G4D commands for Wimboot VHDs from a USB device, require to be mapped as (hd-1) not as (hd), as it is mentioned in the comments in vhds-USB.lst

 

And in G4E no matter if internal HD or USB device they are always mapped as (hd), so to avoid users confusion and also trying to make things as much clear as possible for non advanced users, I took the decision to keep the secondary menus separated.

 

I appreciate a lot your comments, and you can be sure I will run some test to make me more familiar with them, and I will evaluate again the idea of unify the menus, as long as the commands don't result very complicated for non advanced users, as in the end the main idea of make public this project is induce other users, especially non advanced users to start experimenting, as that's the way I have learned all the few I know now.

 

I still remember when started using RmPrepUSB, it was a great experience for me, so much I was voluntary to make Spanish translation, you were my teacher in MBR grub4dos, so I have a big respect for you and all your knowledge in the subject.

 

Same happenned also with WinNTSetup, it that case I asked JFX if it was possible to translate it to Spanish, to make it more accessible for people that don't speak English, he was agree, and mine was the first translation to other lang.

.

I also made the Spanish translations for Wimlib-clc, ImDisk Toolkit and Ventoy, with the idea that all this Great tools that took so much effort to the developers, and are free shared, deserve to be Universaly used and recognized.

 

So again thaks for your disinterested advice.

 

alacran



#27 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 25 September 2022 - 02:56 AM

JFYI

 

I am sorry, but for an involuntary omision I forgot to change in UEFI-vhds.lst the path to (hd0,1)/EFI/grub/ntfs_x64.efi, useful to UEFI boot single partition NTFS VHD files, if your PC Bios/firmware lacks NTFS drivers.

 

And also forgot to add an entry in G4E menu.lst to chainload to a1ive grub2 File Manager (hd0,0)/agFM/grubfm_multiarch.iso

 

Integrate grub4dos UEFI and MBR in Ventoy devices v1.1, has being re-uploaded to include the fixed files.

 

To the people who downloaded it before this post, there is no need to download it again, just download the attachment in this post and extract the files in respective locations overwriting the previous.

 

Attached Fix.7z   >>>   Password = alacran

 

alacran

Attached Files

  • Attached File  Fix.7z   1.53KB   468 downloads


#28 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 26 September 2022 - 07:44 AM

FYI - see issue with grub4efi and vdiskchain

https://github.com/c...4dos/issues/378

for file paths with spaces, double quotes are needed and the \ characters need to be removed



#29 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 26 September 2022 - 08:33 AM

Good to know, but I never had that issue since I always avoid spaces in all my WIM, ISO or VHD files, as an example see:

 

From: http://reboot.pro/in...662#entry221723

 

I have being able to boot Ubuntu.vhd.vtoy, Linux_Mint.vhd.vtoy and Linux_Lite.vhd.vtoy.   Following some samples of entries in grub4dos and A1ve's grub2

 

So I think as a general rule it is better to avoid spaces in all mentioned files, example:

MS original ISO files for OS installations don't have spaces in file name, like:
Win10_2004_English_x64.iso or Win10_2004_Spanish(Mexico)_x64.iso

 

alacran



#30 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 26 September 2022 - 08:46 AM

If you read the issue, you can see that there is a simple fix. Just use doublequotes :-)

Then you can support filenames with spaces with just a simple change to your menus.

The issue is with grub4efi only.



#31 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 26 September 2022 - 09:59 AM

Of course I read it before make my previous post, my comment is in some way related to yaya answer:

 

 

Does help text need modifying to specify quotes needed `?
I think it's Microsoft's rule

 

I don't mean it was your fault, I perfectly understood it was the first time you found that issue and it is only present in G4E, just that I think it is not a bad idea to recommend as a general rule: always avoid spaces in WIM, ISO and VHD names, to be in the safe side.

 

By the way, just after make my previous, post I went back to make an issue report too, related to Differential VHDs:

 

https://github.com/c...4dos/issues/379

 

alacran



#32 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 26 September 2022 - 08:25 PM

JFYI

 

This is the answer from yaya related to Differential VHDs:

 

From: https://github.com/c...ment-1258001726

 

G4E once realized the first level difference, but it has no practical use, just an experiment. This function has been removed in the new version. No longer supported!

 

Differential VHDs are not directly supported anymore in G4E.  So no way to Ramboot them.

 

Only option remaining in grub4dos to filedisk boot differential VHDs (in MBR and UEFI), is by means of using the external command ntloader, as in my ntloader menus included in this project.

 

Also Ventoy is capable to filedisk boot differential VHDs (in MBR and UEFI).

 

alacran



#33 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 01 October 2022 - 05:51 AM

JFYI

 

These are some of the changes that will be included in the future v1.2, (still working in it).

 

Attached you can see a photo taken when (MBR) Rambooting my MinWin-WBCOPY.vhd.lz4, in a PC having 4 GB of Ram, the compressed *.lz4 file size is 965 MB.

 

As you can see I have being adding also some cosmetic details, as Ventoy icons to the 2 partitions of the USB device, that not only looks nice, but also is useful to easy find both partitions.

 

Additionally after some editions, now ntloader.lst and ntloader-2.lst files are used in MBR and UEFI, the files UEFI-ntloader.lst and UEFI-ntloader-2.lst, will not be used anymore.

 

alacran

Attached Thumbnails

  • Ramboot-MinWin-WBCOPY_vhd_lz4.png


#34 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 10 October 2022 - 10:19 PM

Before releasing the new v1.2, I made a full review of all post in this topic, and found there are some inaccuracies in some of them that need to be clarified:

 

From steve6375 info in Post No.2:

 

Why do you add files to the Ventoy partition 2?

 

Why not modify the boot*.efi files so they load a menu.lst from Ptn1:\ventoy folder?

 

Then you would not need to modify partition 2 at all.

 

 

From steve6375 info in Post No. 6

 

OK - your choice, but by using a modified EFI file there is no need to add files to the VTOYEFI partition at all and no need to have to add files when you update to a later version of Ventoy.  All grub4efi files will be on the first partition - seems much better to me

 

 

Previous info is totally wrong as every time our Ventoy USB device is updated using its tool Ventoy2Disk.exe, the VTOYEFI_partition is fully deleted and rebuild, as I can confirm, and also steve6375 himself confirms in Post No. 8

 

 

Also, any Update using the Ventoy app (or .sh) will destroy and then replace the 2nd partition, so even if you keep the same size then all files in the 2nd partition will be replaced by original Ventoy files when you do a Ventoy update.

 

And in case of using a modified EFI file as steve6375 suggested in Post Nos. 2 and 6, it will be also deleted.

So as this suggestion really doesn't avoid the need to re-apply VTOYEFI_partition.7z file, I decided there is not any valid reason to follow the advice.

 

So every time we update the Ventoy version into our USB device it is required to also apply again the respective VTOYEFI_partition.7z file contained in the download package.

 

alacran



#35 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 10 October 2022 - 10:42 PM

New v1.2 was just released:

 

Integrate grub4dos to Ventoy USB v1.2.7z >>> Pasword = alacran

 

Changes in v1.2:

  • ntloader secondary menus were unified.
  • Entries for Linux_VHD(s) moved from both menu.lst to new secondary menus to avoid editing both menu.lst.
  • .ventoyignore file was added to RamDisk and VHD_from_USB folders to avoid listing their content by Ventoy.
  • Now both partitions are easily identified by means of Ventoy icon.

 

Of course both Ventoy_partition.7z and VTOYEFI_partition.7z will need to be applied in order to have all new v1.2 secondary menus available.

 

But in future updates of the Ventoy version into our Ventoy USB device, only VTOYEFI_partition.7z will need to be applied, as now in v1.2 we have all the secondary menus easily available in Ventoy_partition, and I don't have plans to make any additional changes to them.

 

alacran


  • gbrao likes this





Also tagged with one or more of these keywords: grub4dos uefi, grub4dos mbr, ventoy

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users