Jump to content











Photo
- - - - -

Grub4dos for UEFI for beginners [Questions and Help topic]

grub4dos for uefi beginners

  • Please log in to reply
103 replies to this topic

#1 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 14 August 2021 - 07:56 AM

The only intention to open this topic is try to solve questions of new users of Grub4dos for UEFI, and give them certain guidance (as far as possible) as so far there is not any official guide for it.

 

IMHO the official topic GRUB4DOS for UEFI created by our felow a1ve to let all us know about this new tool is now very long and it is becoming hard to read, as at the begining the firts tests we ran were unsucessful and the program  has being modified a lot from the first version, so then the info on the very first post is not the current info anymore, and this is a recurrent phenomenon on that topic, caused for changes on new versions of the tool.

 

In no way this is a dissimulated intent to bypass the moderator of this forum section, in fact I publicly recognize my actions related to this topic were wrong. How I can request a moderator to keep order if I don't comply myself keeping the order in first place?  So I already talk with Wonko by Private Messenger about this, and we both are agree there are no hard feelings about this subject.

 

I think this tool is now more mature and future changes will not be so drastic, so it seems to be the right time to start this topic.

 

On following posts it is very possible I will quote or add links to other relevant info from the topic GRUB4DOS for UEFI that are still valid and a good reference.

 

A good start is read following guides from liuzhaoyzz:

 

But I stronly suggest DO NOT intent make use of hot keys, colored menus or change default screen resolution, for now just avoid that on your menus, as there has being many changes in those features since the guides were created.

 

2 Partitions VHDs: See this post.

 

1 Partition VHDs: See this post.

 

I invite all the forum members with solid knowledge about this subject to join me in this topic to try to solve questions or doubts of new users of this tool.

 

But I kindly ask all users to avoid posting about other procedures that require to additionally make a full  installation of a complete Linux distro as this is not the idea of this topic.

 

If you are interestet in that procedure our fellow Gerolf described it in detail, in several post about it, starting here, and please ask him all your questions related to such procedure as so far I do not have any experience in that procedure and never used Devian before.

 

By the way it was good when Gerolf demonstrated I was wrong when I said G4E could not be chainloaded from the grub.cfg of Devian because the secure boot chain was going to be broken, which showed me his approach works fine, and it is also a viable alternative.

 

EDIT: Our fellow wimb tested the previous approach and it did not work.

 

From this post:

 

I have installed openSUSE Tumbleweed on GPT partition and can boot openSUSE Linux in UEFI Secure mode.

 

However, chainload of UEFI Grub4dos (Grub4EFI) fails in UEFI Secure mode with the message: bad shim signature

 

So indeed the secure boot chain is broken as expected already by alacran

 

Best Regards

 

alacran


Edited by alacran, 18 August 2021 - 01:53 PM.

  • Tokener and Gerolf like this

#2 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 14 August 2021 - 07:58 AM

As our fellow steve6375 said here when he answered a post from zammibro related to GRUB4DOS for UEFI:

 

It is not intended for novice users.

 

And I'm agree, in fact it is recommended for advanced users.

 

Also if the new user of grub4dos for UEFI is not familiar with the use of WinNTSetup, BootIce, and/or certain command line commands it may be a hard and a long process for he/she to make all the process manually.

 

Many of us here and also on the chinese forum page about this subject are agree the selection of the name grub4dos for UEFI was not the best option, because in first place it creates certain confusion and in fact it has nothing to do with dos, so some users in china call it G4E and I will use from now on that term too as it seems the shorter, our fellow steve6375 calls it grub4efi and maybe you will see other Alias too.

 

It is necessary to understand that this is certanly different from the grub4dos we all know, that is a fantastic tool to use on MBR/CSM environments.

 

grub4dos for MBR can be installed on MBR or PBR

grub4dos for MBR can be called/chainloaded from Win Bootmanager just by adding a single entry in the BCD.

grub4dos for MBR can't be used on UEFI environments.

