Arch-Linux

如何在自己的 BTRFS 子卷上安裝 GRUB2?

  • March 1, 2020

我創建了一個名為 的子卷grub,將其掛載為/boot/grub,用於grub-mkconfig -o /boot/grub/grub.cfg創建配置文件並使用grub-install --efi-directory=/root/efi --target=x86_64-efi --recheck /dev/nvme0n1. 重新啟動後,它只顯示救援外殼,我必須進入configfile (hd0,gpt3)/grub/grub.cfg才能獲得菜單。我怎樣才能解決這個問題?

fstab:

# /dev/nvme0n1p3 LABEL=ROOT
UUID=3aeda55e-0efa-4917-a78d-f3b8eb6d6113       /               btrfs           rw,relatime,compress=lzo,ssd,space_cache,subvolid=256,subvol=/root,subvol=root  0 0

# /dev/nvme0n1p1 LABEL=UEFISHELL
UUID=3AB2-A318          /root/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 2

# /dev/nvme0n1p3 LABEL=ROOT
UUID=3aeda55e-0efa-4917-a78d-f3b8eb6d6113       /boot/grub      btrfs           rw,relatime,compress=lzo,ssd,space_cache,subvolid=257,subvol=/grub,subvol=grub  0 0

# /dev/nvme0n1p3 LABEL=ROOT
UUID=3aeda55e-0efa-4917-a78d-f3b8eb6d6113       /home           btrfs           rw,relatime,compress=lzo,ssd,space_cache,subvolid=258,subvol=/home,subvol=home  0 0

# /dev/nvme0n1p3 LABEL=ROOT
UUID=3aeda55e-0efa-4917-a78d-f3b8eb6d6113       /root/btrfs     btrfs           rw,relatime,compress=lzo,ssd,space_cache,subvolid=5,subvol=/    0 0

# /dev/nvme0n1p3 LABEL=ROOT
UUID=3aeda55e-0efa-4917-a78d-f3b8eb6d6113       /var/cache/pacman/pkg   btrfs           rw,relatime,compress=lzo,ssd,space_cache,subvolid=259,subvol=/pkg,subvol=pkg    0 0

我通過設置引導目錄來修復它--boot-directory=/boot/

引用自:https://unix.stackexchange.com/questions/566448