Jump to content











Photo
- - - - -

GRUB4DOS for UEFI


  • Please log in to reply
421 replies to this topic

#326 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 02 July 2021 - 07:05 AM

Hola my friend alacran

Thank you so much for taking the time to find out and share this :worship:

 

If your only intention is to test how to boot a VHD in UEFI environment this easy manual approch may work for you.

 

Procedure:

  1. Create a fixed size (mine is 1 GB for a 790 MB ISO) MBR inicialized single FAT-32 active primary partition VHD.
  2. Extract to the VHD all content of your ISO (...)

 

Yes indeed, this was my only intention.

These 2 steps made it work. (in my case) No need to modify the BCD.

 

 

Windows-Start-Manager
---------------------
Bezeichner              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
description             Windows Boot Manager
locale                  en-US
inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
custom:1600007e         Yes
default                 {7619dcc9-fafe-11d9-b411-000476eba25f}
displayorder            {7619dcc9-fafe-11d9-b411-000476eba25f}
toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout                 30

Windows-Startladeprogramm
-------------------------
Bezeichner              {7619dcc9-fafe-11d9-b411-000476eba25f}
device                  ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path                    \windows\system32\boot\winload.efi
description             Windows Setup
locale                  en-US
inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
custom:16000060         Yes
osdevice                ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot              \windows
custom:250000c2         1
detecthal               Yes
winpe                   Yes
ems                     No

 

Great finding! :thumbup:

 

Thanks again   T.


  • alacran likes this

#327 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 July 2021 - 12:09 AM

It is good to know that worked fine for your tests.

 

This is not a new approach, I mentioned it since some of the first tests on this topic, but it was not explained in detail before.

 

Yes, in fact that part of instructions related to edit the internal bcd(s) (into the VHD) is the generic procedure (to cover all scenarios), as sometimes certain 7-zip extracted WinPE.iso(s) may not work/load fine without that edition. An example could be some of my old WinPEs with diskmod filter driver integrated (not signed and approved by MS) that is loaded during first stages during boot, also same applies for any OS installation on a VHD having SVBus driver, then I consider it is a good practice to follow, just to be on the safe side.

 

By the way I made a new 1.5 GB 10XPE_x64-Flat.vhd (boot.wim installed in Compact LZX mode) + boot files/folders from the PE.iso, and all is working fine now.

 

NOTE: This VHD can't be Rambooted as it lacks SVBus driver, will see if I find a way to install it, (it may be a little hard because of the volatile Registry).

 

There is no doubt I was doing something wrong (memory fails sometimes), just followed by the letter my own instructions on first post of my topic:

 

Install Win10XPE_x64 Flat or Compact Mode on VHD

 

alacran



#328 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 July 2021 - 01:07 AM

Also tested this entry in UEFI menu.lst to Ramboot a VHD by means of ntloader:

 

 

title Mini-10x64.vhd-SVBUS (/VHD/Mini-10x64.vhd)-chainloader ntloader-vhd-svbus-RAMOS
find --ignore-floppies --ignore-cd /EFI/grub/ntloader | set x=
echo x=%x%
find --ignore-floppies --ignore-cd --set-root /VHD/Mini-10x64.vhd
map --mem --top /VHD/Mini-10x64.vhd (hd)
uuid (hd-1,0)
chainloader %x%/EFI/grub/ntloader hires=0 uuid=%?_UUID% initrd=/EFI/grub/initrd.lz1

 

It worked very fine. It's based on this post by liuzhaoyzz

 

NOTE-1: In this case ntloader and initrd.lz1 are located into \EFI\grub folder which is located on the root of the (MBR first primary active) FAT-32 partition on my USB, and the VHD is located into \VHD folder which is located on the root of the (MBR second primary) NTFS partition on my USB.

 

NOTE-2: This commands will not work for the WinPE.iso extacted by 7-zip to the VHD, where the boot.wim is in sources folder (not deployed), ntloader internal code (in case of UEFI booting VHDs) looks for \Windows\system32\winload.efi, and it is not available.

 

I apologize if my posts may seem with an excess of details and maybe a little repetitive for advanced users but let's remember also non advanced users could come to read this topic.

 

