您的位置:首页 > 运维架构 > Linux

解决Linux安装过程中不能安装Grub的问题

2016-01-12 00:00 525 查看
摘要: 我在虚拟机中安装Arch的时候,就卡在了安装Grub这一步,下面是问题及解决方案。

在grub-install的时候,具体问题如下:

sh-4.3# grub-install /dev/sdb
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: error: embedding is not possible, but this is required for cross-disk install.



有一个不是办法的办法,就是不用Grub呗,可以使用syslinux,不过我不想用。具体方法在这里:

https://wiki.archlinux.org/index.php/Syslinux#Automatic_Install

解决Grub的方法:

就是在分区前面加上一个2MB大小的分区,设定它的标志为“bios_grub”。

如果你是Arch,那么可以在安装过程中下载:

sh4.3# pacman -S parted

好像还有一个软件要安装,具体没有注意,系统会有提示的,我一会再看看是什么,补充上来。

然后执行:

parted /dev/sdb set 1 bios_grub on


这里的“1”就是那个2MB大小的分区

具体执行过程如下:

sh-4.3# parted /dev/sdb set 1 bios_grub on
Information: You may need to update /etc/fstab.

sh-4.3# parted /dev/sdb print
Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
1      17.4kB  3049kB  3032kB  ext4               bios_grub



sh-4.3# grub-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.


这样就可以正常安装Grub了。

希望你喜欢!



参考链接:


https://blog.hostonnet.com/grub-install-warning-this-gpt-partition-label-contains-no-bios-boot-partition-embedding-wont-be-possible
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  arch grub grub-install