我刚刚在磁盘的第一个分区上安装了Windows 11,分区如下:
# fdisk /dev/sdb -l
Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1967ba67
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 273092607 273090560 130.2G 7 HPFS/NTFS/exFAT
/dev/sdb2 273092608 274454527 1361920 665M 27 Hidden NTFS WinRE
/dev/sdb3 274456576 276553727 2097152 1G 82 Linux swap / Solaris
/dev/sdb4 276553728 976772477 700218750 333.9G 83 Linux如您所见,Ubuntu18.04安装在/dev/sdb3和/dev/sdb4上。
安装了Windows 10,而不是Windows11.
问题是Windows11的安装破坏了安装在磁盘/dev/sdb上的D4,现在我想重新安装它。我试过这样做:
# sudo grub-install --recheck --no-floppy --root-directory=/ /dev/sdb但是它给出了这样的错误:
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.我认为这是一个bug,因为它检测到一个EFI分区,这是不存在的。磁盘已经用MBR格式化,它是DOS风格的,我已经使用RUFUS使用MBR方法安装了Windows 11。甚至/dev/sda也不是EFI风格:
# fdisk /dev/sda -l
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD4
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa6e39599
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 976767672 976765625 465.8G 83 Linux重新安装grub2的正确过程是什么?
发布于 2021-06-22 14:41:44
我在“尝试”模式下使用了ubuntu 21.04,并安装了启动修复。我选择在/dev/sdb上重新安装grub2,它正确地执行了所有必要的步骤。重新启动后,我能够启动/dev/sdb4 4上安装的ubuntu18.04
发布于 2022-06-21 20:53:05
使用--target=i 386-pc标志。
来源:https://wiki.archlinux.org/title/GRUB#Master_开机_记录_(MBR)_特定的_使用说明
https://askubuntu.com/questions/1347055
复制相似问题