日期:2014-05-17  浏览次数:20940 次

fedora 16安装后无法引导windows7,急待解决!
fedora 16没有grub.这个文件,只有grub.cfg这个文件,我的grub.cfg文件的内容如下:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
  saved_entry="${chosen}"
  save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

set timeout=20
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.0.0-1.fc16.i686.PAE' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(hd2,msdos8)'
search --no-floppy --fs-uuid --set=root 9b56540b-ccbe-455f-9e6c-703ff19f2cb7
echo 'Loading Linux 3.0.0-1.fc16.i686.PAE ...'
linux /vmlinuz-3.0.0-1.fc16.i686.PAE root=/dev/mapper/vg_mydreamlife-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=us quiet rhgb LANG=zh_CN.UTF-8 rd.luks=0 rd.lvm.lv=vg_mydreamlife/lv_root rd.lvm.lv=vg_mydreamlife/lv_swap 
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.0.0-1.fc16.i686.PAE.img
}
menuentry 'Fedora Linux, with Linux 3.0.0-1.fc16.i686.PAE (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(hd2,msdos8)'
search --no-floppy --fs-uuid --set=root 9b56540b-ccbe-455f-9e6c-703ff19f2cb7
echo 'Loading Linux 3.0.0-1.fc16.i686.PAE ...'
linux /vmlinuz-3.0.0-1.fc16.i686.PAE root=/dev/mapper/vg_mydreamlife-lv_root ro single rd.md=0 rd.dm=0 KEYTABLE=us quiet rhgb LANG=zh_CN.UTF-8 rd.luks=0 rd.lvm.lv=vg_mydreamlife/lv_root rd.lvm.lv=vg_mydreamlife/lv_swap
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.0.0-1.fc16.i686.PAE.img
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
开始用sudo update-grub结果显示无法找到,看了其他帖子说需要安装grub-pc(这个怎么安装,命令是什么),看了好多帖子也没解决问题,能不能手动修改grub.cfg来引导windows7.那位高手帮一下忙啊,我是U盘装的,没有光盘,步骤说的详细些,太感谢了!

------解决方案--------------------
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root A270ABE870ABC201
chainloader +1
}
### END /etc/grub.d/30_os-prober ###