[root@study ~]#
grub2
-
install
--
skip
-
fs
-
probe /dev/vda4
Installing for
i386
-
pc platform.
grub2
-
install: warning: File system
'
xfs
'
doesn't support embedding.
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.
#
还
是失
败
!因
为还
是
担
心
xfs
被搞死~好!
没问题
!加
个
--
force
与
--
recheck
重新
处
理一遍!
[root@study ~]#
grub2
-
install
--
force
--
recheck
--
skip
-
fs
-
probe /dev/vda4
Installing for i386
-
pc platform.
grub2
-
install: warning: File system
'
xfs
'
doesn't support embedding.
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..
Installation finished. No error reported.
#
注意看!原本是
无
法安
装
的
错误
,
现
在
½
有
warning
警告
讯
息,所以
这样
就安
装
到
partition
上了!
上面这样就½
grub2
的主程序安装到
/dev/vda4
以及重新安装到
MBR
里面去了。现在来思考一下,
我们知道
grub2
主程序会去找
grub.cfg
这个文件,大多是在
/boot/grub2/grub.cfg
里面,那有趣了,
我们的
MBR
与
/dev/vda4
都是到
/boot/grub2/grub.cfg
去抓设定吗?
如果是多重操作系统那怎办?
呵呵!这就需要重新½入新系统才能够安装啦!举个例子来说啰:
问:
假设你的测试系统上面使用
MBR
分区
槽,并且出现如下的数据:
[root@study ~]#
fdisk
-
l /dev/vda
Device Boot Start End Blocks Id System
/dev/vda1 2048 10487807 5242880
83 Linux
/dev/vda2 * 10487808 178259967 83886080 7 HPFS/NTFS/exFAT
/dev/vda3 178259968 241174527 31457280 83 Linux
其中
/dev/vda1, /dev/vda3
是两个
CentOS 7
系统,而
/dev/vda2
则是
windows 7
系统。安装的流程是依序
/dev/vda1
--
> /dev/vda2
--
>
/dev/vda3
。因此,安装好而且重新启动后,系统其实是默认½入
/dev/vda3
这个
CentOS
7
的系统的。
此时
MBR
会去读取的配置文件在
(/dev/vda3)/boot/grub2/grub.cfg
才对。
因为
/dev/vda1
应该是用来管理开机选单的,而
/dev/vda2
及
/dev/vda3
在规划中就是用来让学生操作的,因此
预设情况下,
/dev/vda1
内的
CentOS
系统应该只会在开机的时候用到而已,或者是出问题时会找他来使用。至
于
/dev/vda3
及
/dev/vda2
则可能因为学生的误用,
因此未来可能会升级或删除或重灌等。那妳如何让系统永远
都是使用
/dev/vda1
开机呢?
答:
因为
MBR
的
boot loader
应该要去
(/dev/vda1)/boot/grub2/grub.cfg
读取相关设定才是正常的!所以,你可以使
用几种基本的方式来处理:
.
因为
CentOS 7
会主动找到其他操作系统,因此你可以在
/dev/vda3
的开机选单中找到
/dev/vda1
的开机