今天,在笔记本上装了Centos7,装完后引导发现原来的windows没有出现在系统菜单里面。
在网上简单看了下,找到一种很简单的方法,可以解决这个问题。
在 /etc/grub.d/40_custom 文件的最后面添加如下内容即可:
menuentry "Windows XP" {
set root='(hd0,1)'
chainloader +1
}
这样,我的源文件就变成这样了:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows XP" {
set root='(hd0,1)'
chainloader +1
}
估计有很多人也都遇到过类似的问题,希望有帮助。
而且以此类推,可以引导其它现成的分区。