How to add fedora to grub2 menu.
Situation: I've installed fedora 17 to my PC and then I installed Windows 7 so it didn't boot to Fedora. Today, I've finally managed how to install and configurate grub2. If you want to know how: First, I booted up fedora live cd, then I mount /dev/sda4 as /boot then I run: grub2-install /dev/sda then grub2-mkconfig -o /boot/grub2/grub.cfg and finally I rebooted. And it was big surprise when I saw windows 7 only. So my question is: how can I add fedora to my grub menu?
my terminal outputs:
grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
/usr/share/grub/grub-mkconfig_lib: line 53: 3577 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
/usr/share/grub/grub-mkconfig_lib: line 53: 3579 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
/usr/share/grub/grub-mkconfig_lib: line 53: 3581 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
/usr/share/grub/grub-mkconfig_lib: line 53: 3583 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
Found Windows 7 (loader) on /dev/sda2
Found Fedora release 17 (Beefy Miracle) on /dev/mapper/vg_skore13--fed17-lv_root
done
grub2-mkconfig
Generating 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="${saved_entry}"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
/usr/share/grub/grub-mkconfig_lib: line 53: 4246 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
/usr/share/grub/grub-mkconfig_lib: line 53: 4248 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
/usr/share/grub/grub-mkconfig_lib: line 53: 4250 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
/usr/share/grub/grub-mkconfig_lib: line 53: 4252 Segmentation fault (core dumped) "${grub_probe}" -t fs "$path" > /dev/null 2>&1
if loadfont unicode ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###
### BEGIN /etc/grub.d/30_os-prober ###
Found Windows 7 (loader) on /dev/sda2
menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-243E1A133E19DE9C' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 243E1A133E19DE9C
else
search --no-floppy --fs-uuid --set ...