早就听说先装windows,然后在再装fedora会比较好,如果反着来的话,就会悲剧,因为windows系统比较霸道,会覆盖grub2的引导。昨天一试,果然悲剧了,现象就是:开机左上角光标闪烁,没有出现网上说的左上角出现:grub rescue
不想重装,重新配置很麻烦,功夫不负有心人,一个下午的时间终于弄好了。记录一下,万一还有下次呢?
当然身为菜鸟,我肯定不会解决这个问题,我抄来的:原贴地址:http://www.cnblogs.com/sztsian/p/3487891.html
我修复的方法如下:
1、用装载fedora livecd 系统的U盘 进入fedora系统
2、打开终端输入:sudo fdisk -l
[iansiu@iansiu-fedora ~]$ sudo fdisk -l
[sudo] password for iansiu:
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 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: dos
Disk identifier: 0xf0b1ebb0
Device Boot Start End Blocks Id System
/dev/sda1 * 125 104872319 52436097+ 7 HPFS/NTFS/exFAT
/dev/sda2 104872320 1250263727 572695704 f W95 Ext'd (LBA)
/dev/sda5 104872383 209744639 52436128+ 7 HPFS/NTFS/exFAT
/dev/sda6 419473278 629201789 104864256 7 HPFS/NTFS/exFAT
/dev/sda7 629201853 838930364 104864256 7 HPFS/NTFS/exFAT
/dev/sda8 838930428 1048658939 104864256 7 HPFS/NTFS/exFAT
/dev/sda9 1048659003 1250258624 100799811 7 HPFS/NTFS/exFAT
/dev/sda10 209747968 210796543 524288 83 Linux
/dev/sda11 210798592 419457023 104329216 8e Linux LVM
Partition table entries are not in disk order.
Disk /dev/mapper/fedora-swap: 3.9 GiB, 4194304000 bytes, 8192000 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
Disk /dev/mapper/fedora-root: 37 GiB, 39728447488 bytes, 77594624 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
Disk /dev/mapper/fedora-home: 58.6 GiB, 62901977088 bytes, 122855424 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
Disk /dev/sdb: 29.5 GiB, 31694782464 bytes, 61903872 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: dos
Disk identifier: 0x55245524
3、这里我的 /boot在 /dev/sda10,然后挂载该分区 ,终端里输入:mount /dev/sda10 /mnt,完成后可以查看目录中的结构,终端里输入:ls /mnt
看见grub2说明没有问题,然后在终端里输入:sudo grub2-install --boot-directory=/mnt /dev/sda ,注意命令之间的空格,否则会出错。命令没有提示错误的话,拔掉U盘,就可以直接启动了。进入windows系统的话会出现错误,但是按回车可以进入系统,出现这种情况,进入fedora系统,打开终端输入:su grub2-mkconfig -o /boot/grub2/grub.cfg,然后没有问题啦。
一个自己不能解决的问题,如果找对资料,真的很简单,几分钟就解决了,如果没有找对资料,那么就很悲剧啦,网上那么多文章统统不管用,这个竟然就解决了,感谢原作者。