grub4dos for MBR is a very good tool for PXE

 

G4E can't be installed on MBR or PBR

G4E can't be called/chainloaded from Win Bootmanager.

G4E can be used only on UEFI environments.

G4E is not capable to run directly on UEFI if Secure Boot is enabled.

G4E can be chainloaded from other primary loaders able to run on UEFI if Secure Boot is enabled.

G4E Do not work on PXE so far.

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

UEFI menu.lst commands are similar but not the same as in MBR menu.lst.

 

So some user may think: 

 

If it can't boot when Secure Boot is enabled it is not a good option.

It is better to just use another boot loader capable to boot in UEFI if Secure Boot is enabled.

 

This could be true in part, and in fact we could use a shim + a1ve's grub2 alone. But it is better to use it as a first loader and then chainload to G4E

 

G4E has certain features that makes it more versatile and also it is the fastest to load on Ram an uncompressed VHD or an externally compressed VHD to Ramboot in accordance with all my tests, for a comparative see: This post and this post

 

a1ve's grub2 only acepts *.xz extenally compresed VHDs (it takes a lot to compress them).

G4E acepts *.gz or *.lz4 extenally compresed VHDs, make a lz4 compresed VHD is the faster option af all of them, even if it do not give us the smaller file size, it loads faster than any other option, to compress decompress VHDs or any other file you can use this GUI program lz4_compressor

 

In fact the process of create manually a device capable to boot in UEFI to use G4E to load/run ISO or VHD files is very long and time consuming, also it is very easy to just forget to do some of the required steps.

 

So my recommendation is make use of wimb's programs to make all process almost automatically, into them is included all knowled about the subject available on reboot.pro at the time they were made, there have being several G4E updates and per sure will be more in the future as it is in active development.

 

You can download wimb's guide here: VHD_WIMBOOT PDF

 

alacran


  • wimb and Gerolf like this

#3 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Netherlands

Posted 14 August 2021 - 01:29 PM

Nice topic, Alacran.

My question is: Is there any news about booting from separate partitions of a GPT formatted disk?

This is the way I use Grub4Dos now, nothing fancy, just boot from partition 1, 2 or 3. No USB boot, no VHDs, just plain and simple OS boot from HD.

I must admit I only follow (or understand) 30% of the current Grub4UEFI threads, but as far as can tell there hasn't been much news on this topic?

Thanks!



#4 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 14 August 2021 - 03:07 PM

Nice topic, Alacran.

My question is: Is there any news about booting from separate partitions of a GPT formatted disk?

This is the way I use Grub4Dos now, nothing fancy, just boot from partition 1, 2 or 3. No USB boot, no VHDs, just plain and simple OS boot from HD.

I must admit I only follow (or understand) 30% of the current Grub4UEFI threads, but as far as can tell there hasn't been much news on this topic?

Thanks!

 

There is a set of auxiliary modules from a1ve called ntloader that may be used on grub4dos for MBR and UEFI versions, to boot a WinPE WIM, a VHD or a certain partition, see: https://github.com/grub4dos/ntloader

 

I have tested it at home in several PCs, booting fine using grub4dos for MBR/CSM and for UEFI from a USB 3.0 device several WinPE WIM and VHD files, but there is one PC with a UEFI firmware where it do not work on MBR/CSM or on UEFI, on all the others it works fantastic, so you will need to try it in your PC.

 

You may use this commands to boot the desired HD partition (containing your Win OS), partial quote related to boot partitions/drives from the Readme.md in GitHub page:

 

 

Boot Windows NT6+ OS

  • GRUB4DOS
title Boot Windows NT6+
uuid (hdx,y)
kernel /ntloader uuid=%?_UUID%
initrd /initrd.lz1
  • a1ive GRUB2
menuentry "Boot Windows NT6+" {
    probe -s dev_uuid -u (hdx,y);
    if [ "${grub_platform}" = "efi" ];
    then
        linuxefi /ntloader uuid=${dev_uuid};
        initrdefi /initrd.lz1;
    else
        linux16 /ntloader uuid=${dev_uuid};
        initrd16 /initrd.lz1;
    fi;
}
  • GNU GRUB2
