Читал вики
https://wiki.gentoo.org/wiki/GRUB
там написано, что есть три варианта установки (UEFI with GPT, BIOS with MBR, BIOS with GPT)
В интерфейсе virt-manager выбрал вариант Firmware: UEFI
Вот мой диск:
# gdisk /dev/vda
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/vda: 209715200 sectors, 100.0 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): FAF168F6-2AED-40C2-91A5-D06E0A8F207D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 209715166
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 8390655 4.0 GiB EF00 EFI system partition
2 8390656 209713151 96.0 GiB 8300 Linux filesystem
Command (? for help): i
Partition number (1-2): 1
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Partition unique GUID: DB9AD88C-FD3E-4B61-8B22-CC910DAB5121
First sector: 2048 (at 1024.0 KiB)
Last sector: 8390655 (at 4.0 GiB)
Partition size: 8388608 sectors (4.0 GiB)
Attribute flags: 0000000000000000
Partition name: 'EFI system partition'
Command (? for help): i
Partition number (1-2): 2
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: FF6B0957-D60B-46BB-9406-B84AB12544E7
First sector: 8390656 (at 4.0 GiB)
Last sector: 209713151 (at 100.0 GiB)
Partition size: 201322496 sectors (96.0 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'
Command (? for help): q
монтирую его
mount /dev/vda1 /efi
и тут оно мне пишет:
# grub-install --target=x86_64-efi --efi-directory=/efi
Installing for x86_64-efi platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
В chroot я заходил командой arch-chroot /mnt/gentoo
с Minimal CD.
Что надо сделать?
UPD:
mount /dev/vda2 /mnt/gentoo/
mount /dev/vda1 /mnt/gentoo/boot/
# time grub-install --efi-directory=/boot
Installing for x86_64-efi platform.
Installation finished. No error reported.
real 0m17,614s
user 0m0,052s
sys 0m0,616s
только сама установка 17.6 секунд. Это тоже долго.