Problem Configuring Grub For A Dual-boot

Home » CentOS » Problem Configuring Grub For A Dual-boot
CentOS 3 Comments

I have Windows 7 on /dev/sda and CentOS 6.4 on /dev/sdb. Here are the layouts:

(parted) select /dev/sda Using /dev/sda (parted) print

Model: ATA WDC WD10EZEX-00Z (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 374MB 373MB primary ntfs boot
2 374MB 1000GB 1000GB primary ntfs

(parted) select /dev/sdb Using /dev/sdb
(parted) print
Model: ATA ST500DM002-1BD14 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 boot
2 211MB 735MB 524MB ext4
3 735MB 500GB 499GB lvm

/boot/efi/EFI/redhat/grub.conf looks like this:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_amrl01-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sdb1
device (hd0) HD(1,800,64000,9b55c4a9-fdbe-4fcd-857b-8e7e129e29f9)
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz hiddenmenu title CentOS 6 (2.6.32-358.14.1.el6.x86_64)
root (hd0,1)
kernel /vmlinuz-2.6.32-358.14.1.el6.x86_64 ro root=/dev/mapper/vg_amrl01-lv_root rd_NO_LUKS LANG=en_US.UTF-8
rd_LVM_LV=vg_amrl01/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16
crashkernel8M KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_amrl01/lv_root rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-358.14.1.el6.x86_64.img title Windows 7
rootnoverify (hd1,0)
chainloader +1

The system boots into CentOS just fine, but selecting the “Windows 7”
entry results in

invalid EFI file path Error 1: Filename must be either an absolute pathname or blocklist

Press any key to continue…

By my understanding, since grub is installed on sdb, then sdb becomes hd0
and thus sda would become hd1, and so telling it to boot Windows from hd1,0 makes sense. Also, since anaconda created the Windows entry during the CentOS install, I would have expected this to work. However, as it doesn’t work, I’m clearly missing something. Can someome please point me in the right direction as to why this isn’t working?

Thanks!

3 thoughts on - Problem Configuring Grub For A Dual-boot

  • I tried the suggestion of swapping the disks assignments:

    But that still just gets me

    invalid EFI file path Error 1: Filename must be either an absolute pathname or blocklist

    I think that my failing is something to do with grub and EFI. In the anaconda-generated grub.conf file, there is a line that reads

    device (hd0) HD(1,800,64000,9b55c4a9-fdbe-4fcd-857b-8e7e129e29f9)

    I have no idea where that UUID came from, as both blkid and ls -l
    /dev/disk/by-uuid do not have entries for the disks themselves, just for the partitions. Maybe that isn’t even a UUID. At any rate, I’m wondering if there should be a similar entry for the other disk in the system.

LEAVE A COMMENT