menuentry "Boot Windows NT6+" {
    probe -s dev_uuid -u (hdx,y);
    if [ "${grub_platform}" = "efi" ];
    then
        chainloader /ntloader initrd=/initrd.lz1 uuid=${dev_uuid};
    else
        linux16 /ntloader uuid=${dev_uuid};
        initrd16 /initrd.lz1;
   fi;
}

 

In the case of grub4dos the commands are the same for MBR menu.lst or UEFI menu.lst.

 

In case you decide to use grub2 or a1ive's grub2 just remember partition numbers in grub2 start with number 1, not 0 as in grub4dos.

 

Hope this info can be useful for you, please let us know if it worked fine for you.

 

alacran



#5 wimb

wimb

    Platinum Member

  • Developer
  • 3473 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 14 August 2021 - 05:06 PM

My question is: Is there any news about booting from separate partitions of a GPT formatted disk?

 

For UEFI Secure mode there is no need to boot with hidden FAT32 ESP drive of GPT disk.

 

MBR active FAT32 Boot drive is Universal and allows to boot anything located on GPT or MBR NTFS partition in any mode BIOS or UEFI Secure.

 

Preferred is to use two internal disks (MBR and GPT), but if you have only GPT as internal disk then you can use USB-Stick as MBR active FAT32 Boot drive.

 

Easy to make with UEFI_MULTI and USB_FORMAT according to VHD_WIMBOOT PDF

 

Besides Windows Boot Manager there is Support in BIOS mode for Grub4dos and Grub2 and in UEFI Secure mode for Grub2 and UEFI Grub4dos (G4E)

 

MBR BIOS Mode == UEFI Secure Mode

Win11_GPT_Boot_BIOS_Mode_2021-08-03_103646.jpg == Win11_GPT_Grub2_UEFI_Mode_2021-08-03_111521.jpg


#6 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 14 August 2021 - 06:17 PM

@ wimb

As he is mentioning he wants to boot from partitions 1, 2 and 3, and he is using grub4dos (MBR version), so I asume his HD is allready MBR formated (as there are no more than 4 partitions this confirms that), and also because some of the partitions numbers mentioned can't be used on GPT to hold a OS.

USB_FORMAT will erase his full HD if used directly on it, and I don't think he would like that. WRONG USB_FORMAT can't be used on a internal HD.

 

He could use this procedure and avoid formating the HD as GPT and use it as MBR to boot on MBR/CSM and UEFI.

But there is also another issue UEFI_MULTI is very good to add WIM, ISO or VHD files to BCDs and config files, but AFAIK it is not capable to do same thing with OSs installed on a partition/drive, at least untill v5.8, WRONG v5.8 is capable to add 7, 8 and 10 OSs

So he will have to create the required BCDs entries manually or by means of BootIce, and manually on the config files.

Then IMHO I think he should better try first with ntloader, it seems to me there are good chances ntloader works on that PC, my trouble with it on the problematic PC is the USB device is seen only as USB stick, and there is no way to change that, even tried to format it with RMPrepUSB today, but still the same.

 

EDIT: Just edited the post, please see following post from wimb where he makes me notice my mistakes.

 

alacran


  • Atari800XL likes this

#7 wimb

wimb

    Platinum Member

  • Developer
  • 3473 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 14 August 2021 - 06:57 PM

As he is mentioning he wants to boot from partitions 1, 2 and 3, and he is using grub4dos (MBR version), so I asume his HD is allready MBR formated (as there are no more than 4 partitions this confirms that), and also because some of the partitions numbers mentioned can't be used on GPT to hold a OS.

USB_FORMAT will erase his full HD if used directly on it, and I don't think he would like that.

 

He could use this procedure to avoid full formating the HD.

