So I am in a long-winded attempt to set up an ubuntu/windows8 dual boot. After running boot repair, there are 2 ubuntu entries (one is a recovery), 4 windows recovery entries, and a regular windows entry. the latter gives my an unknown command: drivemap, error: invalid EFI filepath Browsing multiple other forums has led me to add

menuentry "Windows 8" {
insmod part_gpt
insmod chain
set root='(hd1,gpt4)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi

to my /etc/grub.d/40_custom in order to add a working entry. The new entry gives me an invalid filesystem error. The windows partition I'm looking for is either sdb5 or sdb9 (one is windows 8, the other is ubuntu) I'm not sure which. Any sugestions to fix either entry? I got this computer last week and I've been trying to get a dual boot running since then. I can Access both windows 8 and ubuntu by switching the boot priority in my bios settings, but I'd like to access them through GRUB.


The blkid output you posted in pastebin indicates that /dev/sdb9 was intended to be the Ubuntu partition, since it's formatted to ext4. /dev/sdb5 has the label "Windows8_os" suggesting that this is the Windows 8 partition (its large size and position after an MS Reserved Partition indicates this is true as well).

If this is indeed the case, then it appears that your custom grub entry is using the wrong number for the partition pointer gpt4 in the line set root='(hd1,gpt4)'.

GRUB2 hard drive numbering starts with 0, so the first hard drive on your computer would be hd0, the second hd1, and so forth.

However, GRUB2 partition numbers begin with 1, indicating that your chosen partition gpt4 is the 4th partition on sdb, not the 5th.

Try changing the line to set root='(hd1,gpt5)', so that GRUB attempts to load the 5th partition rather than the 4th. It may be giving you an 'invalid filesystem' error because your current grub.cfg points to the MS Reserved Partition instead of the actual Windows 8 partition.

| improve this answer | |
  • Oh, ok, I thought that the partition labeling started with 0 as well. My bad. I changed the label and ran update-grub. However, now I get a file not found error. I did run [boot-repair](paste.ubuntu.com/6998079) again but this time I checked "restore EFI backups" I'm not sure if that would have an effect on this particular issue. – Alex McNurlin Feb 26 '14 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.