Difference between revisions of "GRUB/EFI examples"

From ArchWiki
Jump to: navigation, search
m (update section links)
 
(70 intermediate revisions by 29 users not shown)
Line 1: Line 1:
 
[[Category:Boot loaders]]
 
[[Category:Boot loaders]]
{{Article summary start}}
+
[[ja:GRUB/EFI サンプル]]
{{Article summary text|It is well know that different motherboard manufactures implement UEFI differently.  The purpose of this page is to show hardware-specific methods known to work when installing/restoring GRUB in efi mode.}}
+
[[zh-hans:GRUB/EFI examples]]
{{Article summary heading|Related Articles}}
+
{{Accuracy|Many of the examples below indicate that the GRUB EFI binary ({{ic|grubx64.efi}}) needs to be copied to a special location (e.g, {{ic|''esp''/EFI/BOOT/bootx64.efi}}). Although this may work, this is the ''fallback'' filename. Other options may also work, like using [[efibootmgr]] or [[Unified Extensible Firmware Interface#UEFI Shell|UEFI shell]].}}
{{Article summary wiki|Grub}}
 
{{Article summary end}}
 
  
== Apple Mac EFI systems ==
+
It is well known that different motherboard manufactures implement UEFI differently. The purpose of this page is to show hardware-specific methods known to work when installing/restoring GRUB in EFI mode.
=== Generic Macs ===
+
 
Use bless command from within Mac OS X to set {{ic|grubx64.efi}} as the default boot option. You can also boot from the Mac OS X install disc and launch a Terminal there if you only have Linux installed. In the Terminal, create a directory and mount the EFI System Partition:
+
{{Note|In the entire article {{ic|''esp''}} denotes the mountpoint of the [[EFI system partition]] aka ESP.}}
 +
 
 +
== Apple Macs ==
 +
 
 +
Use bless command from within macOS to set {{ic|grubx64.efi}} as the default boot option. You can also boot from the macOS install disc and launch a Terminal there if you only have Linux installed. In the Terminal, create a directory and mount the [[EFI system partition]]:
  
 
  # cd /Volumes
 
  # cd /Volumes
Line 14: Line 16:
 
  # mount -t msdos /dev/disk0s1 /Volumes/efi
 
  # mount -t msdos /dev/disk0s1 /Volumes/efi
  
Then run bless on {{ic|grub.efi}} and on the EFI partition to set them as the default boot options.
+
Then run bless on {{ic|grub.efi}} and on the EFI system partition to set them as the default boot options.
  
  # bless --folder=/Volumes/efi --file=/Volumes/efi/efi/arch_grub/grubx64.efi --setBoot
+
  # bless --folder=/Volumes/efi --file=/Volumes/efi/EFI/GRUB/grubx64.efi --setBoot
  # bless --mount=/Volumes/efi --file=/Volumes/efi/efi/arch_grub/grubx64.efi --setBoot
+
  # bless --mount=/Volumes/efi --file=/Volumes/efi/EFI/GRUB/grubx64.efi --setBoot
  
 
More info at https://help.ubuntu.com/community/UEFIBooting#Apple_Mac_EFI_systems_.28both_EFI_architecture.29.
 
More info at https://help.ubuntu.com/community/UEFIBooting#Apple_Mac_EFI_systems_.28both_EFI_architecture.29.
  
{{Note|TODO: GRUB upstream Bazaar mactel branch http://bzr.savannah.gnu.org/lh/grub/branches/mactel/changes. No further update from grub developers.}}
+
{{Note|
{{Note|TODO: Experimental "bless" utility for Linux by Fedora developers - {{AUR|mactel-boot}}. Requires more testing.}}
+
* TODO: GRUB upstream Bazaar mactel branch http://bzr.savannah.gnu.org/lh/grub/branches/mactel/changes{{Dead link|2018|07|12}}. No further update from grub developers.
 +
* TODO: Experimental "bless" utility for Linux by Fedora developers - {{AUR|mactel-boot}}. Requires more testing.
 +
}}
  
 
== Asus ==
 
== Asus ==
=== Z68 Family and U47 Family===
 
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi
 
  
After this launch the UEFI Shell from the UEFI setup/menu (in ASUS UEFI BIOS, switch to advanced mode, press Exit in the top right corner and choose "Launch EFI shell from filesystem device"). The GRUB2 menu will show up and you can boot into your system. Afterwards you can use efibootmgr to setup a menu entry, for example if you have the uefi partition in /dev/sda1: (read [[Unified_Extensible_Firmware_Interface]])
+
=== Z68 Family and U47 Family ===
  
  efibootmgr -c -g -d /dev/sda -p 1 -w -L "Archlinux Grub" -l '\EFI\arch_grub\grubx64.efi'
+
  # cp ''esp''/EFI/GRUB/grubx64.efi ''esp''/shellx64.efi
  
If your motherboard has no such option (or even if it does), you can use UEFI shell ([[Unified_Extensible_Firmware_Interface#UEFI_Shell]]) to create a UEFI boot option for the Arch partition temporarily.
+
After this launch the UEFI Shell from the UEFI setup/menu (in ASUS UEFI BIOS, switch to advanced mode, press ''Exit'' in the top right corner and choose "Launch EFI shell from filesystem device"). The GRUB menu will show up and you can boot into your system. Afterwards you can use [[efibootmgr]] to setup a menu entry, for example if you have the [[EFI system partition]] on {{ic|/dev/sda1}}:
  
Once you boot into the EFI shell, add a UEFI boot menu entry:
+
  # efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader /EFI/GRUB/grubx64.efi --label "GRUB" --verbose
  Shell> bcfg boot add 0 fs1:\EFI\arch_grub\grubx64.efi "Arch Linux (GRUB2)"
 
where {{ic|fs1}} is the mapping corresponding to the UEFI System Partition and {{ic|\EFI\arch_grub\grubx64.efi}} is the the from the {{ic|--bootloader-id}} from the {{ic|grub-install}} command above.
 
  
This will temporarily add a UEFI boot option for the next boot to get into Arch. Once in Arch, modprobe {{ic|efivars}} and confirm that {{ic|efibootmgr}} creates no errors (no errors meaning you successfully booted in UEFI mode). Then [[Grub2#Install_to_UEFI_SYSTEM_PARTITION]] can be performed again and should successfully permanently add a boot entry in the UEFI menu.
+
If your motherboard has no such option (or even if it does), you can use [[Unified Extensible Firmware Interface#UEFI Shell|UEFI shell]] to create a UEFI boot option for the Arch partition temporarily.
 +
 
 +
Once you boot into the UEFI shell, add a UEFI boot menu entry:
 +
 
 +
Shell> bcfg boot add 0 FS0:\EFI\GRUB\grubx64.efi "GRUB"
 +
 
 +
where {{ic|FS0:}} is the mapping corresponding to the [[EFI system partition]] and {{ic|\EFI\GRUB\grubx64.efi}} is the the from the {{ic|--bootloader-id}} from the {{ic|grub-install}} command above.
 +
 
 +
This will temporarily add a UEFI boot option for the next boot to get into Arch. Once in Arch, {{ic|modprobe efivars}} and confirm that {{ic|efibootmgr}} creates no errors (no errors meaning you successfully booted in UEFI mode). Then [[GRUB#Installation_2|GRUB installation]] can be performed again and should successfully permanently add a boot entry in the UEFI menu.
 +
 
 +
=== ux32vd ===
 +
 
 +
{{Note|The BIOS does not allow computer to boot from GPT disk if there is no properly set-up UEFI boot entry. The disk even may not be seen in BIOS in this case. The fix is to make a proper UEFI boot entry.}}
 +
 
 +
There is a caveat. If the machine was booted from MBR then {{ic|grub-install}} (or [[efibootmgr]]) will fail to create the UEFI boot entry with the following error:
 +
 
 +
EFI variables are not supported on this system
 +
 
 +
You first need to boot the machine with EFI and then create the boot entry. This can be done the way described for Z68 Family: by copying {{ic|''esp''/EFI/GRUB/grubx64.efi}} into {{ic|''esp''/shellx64.efi}} and selecting "Launch EFI shell from filesystem device".
 +
After successful boot it is possible to create a boot entry using [[GRUB#Installation_2|grub-install]] or [[efibootmgr]].
  
 
=== P8Z77 Family ===
 
=== P8Z77 Family ===
*Boot to live media and chroot into the target system.
+
 
'''FROM WITHIN THE CHROOT'''
+
{{Accuracy|This procedure is most likely no longer necessary and you can just create the entry via [[efibootmgr]].}}
# mount -t vfat /dev/sdXY /boot/efi
+
 
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch --recheck
+
[[GRUB#Installation_2|Install GRUB]] and copy the [[Unified Extensible Firmware Interface#Obtaining UEFI Shell|modified UEFI Shell binary]] to [[ESP]].
# grub-mkconfig -o /boot/grub/grub.cfg
+
 
# mkdir /boot/efi/boot && cd /boot/efi
+
The [[EFI system partition]] should contain just two files:
  # wget https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi
+
 
  # cp Shell.efi shellx64.efi && cp Shell.efi /boot/efi/boot
+
  /Shell.efi
# umount /boot/efi
+
  /EFI/GRUB/grubx64.efi
*Reboot and enter the BIOS (the Delete key will do this).
+
 
*Using the arrow keys, move to the 'exit' menu and drop down to the EFI shell you just downloaded and copied to three places.
+
* Reboot and enter the BIOS (the {{ic|Delete}} key will do this).
* You will need to add an entry to your boot menu manually. Below is an example, see the [[UEFI#Launching UEFI Shell]] article for more. Below is an example added a new entry to a menu with 3 current entries.
+
* Using the arrow keys, move to the ''exit'' menu and drop down to the ''EFI shell''.
'''FROM WITHIN THE EFI SHELL'''
+
* Add an entry for Arch to the menu. Below is an example, see the [[Unified Extensible Firmware Interface#Launching UEFI Shell]] article for more.
 +
 
 +
'''Within UEFI shell'''
 +
 
 
  Shell> bcfg boot dump -v
 
  Shell> bcfg boot dump -v
  Shell> bcfg boot add 3 fs0:\EFI\arch\grubx64.efi "Arch Linux (grub manually added)"
+
  Shell> bcfg boot add 1 FS0:\EFI\GRUB\grubx64.efi "GRUB"
 
  Shell> exit
 
  Shell> exit
 +
 
* Reboot the machine and enter the BIOS.
 
* Reboot the machine and enter the BIOS.
* Navigate to the 'Boot' section and adjust the boot order to your liking with the "Arch Linux (grub manually added)" being the one on your SSD.
+
* Navigate to the ''Boot'' section and adjust the boot order to with the "GRUB" being the one on the SSD.
* Boot to this entry and enjoy your system.
+
* Boot to this entry and enjoy.
  
 
=== M5A97===
 
=== M5A97===
Finish the standard Arch install procedures, making sure that you install {{Pkg|grub-efi-x86_64}} and partition your boot hard disk as GPT.
 
  
From [https://wiki.archlinux.org/index.php/Grub#Install_to_UEFI_system_partition]:
+
Finish the standard Arch install procedures, making sure that you partition your boot hard disk as GPT.
 +
 
 +
[[GRUB#Installation_2|Install GRUB]] and copy the [[Unified Extensible Firmware Interface#Obtaining UEFI Shell|modified UEFI Shell binary]] to [[ESP]].
 +
 
 +
The reason that we need this shell application is that the {{ic|efibootmgr}} command will fail silently during {{ic|grub-install}}.
 +
 
 +
After this launch the UEFI Shell from the UEFI setup/menu (in ASUS UEFI BIOS, switch to advanced mode, press ''Exit'' in the top right corner and choose "Launch EFI shell from filesystem device"). The UEFI shell will show up. From here we need to add our GRUB entry to the NVRAM.
 +
 
 +
Shell> bcfg boot add 3 FS0:\EFI\GRUB\grubx64.efi "GRUB"
 +
 
 +
where {{ic|FS0:}} is the mapping corresponding to the [[EFI system partition]] and {{ic|3}} is the zero based boot entry index.
 +
 
 +
{{Tip|UEFI Shell commands usually support {{ic|-b}} option which makes output pause after each page. {{ic|map}} lists recognized filesystems ({{ic|fs0}}, ...) and data storage devices ({{ic|blk0}}, ...). Run {{ic|help -b}} to list available commands. See [[Unified Extensible Firmware Interface#Important UEFI Shell commands]] for more information.}}
 +
 
 +
To list the current boot entries you can run:
 +
 
 +
Shell> bcfg boot dump -v
  
The UEFI system partition will need to be mounted at {{ic|/boot/efi/}} for the GRUB install script to detect it:
+
== Asrock ==
  
# mkdir -p /boot/efi
+
=== Z97M Pro4 ===
# mount -t vfat /dev/sdXY /boot/efi
 
  
Where X is your boot hard disk and Y is the efi partition you created earlier.
+
{{Accuracy|If ''efibootmgr'' works when launched from the installed system, why would it not work when {{ic|grub-install}} executes it?}}
  
Install GRUB UEFI application to {{ic|/boot/efi/EFI/arch_grub}} and its modules to {{ic|/boot/grub/x86_64-efi}} using:
+
This is a similar procedure to Asus Z68 Family. This was tested on a Z97M Pro4 BIOS P1.90.
  
# modprobe dm-mod
+
  # cp ''esp''/EFI/GRUB/grubx64.efi ''esp''/shellx64.efi
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
 
# mkdir -p /boot/grub/locale
 
  # cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
 
  
Generate a configuration for GRUB
+
After this launch the UEFI Shell from the UEFI setup/menu (in ASROCK UEFI BIOS, goto ''Exit'' tab and choose "Launch EFI Shell From Filesystem Device"). The GRUB menu will show up and you can boot into your system. Afterwards you can use ''efibootmgr'' to setup a menu entry, for example if you have the [[EFI system partition]] on {{ic|/dev/sda1}}:
  
  # grub-mkconfig -o /boot/grub/grub.cfg
+
  # efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader /EFI/GRUB/grubx64.efi --label "GRUB" --verbose
  
Then copy the [http://dl.dropbox.com/u/17629062/Shell2.zip modified UEFI Shell v2 binary] UefiShellX64.efi into your ESP root.
+
== Dell ==
  
# cp ~/Shell2/UefiShellX64.efi /mnt/boot/efi/shellx64.efi
+
=== PowerEdge T30 ===
  
The reason that we need this shell application is that the efibootmgr command will fail silently during grub-install.
+
The Dell UEFI implementation needs the [[GRUB/Tips_and_tricks#UEFI_firmware_workaround|UEFI firmware workaround]] to load grub. Otherwise it will drop into a "no OS found" screen.
  
After this launch the UEFI Shell from the UEFI setup/menu (in ASUS UEFI BIOS, switch to advanced mode, press Exit in the top right corner and choose "Launch EFI shell from filesystem device"). The UEFI shell will show up. From here we need to add our GRUB UEFI app to the bootloader.
+
== MSI ==
  
  Shell> bcfg boot add 3 fs0:\EFI\Arch_Grub\grubx64.efi "Arch_Grub"
+
These MSI motherboards seem to want the EFI program to exist in a different location from where GRUB installs it. Do one of the following after following the instructions for installing [[GRUB]]:
  
where {{ic|fs0}} is the mapping corresponding to the UEFI System Partition and {{ic|3}} is the zero based boot entry index.
+
=== B250M PRO-VH ===
  
To list the current boot entries you can run:
+
# mkdir ''esp''/EFI/BOOT
 +
# cp ''esp''/EFI/grub/grubx64.efi ''esp''/EFI/BOOT/shellx64.efi
 +
 
 +
=== B250 PC MATE / H110I PRO ===
 +
 +
Install GRUB to the [[GRUB#Default/fallback boot path|default/fallback boot path]].
 +
 
 +
{{Note|The procedures above probably also work for other MSI motherboards.}}
 +
 
 +
== HP ==
 +
 
 +
=== EliteBook 840 G1 ===
 +
 
 +
See [[HP EliteBook 840 G1#UEFI Setup]] for details.
  
Shell> bcfg boot dump -v
+
{{Note|The procedures in the link above probably also work for a range of other HP models.}}
  
 
== Intel ==
 
== Intel ==
 +
 
=== S5400 Family ===
 
=== S5400 Family ===
This board can run in BIOS or in EFI mode. BIOS mode requires an MBR-partitioned hard drive, EFI a GPT hard drive. Please note that this board operates on the Intel EFI v1.10 specification, and is i386 only. The normal procedure for UEFI installation can be followed, with the exception of the following changes.
+
 
* Instead of using the {{ic|grub-efi-x86_64}} package, {{ic|grub-efi-i386}} has to be used
+
{{Expansion|Does it support booting from the default/fallback boot path {{ic|''esp''/EFI/BOOT/BOOTia32.efi}}? If it does, the instructions could be simplified.}}
* The {{ic|bcfg}} command is not available for pre-UEFI (v2.0) firmware. A {{ic|startup.nsh}} file can be used on the root of the EFI partition containing the path to the bootloader. For example:
+
 
{{ic|fs0:\EFI\arch_grub\boot.efi}}
+
This board can run in BIOS or in EFI mode. BIOS mode requires an MBR partitioned hard drive, EFI - a GPT hard drive. Please note that this board operates on the Intel EFI v1.10 specification, and is IA32 (32-bit) only. The normal procedure for UEFI installation can be followed, with the exception of the following changes.
has to be placed in the {{ic|startup.nsh}} file on the root of the EFI partition.
+
 
* The {{ic|grub.cfg}} file has to be placed in the same directory as the grub EFI file, otherwise grub will not find it and enter the interactive shell
+
* Instead of using the {{ic|grub-efi-x86_64}} target, {{ic|grub-efi-i386}} has to be used
 +
* The {{ic|bcfg}} command is not available for pre-UEFI (v2.0) firmware. A {{ic|startup.nsh}} file can be used on the root of the [[EFI system partition]] containing the path to the bootloader. For example: {{ic|FS0:\EFI\GRUB\grubia32.efi}} has to be placed in the {{ic|startup.nsh}} file on the root of the EFI system partition.
 +
* The {{ic|grub.cfg}} file has to be placed in the same directory as the grub EFI binary, otherwise GRUB will not find it and enter the interactive shell.
 +
 
 +
== Lenovo ==
 +
 
 +
=== K450 IdeaCentre ===
 +
 
 +
The EFI system partition requires the file {{ic|\EFI\BOOT\BOOTx64.efi}} to be present in order to boot, otherwise you will receive "Error 1962: No operating system found. Boot sequence will automatically repeat."
 +
 
 +
Install GRUB to the [[GRUB#Default/fallback boot path|default/fallback boot path]].
 +
 
 +
This is a workaround for what is likely a bug in the UEFI implementation.
 +
 
 +
=== M92p ThinkCentre ===
 +
 
 +
This system whitelists UEFI boot entries. It will only boot from a entry called "Red Hat Enterprise Linux". So specify the bootloader-id appropriately:
 +
 
 +
# grub-install --target=x86_64-efi --efi-directory=''esp'' --bootloader-id="Red Hat Enterprise Linux" --recheck --debug
 +
 
 +
=== X270 Thinkpad ===
 +
 
 +
{{Accuracy|There's no need to do anything special for UEFI booting on this laptop.|section=X270}}
 +
 
 +
Install GRUB to the [[GRUB#Default/fallback boot path|default/fallback boot path]].

Latest revision as of 10:10, 13 July 2018

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Many of the examples below indicate that the GRUB EFI binary (grubx64.efi) needs to be copied to a special location (e.g, esp/EFI/BOOT/bootx64.efi). Although this may work, this is the fallback filename. Other options may also work, like using efibootmgr or UEFI shell. (Discuss in Talk:GRUB/EFI examples#)

It is well known that different motherboard manufactures implement UEFI differently. The purpose of this page is to show hardware-specific methods known to work when installing/restoring GRUB in EFI mode.

Note: In the entire article esp denotes the mountpoint of the EFI system partition aka ESP.

Apple Macs

Use bless command from within macOS to set grubx64.efi as the default boot option. You can also boot from the macOS install disc and launch a Terminal there if you only have Linux installed. In the Terminal, create a directory and mount the EFI system partition:

# cd /Volumes
# mkdir efi
# mount -t msdos /dev/disk0s1 /Volumes/efi

Then run bless on grub.efi and on the EFI system partition to set them as the default boot options.

# bless --folder=/Volumes/efi --file=/Volumes/efi/EFI/GRUB/grubx64.efi --setBoot
# bless --mount=/Volumes/efi --file=/Volumes/efi/EFI/GRUB/grubx64.efi --setBoot

More info at https://help.ubuntu.com/community/UEFIBooting#Apple_Mac_EFI_systems_.28both_EFI_architecture.29.

Note:

Asus

Z68 Family and U47 Family

# cp esp/EFI/GRUB/grubx64.efi esp/shellx64.efi

After this launch the UEFI Shell from the UEFI setup/menu (in ASUS UEFI BIOS, switch to advanced mode, press Exit in the top right corner and choose "Launch EFI shell from filesystem device"). The GRUB menu will show up and you can boot into your system. Afterwards you can use efibootmgr to setup a menu entry, for example if you have the EFI system partition on /dev/sda1:

# efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader /EFI/GRUB/grubx64.efi --label "GRUB" --verbose

If your motherboard has no such option (or even if it does), you can use UEFI shell to create a UEFI boot option for the Arch partition temporarily.

Once you boot into the UEFI shell, add a UEFI boot menu entry:

Shell> bcfg boot add 0 FS0:\EFI\GRUB\grubx64.efi "GRUB"

where FS0: is the mapping corresponding to the EFI system partition and \EFI\GRUB\grubx64.efi is the the from the --bootloader-id from the grub-install command above.

This will temporarily add a UEFI boot option for the next boot to get into Arch. Once in Arch, modprobe efivars and confirm that efibootmgr creates no errors (no errors meaning you successfully booted in UEFI mode). Then GRUB installation can be performed again and should successfully permanently add a boot entry in the UEFI menu.

ux32vd

Note: The BIOS does not allow computer to boot from GPT disk if there is no properly set-up UEFI boot entry. The disk even may not be seen in BIOS in this case. The fix is to make a proper UEFI boot entry.

There is a caveat. If the machine was booted from MBR then grub-install (or efibootmgr) will fail to create the UEFI boot entry with the following error:

EFI variables are not supported on this system

You first need to boot the machine with EFI and then create the boot entry. This can be done the way described for Z68 Family: by copying esp/EFI/GRUB/grubx64.efi into esp/shellx64.efi and selecting "Launch EFI shell from filesystem device". After successful boot it is possible to create a boot entry using grub-install or efibootmgr.

P8Z77 Family

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: This procedure is most likely no longer necessary and you can just create the entry via efibootmgr. (Discuss in Talk:GRUB/EFI examples#)
Install GRUB and copy the modified UEFI Shell binary to ESP.

The EFI system partition should contain just two files:

/Shell.efi
/EFI/GRUB/grubx64.efi

Within UEFI shell

Shell> bcfg boot dump -v
Shell> bcfg boot add 1 FS0:\EFI\GRUB\grubx64.efi "GRUB"
Shell> exit
  • Reboot the machine and enter the BIOS.
  • Navigate to the Boot section and adjust the boot order to with the "GRUB" being the one on the SSD.
  • Boot to this entry and enjoy.

M5A97

Finish the standard Arch install procedures, making sure that you partition your boot hard disk as GPT.

Install GRUB and copy the modified UEFI Shell binary to ESP.

The reason that we need this shell application is that the efibootmgr command will fail silently during grub-install.

After this launch the UEFI Shell from the UEFI setup/menu (in ASUS UEFI BIOS, switch to advanced mode, press Exit in the top right corner and choose "Launch EFI shell from filesystem device"). The UEFI shell will show up. From here we need to add our GRUB entry to the NVRAM.

Shell> bcfg boot add 3 FS0:\EFI\GRUB\grubx64.efi "GRUB"

where FS0: is the mapping corresponding to the EFI system partition and 3 is the zero based boot entry index.

Tip: UEFI Shell commands usually support -b option which makes output pause after each page. map lists recognized filesystems (fs0, ...) and data storage devices (blk0, ...). Run help -b to list available commands. See Unified Extensible Firmware Interface#Important UEFI Shell commands for more information.

To list the current boot entries you can run:

Shell> bcfg boot dump -v

Asrock

Z97M Pro4

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: If efibootmgr works when launched from the installed system, why would it not work when grub-install executes it? (Discuss in Talk:GRUB/EFI examples#)

This is a similar procedure to Asus Z68 Family. This was tested on a Z97M Pro4 BIOS P1.90.

# cp esp/EFI/GRUB/grubx64.efi esp/shellx64.efi

After this launch the UEFI Shell from the UEFI setup/menu (in ASROCK UEFI BIOS, goto Exit tab and choose "Launch EFI Shell From Filesystem Device"). The GRUB menu will show up and you can boot into your system. Afterwards you can use efibootmgr to setup a menu entry, for example if you have the EFI system partition on /dev/sda1:

# efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader /EFI/GRUB/grubx64.efi --label "GRUB" --verbose

Dell

PowerEdge T30

The Dell UEFI implementation needs the UEFI firmware workaround to load grub. Otherwise it will drop into a "no OS found" screen.

MSI

These MSI motherboards seem to want the EFI program to exist in a different location from where GRUB installs it. Do one of the following after following the instructions for installing GRUB:

B250M PRO-VH

# mkdir esp/EFI/BOOT
# cp esp/EFI/grub/grubx64.efi esp/EFI/BOOT/shellx64.efi

B250 PC MATE / H110I PRO

Install GRUB to the default/fallback boot path.

Note: The procedures above probably also work for other MSI motherboards.

HP

EliteBook 840 G1

See HP EliteBook 840 G1#UEFI Setup for details.

Note: The procedures in the link above probably also work for a range of other HP models.

Intel

S5400 Family

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Does it support booting from the default/fallback boot path esp/EFI/BOOT/BOOTia32.efi? If it does, the instructions could be simplified. (Discuss in Talk:GRUB/EFI examples#)

This board can run in BIOS or in EFI mode. BIOS mode requires an MBR partitioned hard drive, EFI - a GPT hard drive. Please note that this board operates on the Intel EFI v1.10 specification, and is IA32 (32-bit) only. The normal procedure for UEFI installation can be followed, with the exception of the following changes.

  • Instead of using the grub-efi-x86_64 target, grub-efi-i386 has to be used
  • The bcfg command is not available for pre-UEFI (v2.0) firmware. A startup.nsh file can be used on the root of the EFI system partition containing the path to the bootloader. For example: FS0:\EFI\GRUB\grubia32.efi has to be placed in the startup.nsh file on the root of the EFI system partition.
  • The grub.cfg file has to be placed in the same directory as the grub EFI binary, otherwise GRUB will not find it and enter the interactive shell.

Lenovo

K450 IdeaCentre

The EFI system partition requires the file \EFI\BOOT\BOOTx64.efi to be present in order to boot, otherwise you will receive "Error 1962: No operating system found. Boot sequence will automatically repeat."

Install GRUB to the default/fallback boot path.

This is a workaround for what is likely a bug in the UEFI implementation.

M92p ThinkCentre

This system whitelists UEFI boot entries. It will only boot from a entry called "Red Hat Enterprise Linux". So specify the bootloader-id appropriately:

# grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id="Red Hat Enterprise Linux" --recheck --debug

X270 Thinkpad

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: There's no need to do anything special for UEFI booting on this laptop. (Discuss in Talk:GRUB/EFI examples#X270)

Install GRUB to the default/fallback boot path.