But there is also another issue UEFI_MULTI is very good to add WIM, ISO or VHD files to BCDs and config files, but AFAIK it is not capable to do same thing with OSs installed on a partition/drive, at least untill v5.8

So he will have to create the required BCDs entries manually or by means of BootIce, and manually on the config files.

Then IMHO I think he should better try first with ntloader, it seems to me there are good chances it works on that PC, my trouble with it on the problematic PC is the USB device is seen only as USB stick, and there is no way to change that, even tried to format it with RMPrepUSB today, but still the same.
 

 

His present case is to use Grub4dos to  boot Partition 1, 2 and 3, but Atari800XL is asking how to do something similar with GPT partitioned disk .....

 

USB_FORMAT can only be used on USB disks, so there is no risk for internal harddisks.

 

UEFI_MULTI has option to Add 7/8/10 to Boot Manager, that means you can Add your installed OS to Boot Manager

 

USB-Stick seen as USB-Stick is no problem, you can always use it as active FAT32 Boot Drive


  • Atari800XL likes this

#8 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 14 August 2021 - 07:32 PM

You are totally right my friend, sorry for my mistakes, I will make some changes and add a note on my previous post.

 

On the machine where ntloader do not work the USB device is seen as a USB flash drive (no way to change that on it), so it seems to me this affects the uuid reading, and then the WIM or VHD do not boot, same on MBR/CSM or UEFI

 

But there is not any trouble if ntloader is not used in the menus.

 

Thanks for correcting me.

 

alacran


  • wimb and Atari800XL like this

#9 Tokener

Tokener

    Frequent Member

  • Developer
  • 349 posts

Posted 15 August 2021 - 08:32 AM

Hello friends

 

Post #2

"And I'm agree, in fact it is recommended for advanced users."

 

What exactly is it in this context?

 

Regards   T.


  • Atari800XL likes this

#10 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 15 August 2021 - 09:38 AM

Hello friends

 

 

What exactly is it in this context?

 

Regards   T.

 

GRUB4DOS for UEFI my friend, I will edit that post to make it more clear, thanks.

 

Now that post says:

 

 

As our fellow steve6375 said here when he answered a post from zammibro related to GRUB4DOS for UEFI:

 

 

It is not intended for novice users.

 

alacran


  • Atari800XL likes this

#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 7453 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 15 August 2021 - 10:31 AM

I haven't tried this on a GPT disk, but something like this should work...

 

Assuming you have UEFI-booted to grub4efi and ntloader files are in the root of the boot partition...

title Boot Windows NT6+
uuid (hd1,2)
set UUID=%?%
kernel /ntloader uuid=%UUID%
initrd /initrd.lz1
#ensure standard UEFI graphics mode
graphicsmode -1 1024 768
boot

note that %?% == %?_UUID% and are temporary variables which can be destroyed by a few future commands (e.g. cat which alters %?%) so it is safest to keep it as a new variable.

 

Note that when booting via uefi, the USB drive is not guaranteed to be hd0 and so the first internal hard disk is not guaranteed to be hd1.

 

So it would be better to hard code the uuid, e.g. set UUID=xxxxx-xxxx-xxx-xxx

 

or place a tag file on each partition and use something like this

find /tag1.tag | set ptn=
uuid %ptn% > nul ;; set UUID=%?%

Note that the ntloader and initrd files do NOT have to be placed on every partition. They can exist in one place (USB boot drive?) and be loaded from that partition.


Edited by steve6375, 16 August 2021 - 05:00 PM.

  • alacran and Atari800XL like this

#12 steve6375

steve6375

    Platinum Member

  • Developer
  • 7453 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 15 August 2021 - 10:51 AM

P.S. latest 64-bit version Beta with working dd command and some other bugfixes is here
https://github.com/c...BOOTX64.rar.txt
Hopefully a new full release will be available soon.


Edited by steve6375, 15 August 2021 - 10:51 AM.

  • Atari800XL likes this

#13 steve6375

steve6375

    Platinum Member

  • Developer
  • 7453 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 15 August 2021 - 11:11 AM

