You are not logged in.
Hi there
I have two partitions like in wiki
/mnt/efi /dev/sda1 EFI system partition FAT32
/mnt /dev/sda2 Linux x86-64 root (/) EXT4Already installed packages grub and efibootmgr
Now I a little confused what I should substitute esp
grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
If i try use /boot/EFI get an error: failed to get canonical path to /boot/efi
Last edited by webcapcha (2019-03-02 12:42:18)
Ukrainian
Offline
Hi there
I have two partitions like in wiki
/mnt/efi /dev/sda1 EFI system partition FAT32 /mnt /dev/sda2 Linux x86-64 root (/) EXT4Already installed packages grub and efibootmgr
Now I a little confused what I should substitute esp
grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUBIf i try use /boot/EFI get an error: failed to get canonical path to /boot/efi
you need to chroot into /mnt before using grub-install. also mount sda1 to /mnt/boot/efi
Offline
what I should substitute esp
Replace esp with the directory under which the EFI system partition is mounted.
you need to chroot into /mnt before using grub-install
Not necessarily, the OP could run this command directly from the "live" environment without chrooting:
# grub-install --target=x86_64-efi --boot-directory=/mnt/boot --efi-directory=/mnt/efi --bootloader-id=ArchOr use this instead:
# arch-chroot /mnt
[chroot]# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=ArchEither approach should work.
also mount sda1 to /mnt/boot/efi
No need for that either, the installation guide does actually sugest /mnt/efi (or /mnt/boot) as the ESP mountpoint:
Create any remaining mount points (such as /mnt/efi) and mount their corresponding partitions.
https://wiki.archlinux.org/index.php/In … le_systems & https://wiki.archlinux.org/index.php/In … le_layouts
Most other distributions mount the ESP under /boot/efi but this is optional for Arch.
EDIT: I think VirtualBox tends to "forget" NVRAM entries so you may have to add the --removable flag to the `grub-install` command.
Last edited by Head_on_a_Stick (2019-03-02 16:02:25)
Jin, Jîyan, Azadî
Offline
EDIT: I think VirtualBox tends to "forget" NVRAM entries so you may have to add the --removable flag to the `grub-install` command.
Indeed.
Whenever I need to use VirtualBox for an Arch VM I just install it in BIOS mode instead. This also has the advantage of only needing 1 partition and being more portable.
Offline
webcapcha wrote:what I should substitute esp
Replace esp with the directory under which the EFI system partition is mounted.
mmdamin wrote:you need to chroot into /mnt before using grub-install
Not necessarily, the OP could run this command directly from the "live" environment without chrooting:
# grub-install --target=x86_64-efi --boot-directory=/mnt/boot --efi-directory=/mnt/efi --bootloader-id=ArchOr use this instead:
# arch-chroot /mnt [chroot]# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=ArchEither approach should work.
mmdamin wrote:also mount sda1 to /mnt/boot/efi
No need for that either, the installation guide does actually sugest /mnt/efi (or /mnt/boot) as the ESP mountpoint:
Installation Guide wrote:Create any remaining mount points (such as /mnt/efi) and mount their corresponding partitions.
https://wiki.archlinux.org/index.php/In … le_systems & https://wiki.archlinux.org/index.php/In … le_layouts
Most other distributions mount the ESP under /boot/efi but this is optional for Arch.
EDIT: I think VirtualBox tends to "forget" NVRAM entries so you may have to add the --removable flag to the `grub-install` command.
yes I used /boot for my esp to keep updated kernel and initrd in esp without need for any other actions. Thank you, I just suggested easiest way in my opinion. in this way grub-install will work without any arguments.
Offline
Head_on_a_Stick wrote:EDIT: I think VirtualBox tends to "forget" NVRAM entries so you may have to add the --removable flag to the `grub-install` command.
Indeed.
Whenever I need to use VirtualBox for an Arch VM I just install it in BIOS mode instead. This also has the advantage of only needing 1 partition and being more portable.
virtualbox has a builtin efi shell (but my firmware doesn't, can I flash it?), we can use a startup.nsh to boot in this situation. something like fs0:\vmlinuz-linux quiet root=/dev/sda2 initrd=initramfs.img in it will boot. (need to mount esp to /boot and run pacman -S linux and mkinitcpio -p linux)
Last edited by mmdamin (2019-03-03 13:10:17)
Offline