Jump to content











Photo
- - - - -

a1ive's grub2 and File Manager has great UEFI support!


  • Please log in to reply
190 replies to this topic

#1 steve6375

steve6375

    Platinum Member

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

Posted 13 January 2020 - 06:30 PM

a1ive has enhanced grub2 and has added new commands such as map, partnew, dd, etc. for UEFI.

 

He has also created the grub2 File Manager scripts, which use these new grub2 features as well ipxe wimboot and chenall's NTBOOT to allow us to DIRECTLY boot from unaltered Windows Install ISOs (with ability to load an XML file), .WIM files and .VHD files for MBR\Legacy and UEFI64 and UEFI32. We can also boot from just about any Linux ISO because you can choose the 'EasyBoot' method of using 'partnew' even under UEFI.

 

I have also added a Secure Boot UEFI64 set of files, which should allow you to Secure UEFI boot to his grub2 (even though it is not signed). This allows us to run ALL grub2 commands without restriction.

 

You can also use the partnew command to boot from an Ubuntu-based ISO with persistence.

 

For more details, read the last weeks articles in my blog starting with this one.

 

If you just want to try the FAT32 UEFI boot files - see here for a download.

Attached Thumbnails

  • grub2_menu.JPG


#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 January 2020 - 06:47 PM

 the 'EasyBoot' method of using 'partnew' 

 

Had to happen, before or  later.

 

http://reboot.pro/to...brided/?p=88531

 

:duff:

Wonko



#3 steve6375

steve6375

    Platinum Member

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

Posted 13 January 2020 - 06:50 PM

A1ive's choice of terminology, not mine!



#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 January 2020 - 07:00 PM

A1ive's choice of terminology, not mine!

 

Whoever is the author of the terminology is, it is not accurate, let alone correct, and you (not someone else) perfectly know that.

 

Whoever did a foolish thing doesn't really matter, a slip of the fingers or a mistake, if it was a mistake, can happen to everyone, no problem, but - at least to those that read here - it is clear that it is foolish.

 

https://jdebp.eu/FGA...oolishness.html

 

:duff:

Wonko



#5 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 15 January 2020 - 01:53 AM

@ steve6375

 

My PC is MBR dual booting Win7x64 + 10x64

 

Just downloaded your Easy2Boot_v1.B8 + E2B UEFI File Manager v1.0 and following your guide

 

I made an E2B USB flash drive 4 GB just to test it, First primary Active partition is E2B NTFS (almost all drive) and second primary partition is FAT-32 100 MB only for E2B UEFI File Manager v1.0 files/folders, file grub_filemanager.mnu is on \_ISO\MAINMENU folder on the E2B partition as per your instructions, so it can be called from grub4dos main memu.

 

Then for testing copied linuxmint-19.3-cinnamon-64bit.iso to E2B:\_ISO\LINUX and Win10XPE_x64.wim to E2B:\_ISO\WINPE.

 

linuxmint-19.3-cinnamon-64bit.iso boots fine from grub4dos, and also from grub2.

 

Win10XPE_x64.wim boots fine from grub4dos, but not from grub2 (wimboot or 6.x NTFS, both don't boot), I got a message: bootmgr is corrupted

 

It seams to me bootmgr is not found by Grub2, Any ideas to fix this?

 

 

alacran



#6 steve6375

steve6375

    Platinum Member

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

Posted 15 January 2020 - 05:02 AM

You need approx 2GB of RAM or more. Are you testing on a real system or VM?

Can you post screenshot showing error please.



#7 steve6375

steve6375

    Platinum Member

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

Posted 16 January 2020 - 11:14 AM

I have added some more example grub2 menu files.

http://rmprepusb.blo...to-install.html

 

Examples:

Ubuntu ISO + persistence

Tails ISO

Win10 Install ISO + XML file (grub2 .cfg file)

Win10 Install ISO + XML file (grubfm file)



#8 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 January 2020 - 08:39 PM

You need approx 2GB of RAM or more. Are you testing on a real system or VM?

Can you post screenshot showing error please.

PC has 4 GB RAM, booting directly from the USB device on the PC, not on Virtual Machine, attached picture.

Attached Thumbnails

  • Bootmgr.jpg


#9 steve6375

steve6375

    Platinum Member

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

Posted 16 January 2020 - 08:43 PM

I think bootmgr is inside a file which is inside the grubfm.iso - it is resident in memory and should be OK.

I have not seen this issue before with wim files.

Do all wim files do this?



#10 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 January 2020 - 09:09 PM

I assume it should be located on \grubfm.iso\NTBOOT.MOD\ (as it is on E2B drive on \_ISO\e2b\grub\DPMS\NTBOOT.MOD\bootmgr), but it is not there.



#11 steve6375

steve6375

    Platinum Member

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

Posted 16 January 2020 - 09:21 PM

It is inside NTBOOT.MOD which is a compressed file - then NTBOOT.NT6 which contains NTBOOT.img which contains  bootmgr.



#12 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 January 2020 - 10:50 PM

I can't go farter than NTBOOT.img to check content (can't load the image or open it with 7-Zip).

 