P.S. if testing these 'boot' type commands from the command line, there are sometimes problems.

 

it is better to use a menu or place all commands on one line using ;; between each command when using the command line

There is a bug where

chainloader /bootx64_win.efi
boot

from the command line results in an Windows BSOD error, but this on the command line...

chainloader /bootx64_win.efi ;; boot

boots up Windows nicely!

(example efi file only)


  • Atari800XL likes this

#14 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Netherlands

Posted 15 August 2021 - 12:36 PM

Thank you all for taking an interest in my question. I was planning to test your suggestions this weekend, but forgot about some family commitments :-)

I will try all your suggestions in the coming days, I have a spare DELL 3531 laptop that supports both UEFI and BIOS, I have used this before to test Grub4UEFI, I don't mind switching the hard disk between GPT and MBR on this one.

I also have a few spare Intel EdePC TL10IE2 tablet/laptops for testing, but those are 32bit UEFI only, interesting for some tests but I guess only complicating matters for this test.

 

Thanks again and I'll be back to you soon.



#15 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 15 August 2021 - 02:29 PM

@ steve6375

 

As the grub4dos commands in this case are the same on UEFI and MBR versions, following question may be useful for me and future readers.

 

if "%@uefi%"=="32" set nt=ntloader.i386 is obviously for UEFI, what we can use to replace "%@uefi%" on MBR?

 

Thanks in advance.

 

alacran


Edited by alacran, 16 August 2021 - 04:02 AM.


#16 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 15 August 2021 - 02:37 PM

@alacran

... and I thought that the topic title was "Grub4dos for UEFI for beginners [Questions and Help topic]" :dubbio:

 

If you want me to rename it to something like "I am an expert on multibooting, AMA" or "post here anything that crosses your mind about ntloader, GRUB2. multiboot and anything else" just let me know, no problem..

 

@ATARI800XL

You have to understand how the way BIOS and UEFI boot is very, very different.

 

Quick sum up of the normal BIOS booting sequence:

BIOS->MBR code->partition active in the MBR partition table->bootsector code of active partition->OS loader (on active partition)

 

What you are doing right now, from what you reported is akin to simply change the active partition in the MBR partition table, i.e. what you are doing now is likely:
BIOS->MBR code->grldr->set on the fly the active partition in the MBR partition table->bootsector code of the active partition-> OS loader (on active partition)

or:

 BIOS->MBR code->grldr->ignore active partition->bootsector code of the chosen partition-> OS loader (on chosen partition)

or:

BIOS->MBR code->grldr->ignore active partition->ignore bootsector  code of any partition-> OS loader (on chosen partition)

 

In UEFI there is NOT anymore the concept of "active partition", nor there is any code in the GPT (protective) MBR, the normal UEFI booting sequence is:
UEFI->find ESP (usually FAT32 formatted) partition in the GPT partition table->look in it  for a .efi OS loader/boot manager-> efi OS loader/boot manager

and (as a sort of backwards compatribility for MBR disks):

UEFI->find FAT32 formatted partition in the MBR partition table->look in it  for a .efi OS loader/boot manager-> efi OS loader/boot manager

 

The ESP (EFI System Partition):

https://en.wikipedia...ystem_partition

 is identified by its GUID/UUID (which is C12A7328-F81F-11D2-BA4B-00A0C93EC93B ) on GPT, while on MBR *any* partition (FAT32) would do (the UEFI in this case tries to find the OS loader on *any* partiton it finds).

 

In practice the UEFI replaces/substitutes the MBR code and directly looks for a suitable OS loader in a partition with the given GUID/UUID, so all UEFI multibooting solutions rely on such a partition to host the OS loader/ boot manager, and choices can be selected only once the efi OS loader/boot manager is loaded.

 

:duff:

Wonko



#17 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 15 August 2021 - 02:49 PM

My Previous post was edited to make a more direct question and avoid the preamble.

 

And as I'm editing this post I will take the oportunity to also include this new info here for future reference.

 

