centos7 grub2 引导win7
2014-12-14 17:34
204 查看
win7 压缩卷,腾出部分空间安装centos7.安装后发现win7无法引导了。
#fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/sda2 1276 9383 65127479 f W95 Ext'd (LBA)
/dev/sda5 1276 3267 16000708+ 7 HPFS/NTFS
/dev/sda6 3268 8367 40965718+ 7 HPFS/NTFS
/dev/sda7 8368 9259 7164958+ 83 Linux
/dev/sda8 9260 9383 995998+ 82 Linux swap / Solaris
# mv /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bak
#vi /boot/grub2/grub.cfg
#添加如下到/boot/grub2/grub.cfg 。
#添加在这个下边就可以,也就是最开始
### BEGIN /etc/grub.d/00_header ###
#try to add win7 to grub2
menuentry "Microsoft Windows 7l" {
set root=(hd0,1)
search --no-floppy --fs-uuid --set 76e49102e490c631
drivemap -s (hd0) $root
chainloader +1
}
后续:几天后win7被系统安排到后边去了,centos7在最上边了。
set default="${saved_entry}"
menuentry 'CentOS Linux (3.10.0-123.13.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-faa1e53d-0532-4d2a-8047-c5858e6cd9a0' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 --hint='hd0,msdos8' a16c3019-7668-4285-83ba-3de17032e10e
else
search --no-floppy --fs-uuid --set=root a16c3019-7668-4285-83ba-3de17032e10e
fi
linux16 /vmlinuz-3.10.0-123.13.1.el7.x86_64 root=/dev/mapper/cl-root ro rd.lvm.lv=cl/root vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rd.lvm.lv=cl/swap rhgb quiet LANG=en_US.UTF-8
initrd16 /initramfs-3.10.0-123.13.1.el7.x86_64.img
}
menuentry 'Windows 7 (loader) (on /dev/sda2)' {
insmod ntfs
set root=(hd0,1)
#search -no-floppy -fs-uuid -set fe24211f2420dc81
chainloader +1
}
#fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/sda2 1276 9383 65127479 f W95 Ext'd (LBA)
/dev/sda5 1276 3267 16000708+ 7 HPFS/NTFS
/dev/sda6 3268 8367 40965718+ 7 HPFS/NTFS
/dev/sda7 8368 9259 7164958+ 83 Linux
/dev/sda8 9260 9383 995998+ 82 Linux swap / Solaris
# mv /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bak
#vi /boot/grub2/grub.cfg
#添加如下到/boot/grub2/grub.cfg 。
#添加在这个下边就可以,也就是最开始
### BEGIN /etc/grub.d/00_header ###
#try to add win7 to grub2
menuentry "Microsoft Windows 7l" {
set root=(hd0,1)
search --no-floppy --fs-uuid --set 76e49102e490c631
drivemap -s (hd0) $root
chainloader +1
}
后续:几天后win7被系统安排到后边去了,centos7在最上边了。
set default="${saved_entry}"
menuentry 'CentOS Linux (3.10.0-123.13.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-faa1e53d-0532-4d2a-8047-c5858e6cd9a0' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 --hint='hd0,msdos8' a16c3019-7668-4285-83ba-3de17032e10e
else
search --no-floppy --fs-uuid --set=root a16c3019-7668-4285-83ba-3de17032e10e
fi
linux16 /vmlinuz-3.10.0-123.13.1.el7.x86_64 root=/dev/mapper/cl-root ro rd.lvm.lv=cl/root vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rd.lvm.lv=cl/swap rhgb quiet LANG=en_US.UTF-8
initrd16 /initramfs-3.10.0-123.13.1.el7.x86_64.img
}
menuentry 'Windows 7 (loader) (on /dev/sda2)' {
insmod ntfs
set root=(hd0,1)
#search -no-floppy -fs-uuid -set fe24211f2420dc81
chainloader +1
}
相关文章推荐
- CentOS7下的grub2添加win7引导
- ubutnu和win7双系统重装win7之后恢复GRUB2引导
- CentOS7下引导Win7修改Win7为默认引导方法
- win7 安装centos 7 找不到centos 7 引导的解决方法
- win7 centos7 双系统启动 引导
- Win7下重新引导CentOS5.5
- win7和Centos双系统,在重装win7后重新引导Centos
- 安装CentOS后添加Windows引导项到grub2
- CentOS7与win7的双系统安装-并引导
- centos7 把/boot 分区从xfs格式转换为ext3格式以及grub2引导pbr
- Win7环境下安装Linux双系统 CentOS7 后恢复windows系统引导(亲测可用)
- CentOS6.5如何引导WIN7(硬盘分区编号查看)
- [FW]修复ubutnu12.04+win7的grub2引导
- #问题解决#安装centos7 后 win7引导项不见
- Win7和CentOS7双系统修复引导
- 装centos7后win7引导不见了 centos7下引导win7
- Win7下安装双系统Centos,并修复Centos引导加载程序安装在U盘上的问题
- 安装win7和centos6.7双系统 引导加载安装位置问题
- 装centos7后win7引导不见了 centos7下引导win7
- 在win7下装centos7双系统,恢复双方引导的艰难历程,希望给和我遇到同样困难的人一些帮助