So I FINALLY got grub2 to recognize my Windows 8 install through reading various sources. I had to create a ‘30_windows’ custom grub config because even after installing grub2 & os-prober packages patched with updated proper UEFI support I still couldn’t get grub2 to recognize my Windows 8 install. I couldn’t get far enough with grub2-efi (failed on locating modules). Windows 8 is installed on a separate 3 TB HDD on my desktop PC with a UEFI & Legacy (BIOS) motherboard. (UEFI & Legacy BIOS is enabled for boot devices in the BIOS). The only problem (I think), is that in the ‘30_windows’ config file I set it to the wrong hd and/or partition before generating the grub config file with ‘grub2-mkconfig -o /boot/grub2/grub.cfg’ . When tyring to boot the Windows 8 entry in grub2 it says ‘error: no such partition’. Can someone please help me determine what the proper config should be for my Windows 8 grub entry so I can boot to it without having to tweak my BIOS/UEFI settings every time I want to boot to Windows?
Here is my info:
fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000837c8
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 1953523711 976760832 f W95 Ext'd (LBA)
/dev/sdb5 4096 321535 158720 83 Linux
/dev/sdb6 323584 4530175 2103296 82 Linux swap / Solaris
/dev/sdb7 4532224 88422399 41945088 83 Linux
/dev/sdb8 88424448 1953503231 932539392 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 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 identifier: 0x4bafcb6a
Device Boot Start End Blocks Id System
/dev/sdc1 2048 4294969342 2147483647+ 83 Linux
/dev/sdc4 1 1 0+ ee GPT
Partition table entries are not in disk order
Note: sector size is 4096 (not 512)
GNU Parted 2.4
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 316MB 315MB ntfs Basic data partition hidden, diag
2 316MB 419MB 104MB fat32 EFI system partition boot
3 419MB 554MB 134MB Microsoft reserved partition msftres
4 554MB 3001GB 3000GB ntfs Basic data partition
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
}
if x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod btrfs
set root='hd1,msdos7'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos7 --hint-efi=hd1,msdos7 --hint-baremetal=ahci1,msdos7 --hint='hd1,msdos7' 71242393-d510-4a6c-b749-018bd581ccf5
else
search --no-floppy --fs-uuid --set=root 71242393-d510-4a6c-b749-018bd581ccf5
fi
font="/usr/share/grub2/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5' 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
else
search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
fi
insmod gfxmenu
loadfont ($root)/grub2/themes/openSUSE/ascii.pf2
loadfont ($root)/grub2/themes/openSUSE/DejaVuSans10.pf2
loadfont ($root)/grub2/themes/openSUSE/DejaVuSans12.pf2
loadfont ($root)/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
insmod png
set theme=($root)/grub2/themes/openSUSE/theme.txt
export theme
if x${boot_once} = xtrue ]; then
set timeout=0
elif sleep --interruptible 0 ; then
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE 12.2' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-71242393-d510-4a6c-b749-018bd581ccf5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5' 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
else
search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
fi
echo 'Loading Linux 3.7.2-1-desktop ...'
linux /vmlinuz-3.7.2-1-desktop root=UUID=71242393-d510-4a6c-b749-018bd581ccf5 video=1920x1080 splash=0 splash=silent showopts
echo 'Loading initial ramdisk ...'
initrd /initrd-3.7.2-1-desktop
}
submenu 'Advanced options for openSUSE 12.2' $menuentry_id_option 'gnulinux-advanced-71242393-d510-4a6c-b749-018bd581ccf5' {
menuentry 'openSUSE 12.2, with Linux 3.7.2-1-desktop' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2-1-desktop-advanced-71242393-d510-4a6c-b749-018bd581ccf5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5' 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
else
search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
fi
echo 'Loading Linux 3.7.2-1-desktop ...'
linux /vmlinuz-3.7.2-1-desktop root=UUID=71242393-d510-4a6c-b749-018bd581ccf5 video=1920x1080 splash=0 splash=silent showopts
echo 'Loading initial ramdisk ...'
initrd /initrd-3.7.2-1-desktop
}
menuentry 'openSUSE 12.2, with Linux 3.7.2-1-desktop (recovery mode)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2-1-desktop-recovery-71242393-d510-4a6c-b749-018bd581ccf5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd1,msdos5' 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
else
search --no-floppy --fs-uuid --set=root 1ca76a6f-ea35-405b-a93c-a7c7f657d7d9
fi
echo 'Loading Linux 3.7.2-1-desktop ...'
linux /vmlinuz-3.7.2-1-desktop root=UUID=71242393-d510-4a6c-b749-018bd581ccf5 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
echo 'Loading initial ramdisk ...'
initrd /initrd-3.7.2-1-desktop
}
}
### 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 ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_windows ###
menuentry "Windows 8" {
insmod part_gpt
insmod chain
set root='(hd0,gpt2)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_windows ###
### 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 ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif -z "${config_directory}" -a -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 ###