Ref:
http://forums.fedoraforum.org/showthread.php?t=281358
http://forums.fedoraforum.org/showthread.php?t=271743
https://fedoraproject.org/wiki/GRUB_2?rd=Grub2
使用 live CD版
1. 起初启动U盘错误,error 15, file not found。以为磁盘分区,则将磁盘类型从 动态改回基本,设置扩展分区(工具参考上篇博客)
(在更改磁盘类型时,最后写入出提示出现错误,Retry无效后忽略,幸好数据没有丢失;
但安装Fedora,最后install bootloader出现问题,手动安装出现LDM dynamic 不知是否与此有关系)
fix mbr : http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html
2. 修复error 15,因为所使用的笔记本启动有两种模式BIOS/EFI(我的本BIOS没有此选项~~);
如果没有禁用UEFI,live CD boot目录下有 boot**.efi文件,则会使用此文件;因此将此文件重命名即可
(另外其它方案,更改grub.conf 等文件,但我尝试并未完全成功)
dmesg | grep EFI
3. 安装一切顺利,直到 install bootloader,提示安装错误,the system may not be loaded
参考chroot部分(https://help.ubuntu.com/community/Grub2/Installing#ChRoot),
注意,我安装过程中没有自己分区,而是使用的 use free space,这样安装程序会自动分区
/dev/sda6 (500M)为 ext2 挂载 /boot,剩余 /dev/sda7 (剩余) 为 lvm 其它分区在此分区内划分
(http://tonychiu.blog.51cto.com/656605/769934)
mount /dev/sda7不可用,要找到对应的分区,使用 mount /dev/vg/lv_root 挂载到根目录,/dev/sda6挂载到 /boot目录
chroot下,grub2-install /dev/sda 出现错误 “This LDM doesn't have an embedding partition. Embedding is not possible. GRUB can only be installed on this setup using blocklists. However, blocklists are unreliable and their use is discouraged. ”
使用 grub2-install --force 解决(https://bbs.archlinux.org/viewtopic.php?id=149772)
LDM = Logical Disk Management, http://en.wikipedia.org/wiki/Logical_Disk_Manager
之后重启Windows7 出错disk read error, 还得按https://bbs.archlinux.org/viewtopic.php?id=149772 -> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1061255
(有三种解决方案)
sudo blkid
我直接修改的 /boot/grub2/grub.cfg
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 908A5B7D8A5B5F32
chainloader +1
}
方法2:使用comments#26,开始没有成功,找到最后一个扇区,没看有没有 privhead 就给删除了~~(还好没出事故),有人说是第6(7)个扇区,查看确实有
sudo dd if=/dev/sda bs=512 count=1 skip=6 of=data.txt
sudo dd if=/dev/zero of=/dev/sda bs=512 seek=6 count=1,执行!解决总是
现在LDM也没有了,是还是MBR已经修复??? ^^ Good Luck
至此,一切完成!也许还有很多潜在问题,Fix MBR。数据无价,下手要谨慎!!!