Our fellow wimb has tested the approach from Gerolf mentioned on the final paragraphs of first post, and in accordance with his tests it do not work, see this post.

 

alacran



#18 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Netherlands

Posted 16 August 2021 - 01:26 PM

Just a quick thought before I'm going to do my first (new) tests tomorrow:

- I probably wouldn't have brought up this issue of "Grub4UEFI GPT multibooting (like the good old Grub4DOS days" if it wasn't for tools like Terabyte's "BootIt UEFI". Now I know that's a whole 'nother story, but at least it's a (somewhat) easy to use multiboot tool that does similar things to what I want to do.

You know like "Hey, if THEY can do it, why can't WE?"

 

We should realize this topic is called "... for beginners", so I would like to keep things as simple as possible, and I would completely accept an answer like "NO, it is NOT possible to multiboot from a GPT disk, like we did before on an MBR disk, using Grub4DOS".

 

But I see from the reactions that we're not giving up yet! Thanks again for all your reactions.



#19 steve6375

steve6375

    Platinum Member

  • Developer
  • 7453 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 16 August 2021 - 05:02 PM

@ steve6375

 

As the grub4dos commands in this case are the same on UEFI and MBR versions, following question may be useful for me and future readers.

 

if "%@uefi%"=="32" set nt=ntloader.i386 is obviously for UEFI, what we can use to replace "%@uefi%" on MBR?

 

Thanks in advance.

 

alacran

 

when using kernel command, ntloader should work for Legacy BIOS MBR, UEFI32 and UEFI64.

it seems ntloader.i386 is only needed for chainloader command from UEFI32 grub2.



#20 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 17 August 2021 - 07:47 AM

JFYI

 

After booting from a 10x64 WinPE, I used DiskGenius free to delete the 1 GB NTFS Boot partition and change the MBR partitioned disk to GPT, it let me select the new size for the EFI partition (I used 1000 MB) to let some espace available for the reserved partition, formated the FAT-32 EFI partition, closed DiskGenius, recreate by command line the boot files folders from a Win10x64 (installed on the previous second NTFS primary partition) that now is on third GPT partition, ran WinNTSetup to make visible as Z the EFI partition and copied BOOTX64.EFI from G4E to Z:\EFI\Boot\ folder, renamed to bootx64_g4d.efi, and created Z:\EFI\grub folder to hold my menu.lst and edited it, also copied to the root of EFI partition ntloader and initrd.lz1, after this using BootIce I created a new UEFI entry on the NVRAM to boot from \EFI\Boot\bootx64_g4d.efi and named it as GRUB4DOS UEFI, now when booting I can use the boot overwrite key (F7 in this PC) to optionally boot from G4E directrly, of course SB is disabled, and if not using the F7 key the PC boots as usual directly to Win.

 

Then tested following commands in my menu.lst (based on steve6375 post)

 

 

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

title Boot 10x64 OS by ntloader from Intermal HD
set nt=ntloader
find /10x64-OS.tag | set ptn=
uuid %ptn% > nul ;; set UUID=%?%
kernel /%nt% uuid=%UUID%
initrd /initrd.lz1
 

 

I can confirm the commands sugested by steve6375 work very fine on UEFI GPT to boot an OS from a partition, I used a tag file as steve6375 suggested, for easy identification and avoid potential issues, and also can confirm in fact there is no need to copy ntloader and initrd.lz1 file to the partition we want to boot.

 

alacran


  • steve6375 likes this

#21 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Netherlands

Posted 17 August 2021 - 08:27 AM

I have now started my tests as well, wish me luck :-)

Alacran, I'm a bit rusty on all of this, nice to see you're doing these tests at pretty much the exact same time, hope I can ask you some dumb question, let's keep those for personal messages.

Of course, I will share the more important findings here in the topic.



#22 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 17 August 2021 - 08:34 AM

No problem my friend, I will try to answer yor questions or doubts (if any) as much as possible. And I'm agree it is better to use the PM to don't pollute unnecessarily the forum topics.

 

