安装centos7后win7无法进入问题

问题描述

联想笔记本,UEFI主板,但支持UEFI和Legacy(BIOS)两种引导方式。

买来后预装了Win7系统,硬盘是MBR分区格式。

直接使用U盘安装Centos7,安装完毕重起后,grub引导界面没有win7选项,只有centos7。

另外,这个grub界面是黑白字符屏,不是图形界面,感觉也有问题,但这个问题暂忽略。


解决办法:

1)一开始以为是UEFI导致的无法引导,UEFI和MBR配合的问题,上网google了一堆。

2)进bios界面,把boot选项从Both改为legacy(原来是Both,即同时支持uefi和legacy),重起还是只有centos7

3)boot选项从legacy改为UEFI,无法启动了,连centos都看不到。果然,uefi只能配合GPT分区引导,而我的盘是MBR。

4)boot选项改回both,再进入centos内去google....

5)猜测是grub写了MBR扇区后,没有找到windows的引导扇区,所以grub.conf中就没有win7的启动选项

6)执行os-prober,什么都没扫到

7)再google "os prober cant find windows",有人说是ntfs分区没有认出来导致的,看一下果然windows分区都没有mount

8)centos支持ntfs需要一个叫ntfs-g3的软件包,yum安装找不到源,只能下载源码安装然后手工mount 2个ntfs分区(这两个分区高不懂什么区别)

[root@192 mnt]# mount -t ntfs-3g /dev/sda1 C

[root@192 mnt]# mount -t ntfs-3g /dev/sda2 D


9)重新执行os-prober

[root@192 D]# os-prober
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sda2:Windows 7 (loader):Windows1:chain

10)修改grub.conf

[root@192 D]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-123.4.4.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.4.4.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-fe5203ca85db4f14b89ec7bb40e5f33e
Found initrd image: /boot/initramfs-0-rescue-fe5203ca85db4f14b89ec7bb40e5f33e.img
Found Windows 7 (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
done

11)重起。


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值