alacran


  • Tokener likes this

#329 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 July 2021 - 07:37 AM


By the way I made a new 1.5 GB 10XPE_x64-Flat.vhd (boot.wim installed in Compact LZX mode) + boot files/folders from the PE.iso, and all is working fine now.

 

NOTE: This VHD can't be Rambooted as it lacks SVBus driver, will see if I find a way to install it, (it may be a little hard because of the volatile Registry).

 

Just to let you know I was able to install SVBus driver and the VHD is now capable to Ramboot on MBR and UEFI environments.

  1. Mounted the boot.wim with DismMountService by Tokener.
  2. Used offlinereg by erwan.l to integrate the EVRootCA.reg in the Registry.
  3. Added the driver with DismMountService.
  4. Commited changes and dismounted.

 

After this reformated the VHD and deployed the new boot.wim (Compact mode LZX) on the VHD, added the boot files/folders extracting them with 7-zip from the PE.iso, edited the bcd(s), and ready to test.

 

Commands used:

 

MBR menu.lst

title 10XPE_x64-Flat.vhd - SVBus RAMDISK - 1.5 GB - map as (hd-1) for USB
find --set-root --ignore-floppies /10XPE_x64-Flat.vhd
map --top --mem /10XPE_x64-Flat.vhd (hd-1)
map --hook
root (hd-1,0)
chainloader /bootmgr


UEFI menu.lst

title 10XPE_x64-Flat.vhd - SVBus RAMDISK - 1.5 GB for UEFI boot
load /EFI/grub/ntfs_x64.efi
find --set-root /10XPE_x64-Flat.vhd
map --mem --top /10XPE_x64-Flat.vhd (hd)
chainloader (hd-1)

 

After testing I can say: The VHD now Ramboots fine on MBR and UEFI

 

NOTE: Also tested ntloader and it can't boot this VHD as Filedisk or as Ramdisk, it seems as it does not read/use the bcd(s), then don't make use of the "Boot into WinPE" option/parameter selected there.

 

alacran

Attached Thumbnails

  • 10XPE_x64-Flat.png

  • Tokener likes this

#330 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 03 July 2021 - 11:54 AM

@alacran

Thank you very much for detailed information.

 

 

  1. Mounted the boot.wim with DismMountService by Tokener.
  2. Used offlinereg by erwan.l to integrate the EVRootCA.reg in the Registry.
  3. Added the driver with DismMountService.
  4. Commited changes and dismounted.

I guess the driver you are mentioning is SVBus, but where is EVRootCA.reg to be found?

 

Best regards   T.



#331 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 July 2021 - 02:32 PM

To boot 10 in UEFI, drivers digitally signed and MS approved are a requirement.

 

Some guy in China signed it and EVRootCA.reg is the certificate he used, that need to be integrated in the Registry before installing the SVBus driver.

 

But as that certificate has being used widely, including in some malware programs it is tagged as a virus by the AV programs, so you can download it as the file is password protected, but before extract it dissable your AV, I read about it on the Chinese topic made by yaya on woyunet and asked A1ve to share it with us, and I uploaded it to the Downloads Section of the reboot.pro forum, here.

 

To avoid troubles integrating the reg file with offlinereg by erwan.l (as it do not work fine with *.reg files exported from regedit), make right click on it and select edit, copy all its content to a file opened with Notepad and save it as EVRootCA.reg file into offlinereg folder.

 

Booting from Win7 or a Win7 PE (when adding the driver I saw a message about the driver is unsigned but as the host OS was a different version than the target OS then Dism avoided this check):

  1. Mount your boot.wim file with DismMountService into  C:\temp folder.
  2. Go to offlinereg folder, open on same folder an elevated command promt and paste following line:
  3. offlinereg-win64 "C:\temp\Windows\System32\config\software" " " import EVRootCA.reg
  4.   >>> Enter, waith for it to finish and let you know all was fine, then you can close the command window.
  5. Now you can add/import the driver with DismMountService.
  6. Commit changes and dismount.

 

alacran


  • Tokener likes this

#332 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 05 July 2021 - 04:12 AM

