同样道理 Windows 的 NTLDR/BOOTMGR 也只是一个多系统引导加载器,除了引导 Windows 启动外也可以引导其它操作系统,但一个特列是 NTLDR/BOOTMGR 与 Windows 是深度绑定的,既不能单独安装,也不能在没有 NTLDR/BOOTMGR 的情况下引导 Windows,其它第三方的引导管理器最后还是要经过 NTLDR/BOOTMGR 才能引导 Windows。
那么我同样的问题是 GRUB2 与 Linux 是深度绑定的吗?在没有 GRUB2 的情况下如何引导 Linux?
之所以有这样的疑问是因为在安装 Linux 的时候假如选择采用 GRUB2 引导,这在 MBR 分区上遇到困难。根据 GRUB2 的官方说明 https://www.gnu.org/software/grub/manua ... stallation,如果要把 GRUB2 安装在 MBR 的 "embedding area" ,该区域至少要有 1M 的空间,如果只有 31K 空间,GRUB2 的小配置文件也可以,但必须满足三个条件:
Historically many tools left only 31 KiB of space. This is not enough to parse reliably difficult structures like Btrfs, ZFS, RAID or LVM, or to use difficult disk access methods like ahci. Hence GRUB will warn if attempted to install into small MBR gap except in a small number of configurations that were grandfathered. The grandfathered config must:
use biosdisk as disk access module for /boot
not use any additional partition maps to access /boot
/boot must be on one of following filesystems: AFFS, AFS, BFS, cpio, newc, odc, ext2/3/4, FAT, exFAT, F2FS, HFS, uncompressed HFS+, ISO9660, JFS, Minix, Minix2, Minix3, NILFS2, NTFS, ReiserFS, ROMFS, SFS, tar, UDF, UFS1, UFS2, XFS
由于我的磁盘事先已经用 SPFDISK 分出了分配给各个操作系统的分区,所以 MBR 的 "embedding area" 只有 31K 的空间,但我又不想更改现有的分区规划,而 BIOS 中磁盘访问是 AHCI 协议的,所以根据上述 GRUB2 的说明,MBR "embedding area" 没有足够的空间容纳此配置下的 GRUB2 core.img 文件。所以在救援模式下用 grub2-install 安装 GRUB2 提示空间不够:
grub2-install: warning: ../grub-core/partmap/msdos.c:401:your core.omg is unusually large. It won't fit in the embedding area.
grub2-install: warning: Embeding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub2-install: error: will not proceed with blocklists.
所以,有个疑问,如何在没有 GRUB2 的情况下引导 Linux ?
或者,按照上述的提示,如何用 blocklists 安装 GRUB2 ?
即按照 GRUB2 的官方说明 https://www.gnu.org/software/grub/manua ... stallation:
or the core image can be installed in a file system and a list of the blocks that make it up can be stored in the first sector of that partition.