无法让笔记本电脑加载 grub 双引导 Windows 和 Linux

无法让笔记本电脑加载 grub 双引导 Windows 和 Linux

在我的 Linux 分区旁边安装 Windows 后,我有点迷失了。当我启动计算机时,grub 被加载,我必须手动启动 linux

set root=(x)
linux /boot/xxx root=/dev/yyy
initd /boot/zzz
boot

理论上,我应该能够在启动后运行 update-grub 并且该条目应该添加到 grub 中,对吧?

在实践中,我认为我必须安装启动分区并在那里重新安装 grub,更新它并可能创建一个新的配置(在这里,我真的不知道那是什么..)

所以:

[17:58:52] marius :: DeepThought  ➜  ~ » sudo grub-install --target=x86_64-efi --efi-directory=/mnt/boot --bootloader-id=GRUB 
Installing for x86_64-efi platform.
Installation finished. No error reported.
[17:59:27] marius :: DeepThought  ➜  ~ » sudo update-grub                   1 ↵
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.9
Found initrd image: /boot/initrd.img-6.2.9
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

根据我的理解,应该是这样,但它不起作用。

我还可以这样做:

sudo grub-mkconfig -o /mnt/grub/grub.cfg

,但这没有帮助。

有分区:

[18:05:45] marius :: DeepThought  ➜  ~ » sudo blkid   
/dev/nvme0n1p1: UUID="53FC-45F0" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a2ef2964-433c-4573-bbce-32e00984ef2a"
/dev/nvme0n1p4: BLOCK_SIZE="512" UUID="DA7E06347E0609C9" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="e621fdb2-daf6-4403-9a41-f0a7adf0dd31"
/dev/nvme0n1p2: UUID="92eed5c7-fd3d-4fee-b132-a1130b3fdb5e" UUID_SUB="6ff00ccc-8050-4702-852f-4c2d4e27d390" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="434eb7f2-e323-45b5-869e-5617bb1a4732"
/dev/loop1: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/nvme0n1p3: PARTLABEL="Microsoft reserved partition" PARTUUID="e75df4a9-a8b2-4041-9407-60760afbf089"

欢迎对正在发生的事情提供任何帮助和解释:)

编辑:

明白了,我必须编辑我最初的问题。

这是 fstab 的输出:

[19:31:19] marius :: DeepThought  ➜  ~ » cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# /dev/nvme0n1p2
UUID=92eed5c7-fd3d-4fee-b132-a1130b3fdb5e   /           btrfs       rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/    0 0

# /dev/nvme0n1p1
#UUID=53FC-45F0         /boot/efi   vfat        rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro   0 2


UUID=53FC-45F0  /boot/efi       vfat    defaults      0       1

我自己也惊讶地发现 btrfs 而不是 ext4。不过它在安装 Windows 之前也能正常工作。

相关内容