对此似乎有很多讨论,但我找不到简单的答案。
当我尝试安装grub2时,出现此错误:
# grub2-install /dev/sda
Installing for i386-pc platform.
grub2-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub2-install: warning: Embedding 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.
这是/ dev / sda的布局:
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
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: gpt
Disk identifier: 7ECE06D0-9F0C-44FF-BCFB-142283172CCA
Device Start End Sectors Size Type
/dev/sda1 2048 411647 409600 200M Linux filesystem (/boot)
/dev/sda2 411648 4605951 4194304 2G Linux swap
/dev/sda3 4605952 46548991 41943040 20G Linux filesystem (/)
/dev/sda4 46548992 234441614 187892623 89.6G Linux LVM (/var)
有没有简单的方法可以解决这个问题?我知道我需要在磁盘的开头创建一个小分区作为“ BIOS引导分区”。我想一个选择是将交换作为逻辑卷移至/ dev / sda4,并使用/ dev / sda2作为/ boot。
或者,我可以回到grub-legacy,而不用担心(如果升级到grub2会带来很多麻烦,这真的有好处吗?)。
有什么想法吗?
grub2-install grub-setup=/bin/true /dev/sda
给grub2-install: error: More than one install device?.
。在我正在运行的VM上,起始扇区标记为32,但在生产计算机上,起始扇区标记为2048。不知道这是否相关。