On x86_64 UEFI, the ESP is mounted at /boot/efi.
Pass the UEFI target and EFI directory explicitly to grub-install.
Which command is correct?
UEFI grub-install uses the x86_64-efi target and points --efi-directory at the mounted ESP.
Detailed explanation
grub-install --target=x86_64-efi --efi-directory=/boot/efiCorrect. It selects the UEFI target and the mounted ESP.
Correct. It selects the UEFI target and the mounted ESP.
grub-install --target=i386-pc --efi-directory=/boot/efiIncorrect. i386-pc is a BIOS target, not x86_64 UEFI.
Incorrect. i386-pc is a BIOS target, not x86_64 UEFI.
grub-mkconfig --efi-directory=/boot/efiIncorrect. grub-mkconfig generates menu configuration and does not install the EFI loader.
Incorrect. grub-mkconfig generates menu configuration and does not install the EFI loader.
grub-install --target=x86_64-efi --efi-directory=/procIncorrect. /proc is not the ESP mount point.
Incorrect. /proc is not the ESP mount point.
Try it yourself
An example you can run in a temporary verification environment.
grub-install --help 2>&1 | grep -E -- '--target|--efi-directory' || echo 'grub-install is not installed'Expected result
targetとEFI directoryの説明、または未導入の表示Key points
- x86_64-efi is the UEFI target
- --efi-directory is the ESP mount point
- Distinguish UEFI from BIOS
Notes
- Environment: GRUB 2 / x86_64 UEFI
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.