我刚刚使用 amd64 最小安装 iso(安装在 USB 驱动器上)通过以下 make.conf 安装和配置 gentoo linux:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
ACCEPT_KEYWORDS="~amd64"
CHOST="x86_64-pc-linux-gnu"
USE="device-mapper truetype bindist mmx sse sse2 lzma logrotate graphviz"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo/"
GRUB_PLATFORMS="efi-64"
按照安装手册中的说明创建了一个BIOS Boot
分区。EFI System
# parted /dev/nvme0n1
GNU Parted 3.2
Using /dev/nvme0n1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB ext4 grub bios_grub
2 3146kB 137MB 134MB fat32 boot boot, esp
3 137MB 16.9GB 16.8GB linux-swap(v1) swap
4 16.9GB 256GB 239GB ext4 rootfs
安装了 grub grub-install
:
grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
Installation finished. No error reported.
我注意到了这条消息EFI variables are not supported on this system.
,但我猜测我正在启动的内核不支持 efi 变量,但我编译了我的 gentoo-sources 内核来支持它。
我的启动分区的内容:
# ls -lsa /boot/
total 13749
1 drwxr-xr-x 4 root root 512 Jan 1 1970 .
4 drwxr-xr-x 21 root root 4096 Feb 15 19:00 ..
1 drwxr-xr-x 3 root root 512 Feb 15 22:22 EFI
3129 -rwxr-xr-x 1 root root 3203197 Feb 15 22:23 System.map-4.15.3-gentoo
103 -rwxr-xr-x 1 root root 104849 Feb 15 22:23 config-4.15.3-gentoo
1 drwxr-xr-x 6 root root 512 Feb 15 22:23 grub
10513 -rwxr-xr-x 1 root root 10764560 Feb 15 22:23 vmlinuz-4.15.3-gentoo
我有一个技嘉B150M-HD3-CF
主板,支持 uefi 启动。但是当我重新启动计算机时,它找不到可启动的驱动器。
我缺少什么?