EFI 存根内核无法启动,但黑屏

EFI 存根内核无法启动,但黑屏

我正在尝试在一个 EFI 存根内核上启动 Gentoo Linux海茨纳 AX41-NVME服务器,但仅在服务器挂起时显示空白黑屏。

分区表:

root@rescue ~ # sgdisk -p /dev/nvme0n1
Disk identifier (GUID): F094B3BD-52B7-4404-BCC3-97C31B79D87B
Number  Start (sector)    End (sector)  Size       Code  Name
1            2048          526335   256.0 MiB   EF00  EFI System
2          526336         8914943   4.0 GiB     FD00  Linux RAID
3         8914944      1000215182   472.7 GiB   FD00  Linux RAID

root@rescue ~ # sgdisk -p /dev/nvme1n1
Disk identifier (GUID): CB8CDFE7-F9CC-43BD-949E-047583602A5B
Number  Start (sector)    End (sector)  Size       Code  Name
1            2048          526335   256.0 MiB   EF00  EFI System
2          526336         8914943   4.0 GiB     FD00  Linux RAID
3         8914944      1000215182   472.7 GiB   FD00  Linux RAID

RAID配置:

root@rescue ~ # cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 nvme0n1p3[0] nvme1n1p3[1]
 495518016 blocks super 1.2 [2/2] [UU]
 bitmap: 0/4 pages [0KB], 65536KB chunk
md1 : active raid1 nvme0n1p2[0] nvme1n1p2[1]
 4189184 blocks super 1.2 [2/2] [UU]
md0 : active raid1 nvme0n1p1[0] nvme1n1p1[1]
 262080 blocks super 1.0 [2/2] [UU]
unused devices: <none>

UUID/文件系统:

rescue ~ # blkid
/dev/nvme1n1p1: UUID="e89d4289-e9f4-c257-09c5-52f1964b8610" UUID_SUB="a676ed40-b711-bbaa-c8b9-4bb8fd6da503" LABEL="rescue:0" TYPE="linux_raid_member" PARTLABEL="EFI System" PARTUUID="22ed455d-6d9f-4253-bf72-de535e8a848a"
/dev/nvme1n1p2: UUID="4e5f115e-be72-330e-ef95-7f638ca106c1" UUID_SUB="089e8879-f9b0-da15-d9a6-1af77c33d697" LABEL="rescue:1" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="7c4361b1-7137-4935-a2ab-e9683161e303"
/dev/nvme1n1p3: UUID="75613912-6a27-381f-a550-9dee3b9b1db0" UUID_SUB="f997b923-2614-d3a8-9457-e0b8235ff49d" LABEL="rescue:2" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="175ddaae-5aec-49d1-a839-f62b371b4360"
/dev/nvme0n1p1: UUID="e89d4289-e9f4-c257-09c5-52f1964b8610" UUID_SUB="bd60292a-2681-a980-fb15-cabdd5ed3441" LABEL="rescue:0" TYPE="linux_raid_member" PARTLABEL="EFI System" PARTUUID="b47b57a5-a617-491f-9a55-3b918525b571"
/dev/nvme0n1p2: UUID="4e5f115e-be72-330e-ef95-7f638ca106c1" UUID_SUB="30043bb0-8dc3-f507-ef24-c2ec0488f6cc" LABEL="rescue:1" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="ea7f367b-9019-43a9-9f2c-01f754c08683"
/dev/nvme0n1p3: UUID="75613912-6a27-381f-a550-9dee3b9b1db0" UUID_SUB="61f62d14-0640-3300-7c9e-4d48d012d5b4" LABEL="rescue:2" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="28e635c7-208f-415d-8333-369811d59533"
/dev/md0: UUID="4349-B2C7" BLOCK_SIZE="512" TYPE="vfat"
/dev/md1: UUID="a772cb17-0432-4dfd-96d9-0c90d3de1567" TYPE="swap"
/dev/md2: UUID="b16b64a2-2126-4200-a393-566aad7e3b5f" BLOCK_SIZE="4096" TYPE="f2fs"

Efibootmgr / NVRAM 条目:

root@rescue ~ # efibootmgr -v
BootCurrent: 0004
Timeout: 5 seconds
BootOrder: 0011,0111,0004
Boot0004* UEFI: Built-in EFI Shell      VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0011* Gentoo 5.4.97 nvme0n1p1       HD(1,GPT,b47b57a5-a617-491f-9a55-3b918525b571,0x800,0x80000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0111* Gentoo 5.4.97 nvme1n1p1       HD(1,GPT,22ed455d-6d9f-4253-bf72-de535e8a848a,0x800,0x80000)/File(\EFI\BOOT\BOOTX64.EFI)

Fstab 条目:

rescue ~ # cat /etc/fstab
UUID=4349-B2C7                                  /boot                   vfat    noauto,noatime,umask=0077               0 1
UUID=b16b64a2-2126-4200-a393-566aad7e3b5f       /                       f2fs    noatime,acl                             0 0
UUID=a772cb17-0432-4dfd-96d9-0c90d3de1567       none                    swap    sw                                      0 0
temp                                            /tmp                    tmpfs   noatime,nodev,nosuid,rw,size=2G         0 0
temp_portage                                    /var/tmp/portage        tmpfs   noatime,nodev,nosuid,rw,size=10G        0 0

EFI ESP分区树:

rescue ~ # tree /boot/
/boot/
├── config-5.4.97-gentoo
├── efi
│   └── boot
│       └── bootx64.efi
└── kernel-current

内核命令行:

CONFIG_CMDLINE="root=/dev/md2 net.ifnames=0 pcie_aspm.policy=performance"

内核配置: Pastebin 链接到 .config


有没有人有想法,我是否错过了什么或有什么问题?

我现在没有主意了。 :-/

提前致谢!

答案1

看看你的分区图,我相信我看到了这个问题。 EFI分区不应该是/boot分区

# cat /etc/fstab
# comment snip
# <fs>                                         <mountpoint>    <type>  <opts> <dump/pass>
UUID=fe110e32-ac2b-4c2c-9fe2-d7a3d774f4a5       /boot           ext4    noauto 0 2
UUID=BCF2-DB39                                  /boot/efi       vfat    noauto 0 2
UUID=abdd1226-d5d9-4515-bc5e-254e3f30820f       /               ext4    noatime 0 1
UUID=21607857-3746-4e19-aca9-6de321b18849       /home           ext4   noatime  0 1
UUID=a35b9533-9f83-4923-b4e3-a0cbae6c8522       none            swap    sw      0 0
/dev/cdrom                                      /mnt/cdrom      auto    noauto,ro 0 0

以上是我的fstab文件的副本。请注意 EFI 分区的单独条目。该/boot分区应包含内核等:

$ sudo mount /boot
Password:

$ ls /boot
efi  grub  initramfs-5.4.72-gentoo-x86_64.img  lost+found  refind_linux.conf  
System.map-5.4.72-gentoo-x86_64  System.map-5.4.72-gentoo-x86_64.old  vmlinuz- 
5.4.72-gentoo-x86_64  vmlinuz-5.4.72-gentoo-x86_64.old

efi 挂载应包含 EFI 分区中的项目

$ sudo mount /boot/efi
EFI  'System Volume Information'

$ ls /boot/efi/EFI/
debian  gentoo  Microsoft  refind  tools

每个目录都包含安装在我各个硬盘上的每个操作系统的 EFI Stub 加载程序。请注意,rEFInd 希望它们以这种方式命名,以便我在启动时获得适当的操作系统图标。

相关内容