Topic: Grub2-EFI for x64 build  (Read 5793 times)

Grub2-EFI for x64 build
« on: October 31, 2014, 07:59:58 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Here is a mini package to add Grub2 EFI to your USB stick/disk, for 64 bit UEFI computer.
It is Based on Fedora 20 x86-64 EFI LiveUSB.
It is only included in "Copy to USB-Device" plugin with Grub4Dos (MBR) / Grub2 or standard (UEFI).
 
ila_rendered

Projects_Win81se_Grub2_x64_efi.7z

Thanks for your feedback with Secure boot ON/OFF  :thumbsup:
« Last Edit: October 31, 2014, 08:01:57 PM by ChrisR »

Re: Grub2-EFI for x64 build
« Reply #1 on: October 31, 2014, 08:19:18 PM »

Atari800xl

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Feb 2013
  • Posts: 827
Thanks ChrisR, could you (or somebody else) please explain a bit more about what this is exactly, what can we use it for, what is special here, etc.

Not for me of course  :tongue: but for others (just kidding, for me as well).

Re: Grub2-EFI for x64 build
« Reply #2 on: October 31, 2014, 10:58:55 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Not having UEFI PC at home, I've seen only few UEFI laptop. I'm not the best one to talk about it   :wink:

There are many things written on it
Here is a presentation by Adam Williamson: UEFI: The Great Satan and you
A reliable site with many good things written by Roderick Smith: The rEFInd Boot Manager for UEFI based computers

Grub2 is compatible with UEFI  :thumbsup:, it is mostly used in Linux distributions and mainly for 64 bit UEFI firmware PC.
I don't know how many Linux distributions support the 32 bit UEFI. It seems that only few tablet are 32 bit uEFI and therefore developpers are less interested.

It is added here to provide a USB (Fat32 required) Multiboot menu, as it is done for Bios based computers with grub4dos or isolinux.
It allows  to add some 64 bit uEFI tools (eg: memtest86, kon-boot) or others OS (eg: Linux disto, Parted Magic).
There is a checkbox in "Copy to USb-device" to add it for those who prefer rather than the standard boot which remains available of course.

However, most 64 bit UEFI PC, but not ALL, have an option to enable the Compatibility Support Module (CSM). It is a component of the UEFI firmware that provides legacy BIOS compatibility by emulating a BIOS environment, allowing legacy operating systems. The boot in UEFI avoids the need to activate it.

For info, VMware Workstation 11, available soon in december, has improve its integration with an option available since the creation of the virtual machine  :thumbsup:

You would probably want to add some stuff  :wink:
« Last Edit: October 31, 2014, 11:25:20 PM by ChrisR »

Re: Grub2-EFI for x64 build
« Reply #3 on: November 01, 2014, 05:34:31 AM »

anshad

  • Chef
  • ***
  • Date Registered: Apr 2012
  • Posts: 323
Hi ChrisR

About a month ago, i conducted some experiments with GRUB 2 fedora package. My goal is to create a SecureBoot compatible multi-boot USB stick which can boot either Win8PEx64 or latest version of PartedMagic. Here is my test result :

1. Gigabyte H61-MS1 Desktop MoBo - By default, "SecureBoot" is not enabled. I can boot either of the OS without any issues (UEFI mode ). Works great.

2. Lenovo B50 laptop - This one came with Win8 presinstalled and SecureBoot enabled. GRUB2 able to boot both "Parted Magic" and "Win8PE" without the need to turnoff "SecureBoot".

3. SONY VAIO laptop - This one also came with Win8 preinstalled. Booting to "PartedMagic" works great but GRUB2 failed to load "Win8PE". Whenever i try to boot "Win8PE" , i will get an error message similar to the below one.

Code: [Select]
/EndEntire
file path: /ACPI(a0341d0,0)/PCI(2,1f)/UnknownMessaging(12)
/HD(2,c880,96000,4cb097d41345de45,a6,f8)/File(\efi\Microsoft\Boot)/File(bootmgfw.efi)/EndEntire
error: cannot load image

 


At first i though that GRUB2 package i was using is a bit old so a newer version will solve the issue. I replaced the GRUB2 Fedora package with the one from latest version of Ubuntu and the issue persisted. I began searching on the net and found that there are some UEFI firmwares which doesn't like chain-loading Windows boot loader via GRUB2 if "SecureBoot" is enabled. If "SecureBoot" is turned off, the same menu entry will works as expected. The GRUB2 team identified it as a bug and as of today, the bug is not fixed.

Source : https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1091464

So if anyone encounters an error message similar to the one i posted, just turn off "SecureBoot" and hopefully GRUB2 will be able to chain-load "Win8PE" in UEFI mode.
« Last Edit: November 01, 2014, 05:36:15 AM by anshad »

Re: Grub2-EFI for x64 build
« Reply #4 on: November 01, 2014, 05:50:06 AM »

Atari800xl

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Feb 2013
  • Posts: 827
Grub2 is compatible with UEFI  :thumbsup:
It is added here to provide a USB (Fat32 required) Multiboot menu
It allows  to add some 64 bit uEFI tools (eg: memtest86, kon-boot) or others OS (eg: Linux disto, Parted Magic)
Thanks for the overview. So basically, on older BIOS systems we use a Grub4dos multiboot menu, on newer UEFI systems we use a Grub2 multiboot menu. That's how I can explain it to my grandmother  :wink:

This is all very interesting stuff, I'll try to test this on as many systems as I can. Like you ChrisR, I don't own any UEFI systems myself yet, but every now and then people with new laptops come in, so I will try booting with a new Win8.1SE USB. I also would like to try backup and restore (with Acronis/ Macrium/ DriveSnapshot/ Terabyte/ Paragon/ Aomei/ Active@), but those things you can't very well test "quickly" on a friend's laptop...

So thanks again, I'm looking forward to new developments in this area!
« Last Edit: November 01, 2014, 05:51:12 AM by Atari800xl »

Re: Grub2-EFI for x64 build
« Reply #5 on: November 01, 2014, 09:56:28 AM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Thanks anshad for this valuable return  :thumbsup:
Not really good but good to know that grub2 with the secure boot does not work on some/few hardware to chainload Windows  :sad: but that it works Once secure boot disabled  :wink:

I started to experiment, like you, ~1 month ago.
I was a little afraid, before, to follow fuwi's approach http://theoven.org/index.php?topic=666.msg9689#msg9689  :thumbsup: and add to SE project.

@Atari
You're lucky with your grandmother, mine doesn't understands the Multiboot concept but just the menu for the cooking recipe   :lol:
« Last Edit: November 01, 2014, 10:11:26 AM by ChrisR »

Re: Grub2-EFI for x64 build
« Reply #6 on: November 01, 2014, 10:51:25 AM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Related to Combine x64 & x86 in one ISO? (UEFI & BIOS)
It must be possible to add Ms bootia32.efi in addition to Grub2-efi 64 bit and have an ISO/USB supporting both architectures for MBR or UEFI 32/64 bit based computer  :thumbsup:
So we can have:
SE x86/x64 with grub4Dos/Isolinux multiboot menu or Ms standard boot available for MBR PC.
SE x86 with standard Ms boot for 32 bit UEFI firmware.
SE x64 with Grub2 multiboot menu or standard boot for 64 bit UEFI firmware.

To create ISO, I guess that we need to first create a boot image with bootia32.efi, bootx64.efi, grubx64.efi and maybe grub.cfg and then by adding the right bcd menu entries for bootx86.wim/bootx64.wim.

:cheers:

 

 

Powered by EzPortal