Summary of ntloader by A1ive

 

Useful to boot:

  • WinPE WIM files
  • VHD files
  • OS

 

Valid environments:

  • Bios  - MBR partition table logical partition is not supported.
  • x64 UEFI, ia32 UEFI

 

How it works:

 

When using ntloader the info located into the BCD store is not used or required, its internal code recognize a WinPE WIM file, a VHD file or a OS and then it loads/run the right boot file in each case.

 

Advantages:

  • It can be used with A1ive's grub2, grub2 and grub4dos on MBR and/or UEFI.
  • There is no need to create boot files/folders into our VHDs when using ntloader.
  • It can run a VHD as Filedik or as Ramdisk (as long as SVBus is installed).
  • There is no need to edit the BCDs if we use SVBus driver for Ramboot.
  • It works fine if Secure Boot is enabled or not.
  • Our VHDs can have only a single NTFS partition without boot files/folders and there is no need to additionaly include in our menu entries the commands to preload ntfs_x64.efi on PCs with usual firmwares for only FAT.

 

Disadvantages:

  • It do not work on MBR logical partitions, (My tests confirm this).
  • The VHDs do not boot from FAT partitions preferable from NTFS, only recent 10 versions could boot from ExFAT partitions (I haven't tested this).
  • It do not work for VHDs installed on Wimboot mode as I read on its topic.
  • A VHD made from a WinPE do not boot using ntloader, (My tests confirm this).

 

Then I can conclude:

 

It is very clear to me the advantages overcome the disadvantages, and I can say it is a very good tool for our tool box.  Anyway for all cases where ntloader can't be used we can use other options.

 

alacran


  • Tokener and Gerolf like this

#333 Shivan

Shivan
  • Members
  • 2 posts
  •  
    Argentina

Posted 15 July 2021 - 01:47 PM

Hi, i wanted to ask if someone was able to make the new grub4dos version for UEFI work for PXE booting in UEFI mode?

 

Because, i did tried, but it just seem to drop the tftp connection, on my tftp server no other file is requested after the grub4dos.efi file, meaning it does not search for the menu file on the tftp root. I did tried using the mkimage to add the menu file directly into the .efi file, this works, but as expected i cant chainload anything that is on the tftp root, because it says "invalid device expecified". Doing something as simple as "chainload /bootmgrfwx64.efi"

 

Ive been trying to replace my old PXE Bios booting system build upon Grub4Dos that has been working for years now, to boot a Windows BCD menu to points to diferent .wims, clonezilla, linux installers, and iPXE kernel to boot from iSCSI devices.

This has been impossible to me so far, the network version of GRUB2 (grubnetx64.efi) can boot clonezilla and linux installers, but trying to chainload the Windows boot mgr .efi file results in "BlinitializeLibrary failed 0xc0000001" (if i point the DHCP server to the Windows .efi directly  the Windows boot maganer boots and i can boot all wims). And well, i dont know what im going to do for iSCSI because i was unable to find a iPXE .efi file that works where i can point it to diferents "initrds" menu files.

 

I keep trying but im suprised to see that nothing seems to work.

 

Edit: oh i also tryied with the A1live ntloader to boot wim files directly from grub2, but it always gives me "a specified device is not avalible" error on windows boot mgr, i think it is because it cant see the .wim files on the tftp root because i cant pass a uuid for a tftp device. But this is a wild guess here.


Edited by Shivan, 15 July 2021 - 01:50 PM.


#334 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 July 2021 - 02:50 PM

Possibly a stupid question, but do you get a (pd) device available?

 

(I seem to remember that with grub4dos - the BIOS only version - in some cases you needed to use it explicitly.) :unsure:

 

As well, still among the things I vaguely remember, there is the pxe keep directive that is (or was) sometimes needed.

 

Maybe if you choose one and one only "payload" that works on BIOS grub4dos (and the settings you use for it) and the settings in grub4uefi for the same payload you are actually trying (and faling with under UEFI), A1ive will be able to see at a glance what is wrong or missing.

 

:duff:

Wonko



#335 Shivan

Shivan
  • Members
  • 2 posts
  •  
    Argentina

Posted 15 July 2021 - 04:18 PM

Yeah, i on grub4dos bios i had to use "pxe keep" for WIndows chainload and pd for iso booting like this

title Windows Menu
pxe keep
chainloader --raw /boot/pxeboot.n12

title HDD Regenerator
map --mem (pd)/HDDREG.iso (0xFF)
map --hook
root (0xFF)
chainloader (0xFF)

 

"pxe keep" does not exist anymore on the uefi version, so i tried several ways to do it on the uefi version

title Windows
chainloader --raw /boot/bootmgfwx64.efi

title Windows 2
chainloader /boot/bootmgfwx64.efi

title Windows 3
chainloader (pd)/boot/bootmgfwx64.efi 

Does not work, but, again it has to be because it is dropping the tftp connection, at the very least i should be able to see grub4dos requesting the menu file on the tftp server, but it does nothing. using the mkimage was a last resort effort to embed the menu file, it shouldnt be needed.

 

I really not sure how i can help debug this.


Edited by Shivan, 15 July 2021 - 04:19 PM.


#336 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 July 2021 - 04:18 PM

@ Shivan

 

Hi, i wanted to ask if someone was able to make the new grub4dos version for UEFI work for PXE booting in UEFI mode?

 

Because, i did tried, but it just seem to drop the tftp connection, on my tftp server no other file is requested after the grub4dos.efi file, meaning it does not search for the menu file on the tftp root. I did tried using the mkimage to add the menu file directly into the .efi file, this works, but as expected i cant chainload anything that is on the tftp root, because it says "invalid device expecified". Doing something as simple as "chainload /bootmgrfwx64.efi"

 

I'm not familiar with TFTP PXE boot, but this is a summary of requirements to UEFI boot using G4E from the HD:

(maybe you can adapt some of this info to work on your PXE server).

 

UEFI menu.lst default location is /EFI/grub/menu.lst

 

MS bootmgfw.efi located into /EFI/Microsoft/Boot/bootmgfw.efi can be renamed to bootx64_win.efi

 

BOOTX64.EFI from grub4dos for UEFI (G4E) can be renamed and copied to /EFI/Microsoft/Boot/bootmgfw.efi, to boot from it, but Secure Boot has to be disabled.

 

To boot from MS bootx64_win.efi use following commands on your UEFI menu.lst:

 

title Windows EFI BootManager - chainloader /EFI/Microsoft/Boot/bootx64_win.efi
find --set-root /EFI/Microsoft/Boot/bootx64_win.efi
chainloader /EFI/Microsoft/Boot/bootx64_win.efi

 

For UEFI booting the partition where EFI boot files/folders are located should be FAT-32, all UEFI firmwares read/load/run EFI boot files from a FAT-32 partition. Usually the firmwares lack NTFS drivers and have only FAT-32 drivers. (same applies for partitions on VHDs).

 

Nevertheless some new MB are now also capables to read/load/run EFI boot files from a NTFS partition.

 

Anyway you may pre-load ntfs_x64.efi, see following example of the commands used on the UEFI menu.lst into my USB device:

 

UEFI Rambooting a VHD (single primary active NTFS partition) using ntfs_x64.efi (MS MBR and UEFI boot files into the VHD):

 

title Boot /Mini-10x64.vhd - UEFI Grub4dos  SVBus  RAMDISK  - 2 GB
load /EFI/grub/ntfs_x64.efi
find --set-root /Mini-10x64.vhd
map --mem --top /Mini-10x64.vhd (hd)
chainloader (hd-1)

 

Filedisk booting a VHD (single primary active NTFS partition) using ntfs_x64.efi (MS MBR and UEFI boot files into the VHD):

 

title Boot /Mini-10x64.vhd - UEFI Grub4dos - Filedisk - 2 GB
load /EFI/grub/ntfs_x64.efi
find --set-root /Mini-10x64.vhd
map /Mini-10x64.vhd (hd)
chainloader (hd-1)

 

Or better use ntloader, very useful for booting OSs, WIM and VHDs, no need to have MS MBR and UEFI boot files into the VHD:

 

Filedisk booting WIM and VHD files using ntloader, (MS MBR and UEFI boot files are NOT required into the VHD):

 

title Boot Windows NT6+ PE - /10XPE_x64.wim
find --set-root /10XPE_x64.wim
uuid %@root%
kernel /ntloader uuid=%?_UUID% file=/10XPE_x64.wim
initrd /initrd.lz1

title Boot Windows NT6+ PE - /Mini-10x64.vhd
find --set-root /Mini-10x64.vhd
uuid %@root%
kernel /ntloader uuid=%?_UUID% file=/Mini-10x64.vhd
initrd /initrd.lz1

 

NOTE: On this case ntloader and initrd.lz1 are on the root of the NTFS partition holding the WIM and the VHD files.

 

UEFI Rambooting a VHD (single primary active NTFS partition) using ntloader, (MS MBR and UEFI boot files are NOT required into the VHD):

 

title Mini-10x64.vhd-SVBUS (/VHD/Mini-10x64.vhd)-chainloader ntloader-vhd-svbus-RAMOS
find --ignore-floppies --ignore-cd /EFI/grub/ntloader | set x=
echo x=%x%
find --ignore-floppies --ignore-cd --set-root /VHD/Mini-10x64.vhd
map --mem --top /VHD/Mini-10x64.vhd (hd)
uuid (hd-1,0)
chainloader %x%/EFI/grub/ntloader hires=0 uuid=%?_UUID% initrd=/EFI/grub/initrd.lz1

 

NOTE: On this case ntloader and initrd.lz1 are located into /EFI/grub folder, and Mini-10x64.vhd is located into /VHD folder on another NTFS partition.

 

Just try to change/adapt previous examples (to your needs) in your embedded menu.

 

You should use this version: grub4dos-for_UEFI-2021-06-19.7z

 

Hope this info can be useful for you.

 

alacran


  • Gerolf likes this

#337 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 July 2021 - 05:45 PM

On previous post forgot to give an example of the commands for UEFI menu.lst used for a WinPE ISO:

 

 

title Win10XPE - Find images/Win10XPE_x64.ISO
find --set-root /images/Win10XPE_x64.ISO
map /images/Win10XPE_x64.ISO (0xff)
chainloader (0xff)

 

NOTE-1: Win10XPE_x64.ISO is located into /images folder.

 

NOTE-2: If a ISO lacks into it the boot files/folders required to boot on a UEFI environment, it will not boot.

 

alacran



#338 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 July 2021 - 11:21 PM

@ Shivan

 

Bad news, you are not the only one having troubles trying to make grub4dos for UEFI work for PXE booting in UEFI mode, (it seems there is something related to not being capable to read/load fine the info from the DHCP server), contrary to the grub4dos for MBR that does that task very well.

 

I just saw several post on the grub4dos for UEFI topic  with same issue and it seems so far there is not a known solution for this yet.

 

2011whp is recommending on this post to try integrating the menu (something you already tried): http://bbs.c3.wuyou....652&pid=4308565 translated using Google Translate

Spoiler

 

 

Only thing I could recommend you is open an Issue Report.

 

But it seems you already opened an Issue Report since April 28: https://github.com/c...4dos/issues/262

 

There you are in direct contact with the main developer yaya2007, so I'm afraid nobody here can give you better help or info than the developers.

 

alacran



#339 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 19 July 2021 - 09:34 AM

How does this compare to legacy G4D? Since it's much newer, I'd assume it's pretty much alpha/beta quality, and doesn't have anywhere near the featureset that legacy G4D has.

Does it work with Secure Boot? SB EFI binaries have to be signed, not sure if this is or not.

The comments I'm reading seem to imply that this works with SVBus too. I don't have much use for SVBus in a Windows ramboot scenario, but I can still think of circumstances it would be useful for, like automatically attaching virtual disk images at boot, and exposing them to Windows as a seemingly real disk. Windows can tell the difference between a real disk vs a VHD. But I've noticed that when I use SVBus to mount the VHD at boot, Windows thinks it's a real disk. And so do my other softwares (cloning, backup, FDE encryption).

I'm thinking about switching all my UEFI-supporting OSes to UEFI/GPT, while relegating older legacy OSes to VMs. I can still do legacy boot with all of them, but there's not much sense in trying to live in the past forever, since most future hardware won't support legacy at all.

#340 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 19 July 2021 - 10:35 AM

How does this compare to legacy G4D? Since it's much newer, I'd assume it's pretty much alpha/beta quality, and doesn't have anywhere near the featureset that legacy G4D has.

Does it work with Secure Boot? SB EFI binaries have to be signed, not sure if this is or not.

 

So far all is working very fine, excluding PXE booting in UEFI mode.

 

It DO NOT work on Secure Boot, but A1ve's grub2 can work on Secure Boot and you can call/run G4E from it.

 

You can have an idea of how it works (with Secure Boot disabled) and see several menu samples reading post No. 336 and 337

 

But I suggest you to make a USB device with USB_FORMAT and also using UEFI_MULTI and VHD_WIMBOOT (all by wimb) and try it from there before doing changes to your internal disk(s), Download link: https://github.com/wimbrts

 

NOTE: A1ve's grub2 is included on USB_FORMAT

 

alacran



#341 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 23 July 2021 - 08:21 PM

From: This post.

 

Easy way to create same structure of a USB device created with USB_FORMAT by wimb in a internal HD to be able to boot as MBR/CSM and UEFI on a PC capable to boot both ways.

 

If your PC Bios/Firmware only allow to boot one way that will be only option available.

 

My test machine layout is:

  • HD-0 is MBR formated where first primary active partition is NTFS as usuall, this is the usually default boot disk for every day use, but it always can be switched permanently at will with HD-1 in all Bios/firmwares.
  • HD-1 MBR formated first primary active partition is FAT-32, and as you know, then it is capable to boot fine as MBR and/or UEFI.
  • Several Win OSs and some Linux distros are installed on VHDs.

My procedure to get exactly same content created by a just made USB device using USB_FORMAT program on the HD-1 was the following:

  • Using a spare USB, format it by means of USB_FORMAT using Super UEFI option.
  • Make a 7-zip file of the FAT-32 partition contend.
  • Create HD-1 MBR formated first primary active partition FAT-32, 32 GB Max., this will allow to add many Linux distro ISOs to boot in Live mode if you want.
  • Extract all 7-zip file content to the new just formated FAT-32 partition and keep the 7-zip file for a possible future use.

Usage:

  • Create a second primary NTFS partition and optionally an extended partition with several logical partitions on HD-1.
  • Into NTFS HD-1, create VHD folder to content the VHDs, for easy edition of config files during my tests using ntloader by a1ve, the WIM files are on the root of the partition, ntloader info is in post between  this  and  this
  • Copy all VHD and Wim files to NTFS partition.
  • Copy the ISO files to folder images on FAT-32 partition, or cut and paste images folder to NTFS partition before copy, if you have ISO files exceeding the FAT-32 limit of 4 GB for a single file.
  • Also it is possible to copy a big number of Linux distro ISOs into its respective folder located on iso folder on FAT-32 partition to boot from them in Live mode. (I omited this in my test machine).
  • Optionally Integrate Linux Portable distros to FAT-32 partition, see: this topic
  • Use UEFI_MULTI and/or VHD_WIMBOOT to make all entries required to MBR/UEFI boot.
  • Use VHD_WIMBOOT to create new Win OS VHDs.
  • Easy to run many test manually editing or adding new entries on BCs or config files of a1ve Grub2 and grub4dos (MBR and UEFI versions).
  • On this machine Asus MB, I can select in Bios the Auto option which basically is: CSM + UEFI, SB can be enabled or disabled, and during boot just pressing the Boot Overwrite Key (F8 in my case) I can select booting from HD-0 or HD-1, but for HD-1 also UEFI option will be available.
  • If SB is enabled when booting, an option to install the Security Certificate to NVRAM will appear on screen, once installed, this option will not appear anymore.

NOTE-1: All this can be done also with a single HD.

 

NOTE-2: With this layout almost all in this machine on HD-1 can Filedisk or Ramboot on MBR or UEFI, by means of a1ve Grub2 and grub4dos (MBR and UEFI versions) environments, as long as Win OS VHDs have SVBusdriver installed for Ramboot.

 

NOTE-3: My Linux-Mint.vhd.vtoy (20 GB) and my Linux-Lite.vhd.vtoy (10 GB) located on the root of NTFS partition, were tested booting as filedisk on MBR and UEFI. They can't boot from Ram, there is not a Linux driver similar to SVBus driver available for this. For more info to create a bootable Linux VHD/VDI/RAW see: this post, additional info on this post and following and also on this topic.

 

Note-4: Portable distros: Porteus, FossaDog, Fossapup64_9.5, puppy_slacko64_7.0, that Boot on Ram by design, were also only tested booting fine on MBR, I haven't made and test entries to boot on UEFI, just forgot to do it.

 

alacran

 

alacran


  • Gerolf likes this

#342 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 24 July 2021 - 03:54 AM


 

Note-4: Portable distros: Porteus, FossaDog, Fossapup64_9.5, puppy_slacko64_7.0, that Boot on Ram by design, were also only tested booting fine on MBR, I haven't made and test entries to boot on UEFI, just forgot to do it.

 

 

Please let me know how you boot Puppy Linux - via the ISO or extracted contents. I cannot boot bionicpup64-8.0-uefi.iso from G4D unless I extract puppy_bionicpup64_8.0.sfs. MBR system,
 



#343 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 24 July 2021 - 03:58 AM

Hi my friend.

 

Just edited previous post to add that info, but I will quote it for you here:

 

 

Optionally Integrate Linux Portable distros to FAT-32 partition, see: this topic

 

alacran


  • gbrao likes this

#344 steve6375

steve6375

    Platinum Member

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

Posted 24 July 2021 - 10:17 PM

can ipxe wimboot be used with grub4efi? If so how?

I want to be able to add files into the X: boot.wim environment like ipxe wimboot code can in grub2.

i.e. boot directly from a Windows Install ISO and install Windows from UEFI and inject xml and other files...



#345 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 24 July 2021 - 10:37 PM

can ipxe wimboot be used with grub4efi? If so how?

I want to be able to add files into the X: boot.wim environment like ipxe wimboot code can in grub2.

i.e. boot directly from a Windows Install ISO and install Windows from UEFI and inject xml and other files...

 

Its TFTP PXE boot feature was not working fine until 2021-06-19 version, there are 2 more recent versions after that but unfortunatelly I don't have more info related to this feature yet, I will update this info later.

 

For more info see this post.

 

EDIT: Just read all new post on the chinese page of G4E and there is no new info about TFTP PXE boot, so I assume all related to this feature remains the same.

 

alacran



#346 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 25 July 2021 - 05:23 AM

Last UEFI version is: grub4dos-for_UEFI-2021-07-23.7z 976K (I haven't tested it yet).

 

On ext folder are the external commands that we can use, default location for them is the root of /EFI/grub folder.

If you want to check default location: on command line just type command and enter to get the default location.

 

The folders i386-efi and x86_64-efi contain the respective kernel images for x86 and x64 and are used for the embed menu, running the file mkimage.exe, additional info on attached ChangeLog_UEFI-EN.txt

 

For an example also see the info in the spoiler of this post.

 

Last MBR version is: grub4dos-0.4.6a-2021-06-02.7z 564K (Tested and working fine).

 

On ext folder are the external commands that we can use, default location for them is the root of /Boot/grub folder.

If you want to check default location: on command line just type command and enter to get the default location.

 

NOTE: In both cases the external commands can be copied to other location, but then it requires to include the full path to run/use them.

 

alacran

Attached Files



#347 steve6375

steve6375

    Platinum Member

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

Posted 25 July 2021 - 07:48 AM

When grub4efi is loaded from grub2, I can see the default menu for 1 second.

I have a \efi\grub\menu.lst 

 

I see the internal menu has the 

configfile

command at the top.

 

If I press spacebar quickly and go to commandline, I can see that the root device has \efi\grub\menu.lst present but it is not loaded by the first configfile command.

 

I want to avoid the 1 second delay and the ugly text menu.

 

What search path does the 'configfile' command use by default?

Attached Thumbnails

  • grub4efi int config.JPG


#348 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 25 July 2021 - 06:59 PM

What search path does the 'configfile' command use by default?

 

On the very first versions the default valid paths were almost the same as in the MBR version, but the default location was changed to /EFI/grub/menu.lst to avoid collition with grub4dos for MBR menu.lst

 

So AFAIK what your picture shows, is the only current location valid on the default embeded menu.

 

I never have seen even for a second the default menu, it seems to me in your case maybe the possible reasons could be the /EFI/grub/menu.lst file is fragmented, or too big, or the speed of your drive.

 

alacran



#349 steve6375

steve6375

    Platinum Member

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

Posted 25 July 2021 - 07:14 PM

It seems default menu is changed in recent versions.

There does not seem to be any pxe or configfile commands

It starts with title now and has a timeout of 1 second

see https://github.com/c...4dos/issues/288  (I edited timeout to 0 in the file)

 

I have re-made the EFI files and changed the internal menu and the default path, and now it works with no delay.

 

I use a windows cmd file:

@echo off
@color 1f
set ERR=
REM %1 contains folder with source file
if "%~1"=="" echo ERROR: Drag-and-drop grub4efi source folder onto this file & pause & goto :EOF
if not exist "%~1\mkimage.exe" echo ERROR: No mkimage.exe found in source folder & set ERR=1
if not exist "%~1\x86_64-efi\kernel.img" echo ERROR: No x86_64-efi\kernel.img found in source folder & set ERR=1
if not exist "%~1\i386-efi\kernel.img" echo ERROR: No i386-efi\kernel.img found in source folder & set ERR=1
if not exist "%~dp0e2b.lst" echo ERROR: No e2b.lst found in %~dp0 folder & set ERR=1
if "%ERR%"=="1" color 4f & pause & goto :EOF
pushd "%~1"
if exist BOOTX64.EFI del BOOTX64.EFI
if exist BOOTIA32.EFI del BOOTIA32.EFI
mkimage.exe -c "%~dp0e2b.lst" -O x86_64-efi -o BOOTX64.EFI   -p /_ISO/e2b/grub
mkimage.exe -c "%~dp0e2b.lst" -O i386-efi   -o BOOTIA32.EFI -p /_ISO/e2b/grub
echo.
if not exist BOOTX64.EFI  echo ERROR: No BOOTX64.EFI created! & set ERR=1
if not exist BOOTIA32.EFI echo ERROR: No BOOTIA32.EFI created! & set ERR=1
dir *.efi
echo.
echo INTERNAL MENU.LST
echo =================
echo.
type "%~dp0e2b.lst"
echo =================
if "%ERR%"=="1" color 4f & goto :end
echo.
echo PATH=\_ISO\e2b\grub
echo.
set E2BDRIVE=
set /P E2BDRIVE=Destination E2B Drive letter (e.g. N) :
if exist %E2BDRIVE%:\_ISO\e2b\grub\e2b.cfg (
copy BOOTX64.EFI  %E2BDRIVE%:\_ISO\e2b\grub
copy BOOTIA32.EFI %E2BDRIVE%:\_ISO\e2b\grub
dir %E2BDRIVE%:\_ISO\e2b\grub\*.efi
)
:end
popd
pause

So now I can just download and extract a new release and drag-and-drop the folder onto this cmd file to make new EFI files.

 

E2B.lst is currently:

configfile /_ISO/e2b/grub/menuefi.lst
title Reboot
reboot
title commandline
commandline
title Halt
halt


#350 steve6375

steve6375

    Platinum Member

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

Posted 25 July 2021 - 07:22 PM

I have a basic UEFI version of  E2B working and have reported many bugs (some of which have been fixed).

It uses same menu system as E2B legacy and same user config file (MyE2B.cfg).

It can boot linux iso's  but not much else so far.

Lots of work to do and bugs to fix in grub4efi!

 

Attached Thumbnails

  • e2befibetamainmenu.JPG

  • devdevadev likes this




4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users