Tested with some WinPE.iso files and boot fine from grub2.

 

As said before: Win10XPE_x64.wim 771 MB (file is contiguous) boots fine from grub4dos (so file is fine), but not from grub2 (wimboot or 6.x NTFS, both don't boot), message about Bootmgr image is corrupt.

 

7pe_x86_E.wim 237 MB is fragmented (8 fragments, there is no CONTIG.ISO file to save espace), but boots fine from grub2 if selecting wimboot, but from grub2, as NT 6.x, it fails same as Win10XPE_x64.wim, with same message about Bootmgr image is corrupt.



#13 steve6375

steve6375

    Platinum Member

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

Posted 17 January 2020 - 12:52 AM

NTBOOT.img can be opened using WinImage.

grub2 is actually calling grub4dos and NTBOOT. So all are using grub4dos.

A different version of bootmgr is used in the NTBOOT.img (size 398356 bytes).

but the issue smells a bit like a memory address/map issue...



#14 steve6375

steve6375

    Platinum Member

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

Posted 17 January 2020 - 10:52 AM

Is it possible to upload your .wim files and PM me with their location so I can download and test?

I cannot reproduce any error with my hardware and wim files.



#15 steve6375

steve6375

    Platinum Member

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

Posted 17 January 2020 - 11:54 AM

Note that the grub2 file manager is most useful for UEFI-booting of ISOs, WIMs and VHDs because this is something that is not possible by using grub4dos. Grub4dos does MBR-booting well and is now working very well so there is little need to test grub2 MBR booting.



#16 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 17 January 2020 - 10:31 PM

NTBOOT.img can be opened using WinImage.

grub2 is actually calling grub4dos and NTBOOT. So all are using grub4dos.

A different version of bootmgr is used in the NTBOOT.img (size 398356 bytes).

but the issue smells a bit like a memory address/map issue...

 

 I don't have Winimage.
Ok, so then when we run grub2 and try to boot a WIM we call again grub4dos, but from the grubfm.iso content.

 

I rebuilded the USB stick and added (All of them contiguous):

 

7pe_x86_E.wim

7pe_amd64_E.wim

ChrisPE-8.1x64.wim

Win10XPE_x64.wim

7pe_x86_E.iso

 

Rebooted on another MBR PC 8 GB RAM, with exactly same results.

 

Is it possible to upload your .wim files and PM me with their location so I can download and test?

I cannot reproduce any error with my hardware and wim files.

All my WIM files boot fine from internal HDD or my UEFI_MULTI USB stick using Windows bootmanager and adding them to BCD with BootIce.

 

They also boot fine using AIO Boot from internal HDD or my USB stick using Windows bootmanager.

 

They also boot fine from E2B USB stick when using grub4dos.

 

So it seems to me the problem is on another place not in the WIM image files. Anyway I'm uploading the smalest WIM file 7pe_x86_E.wim (237 MB) to let you test it, as you requested and I'll send you a PM when ready.

 

Note that the grub2 file manager is most useful for UEFI-booting of ISOs, WIMs and VHDs because this is something that is not possible by using grub4dos. Grub4dos does MBR-booting well and is now working very well so there is little need to test grub2 MBR booting.

I'm agree with you there is little need to test grub2 MBR booting when grub4dos does it very fine, but if it is there as an option, it should work fine.

I allready tested on another PC, now I will try another USB device (to exclude possible bad sectors) and report back my findings.



#17 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 January 2020 - 08:42 AM

 I'm agree with you there is little need to test grub2 MBR booting when grub4dos does it very fine, but if it is there as an option, it should work fine.

I allready tested on another PC, now I will try another USB device (to exclude possible bad sectors) and report back my findings.

Right attitude :thumbsup: .

Wonko approves of this.

 

:duff:

Wonko



#18 steve6375

steve6375

    Platinum Member

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

Posted 18 January 2020 - 09:11 AM

Thanks for the wim file.

It seems to work OK on my Haswell Asus Z87-A and under VirtualBox + VMUB (set as ICH9, 5GB system, Ubuntu 64, 4 CPUs).

 

You say you tried it on two PCs. What exact make and models were these?

Also, in E2B, could you run displaymem in the grub4dos console and report the output for both systems (real PC boot, not VM).

 

Can you try testing using VBox+VMUB set up as I decscribed above?

cheers

Steve

Attached Thumbnails

  • displaymem.JPG


#19 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 18 January 2020 - 09:52 PM

First PC is an Intel Ivy Bridge i3-3225, 3300 MHz, MB is Biostar H61MGV3 v7.7, and 4 GB DDR3 1333 MHZ RAM

Attached Thumbnails

  • PC-1.jpg


#20 steve6375

steve6375

    Platinum Member

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

Posted 20 January 2020 - 10:20 AM

I found the issue! Do you have an animation running in E2B?

I think the animation has set up a timer interrupt, so that when something is loaded by grub4dos, the interrupt is still going.

 

Please try this menu in E2B instead of the one you are using.

splashimage --animated=0
map --unmap=0:0xff > nul
map --unhook
find --set-root /grubfm.iso
map --mem /grubfm.iso (0xff)
map --hook
chainloader (0xff)
boot

P.S. Actually it is the unmap that fixes the issue! This also works...

map --unmap=0:0x03 > nul
map --unhook
find --set-root /grubfm.iso
map --mem /grubfm.iso (0xff)
map --hook
chainloader (0xff)
boot

Edited by steve6375, 20 January 2020 - 10:53 AM.


#21 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 January 2020 - 11:27 AM

 

Actually it is the unmap that fixes the issue! 

Why one is:

 

 

splashimage --animated=0
map --unmap=0:0xff > nul

and the other is:

 

map --unmap=0:0x03 > nul

 :dubbio:

 

:duff:

Wonko



#22 steve6375

steve6375

    Platinum Member

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

Posted 20 January 2020 - 11:47 AM

It is to prove that it was the floppy device map (3) that was causing the issue.



#23 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 January 2020 - 01:12 PM

It is to prove that it was the floppy device map (3) that was causing the issue.

So, either of those work?

 

But who/where/when was a floppy device mapped to 0x03? :unsure:

 

:duff:

Wonko



#24 steve6375

steve6375

    Platinum Member

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

Posted 20 January 2020 - 01:40 PM

When Easy2Boot uses animation, it loads a floppy image file as FD3 and maps it to memory. All the animation images are thus fetched from memory for fast display of images.

When NTBOOT is called, it loads a floppy image as FD0 into memory which contains bootmgr, boot.sdi and a BCD. For some reason, these two memory mapped floppy device seems to cause (fd0)\bootmgr to be corrupt.

I don't understand why. :huh:  But it could be to do with using grub4dos twice ??

i.e.

grub4dos is loaded, E2B menu runs, FILE is loaded as --mem (fd3)

grub4dos loads grubfm.iso as (0xff) which runs grub2

grub2 menu runs  xxx.wim which now runs grub.exe (grub4dos) which calls NTBOOT (grub4dos batch file) which loads its floppy image into memory as fd0 (actually the floppy file is NTBOOT.NT6 which is first mapped to (rd) and then later (rd) is mapped to (fd0)).

 

Chenalls NTBOOT batch file does contain a line

map --unmap=0xfb,0xfc,0xfe,0xff,0xcd

which implies he found some issues with (memory?) mapped drives.

Changing this to:

map --unmap=2,3,0xfb,0xfc,0xfe,0xff,0xcd

or

map --unmap=1:0xff

fixes this problem


Edited by steve6375, 20 January 2020 - 01:45 PM.


#25 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 January 2020 - 02:17 PM

I see now :)

 

Maybe it is something loosely like it happens (actually the contrary of it) in DOS (or FreeDos, cannot remember) that some floppies cannot be read/accessed but they can if mapped to B : \ and a "good" floppy is in A : \ and accessed before B : \. :dubbio:, i.e. *something* remains "sticky".

 

Are the two floppies (the one containing the animations/images and the  NTBOOT.NT6 ) both "normal" floppies?

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users