alacran



#23 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 August 2021 - 09:38 AM

As often happens, I personally disagree.

 

The whole idea of a board like reboot.pro is to discuss issues/share knowledge publicly, I do understand your good intentions, but this way the experience will remain essentially private.

 

What ATARI800XL or alacran may (in perfect good faith) consider the more relevant part (and thus suitable for sharing) may well miss some apparently less relevant parts that could be key parts for some other users.

 

There is no issue, if you want me to, to move ATARI800XL's (and related) posts to a separate thread, so that this "generic" one is not cluttered by the minutiae.

 

:duff:

Wonko



#24 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Netherlands

Posted 17 August 2021 - 09:43 AM

Well, I agree, and will post all my findings in this thread. But I'm afraid my ADHD and OCD would produce 10 posts an hour, so better for me to write out all my notes first and post later (which usually is not MUCH later).



#25 alacran

alacran

    Gold Member

  • .script developer
  • 2303 posts
  •  
    Mexico

Posted 17 August 2021 - 10:42 AM

In fact the user has two options depending on the PC and his preferences.

 

It is better to do all this from a WinPE.

UEFI defaulf boot file is located on \EFI\Microsoft\Boot\bootmgfw.efi

 

EDIT: Also in some very rare cases the UEFI firmware points to \EFI\Boot\bootx64.efi, but you can test this from BootIce UEFI tab. If that is the case in your UEFI firmware please adjust/moddify the suggested entries on the following UEFI menu.lst

Having Fast Boot and Secure Boot disabled, and a 10x64 OS installed on a GPT partition. The user has following two options.

If the PC lacks the boot overwrite key:

  • Rename \EFI\Microsoft\Boot\bootmgfw.efi to \EFI\Microsoft\Boot\bootmgfw_win.efi
  • And copy there BOOTX64.EFI from G4E renamed as bootmgfw.efi
  • Locate the menu.lst here: \EFI\Grub\menu.lst
  • Also don't forget to copy to the root of EFI partition ntloader and initrd.lz1
  • Create a tag file on the partition you want to boot I used 10x64-OS.tag

As long as your \EFI\Grub\menu.lst is as this it should work fine on this case (for now avoid colors, fast keys and etc. on the menu.lst):
 

 

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

title Boot 10x64 OS by ntloader from Intermal HD
set nt=ntloader
find /10x64-OS.tag | set ptn=
uuid %ptn% > nul ;; set UUID=%?%
kernel /%nt% uuid=%UUID%
initrd /initrd.lz1

 

If the PC has a boot overwrite key:

  • Rename BOOTX64.EFI from G4E to bootx64_g4d.efi and copy it to \EFI\Boot\ folder, then there is no need to rename MS \EFI\Microsoft\Boot\bootmgfw.efi and it will be used as usuall.
  • Using BootIce on UEFI tab, create a new entry on the UEFI NVRAM to boot from \EFI\Boot\bootx64_g4d.efi, and name it as GRUB4DOS UEFI or the name you prefer.
  • Locate the menu.lst here: \EFI\Grub\menu.lst
  • Create a tag file on the partition you want to boot I used 10x64-OS.tag
  • Also don't forget to copy to the root of EFI partition ntloader and initrd.lz1
  • Now when booting and using the boot overwrite key will be possible to select GRUB4DOS UEFI or the name you used.
  • Or just boot as usually and G4E will not be loaded.

As long as your \EFI\Grub\menu.lst is as this it should work fine on this case (for now avoid colors, fast keys and etc. on the menu.lst):
 

 

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

title Boot 10x64 OS by ntloader from Intermal HD
set nt=ntloader
find /10x64-OS.tag | set ptn=
uuid %ptn% > nul ;; set UUID=%?%
kernel /%nt% uuid=%UUID%
initrd /initrd.lz1

 

alacran







Also tagged with one or more of these keywords: grub4dos for uefi, beginners

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users