Ask Your Question

grub2 windows entry throws "Invalid Signature"

asked 2015-06-05 07:56:41 -0500

redthree gravatar image

Hi guys, i've search a lot for an answer without success. My problem is this:

I have windows 8.1 installed, it came with the notebook. I wanted to install Fedora 21, so I made some space (100GB) for it. Then went to the BIOS and turn off Secure boot, also turn on an option for legacy roms, I kept UEFI on. I did this because my usb with Fedora couldn't boot otherwise, that's why I enabled the option for legacy roms. After that I installed Fedora without any troubles, I selected the automatic partitioning.

When I reboot after the install, I noticed that windows wasn't on grub2 options. After login in into Fedora, I added the entry for windows on 40_custom like this:

menuentry 'Microsoft Windows 8.1' {
set root='hd0,gpt1'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi

This is my fdisk -l

Device          Start        End    Sectors   Size Type
/dev/sda1        2048    1026047    1024000   500M EFI System
/dev/sda2     1026048    1107967      81920    40M unknown
/dev/sda3     1107968    1370111     262144   128M Microsoft reserved
/dev/sda4     1370112    2906111    1536000   750M Windows recovery environment
/dev/sda5     2906112 1733185535 1730279424 825.1G Microsoft basic data
/dev/sda6  1937985536 1953523119   15537584   7.4G Windows recovery environment
/dev/sda7  1733185536 1733187583       2048     1M BIOS boot
/dev/sda8  1733187584 1734211583    1024000   500M Linux filesystem
/dev/sda9  1734211584 1937985535  203773952  97.2G Linux LVM

I also run this command:

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Windows does appear on grub2 now, but when I select it, throws this error: Invalid Signature You have to load the kernel first

Don't know what the problem is. Can you help me?

Thank you!

edit retag flag offensive close merge delete


You sure you didn't run grub2-mkconfig -o /boot/grub2/grub.cfg? This is the correct location for the GRUB2 configuration file in a BIOS installation, which is your case.

If you did run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg, then it would create the file but it would not affect the actual boot menu since the MBR points to /boot/grub2/grub.cfg.

cgonz31 gravatar imagecgonz31 ( 2015-06-05 09:47:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-05 09:41:54 -0500

cgonz31 gravatar image

updated 2015-06-05 13:22:24 -0500

You installed Fedora in BIOS/CSM/Legacy mode while W8.1 was already installed in UEFI mode. You CANNOT boot two operating systems (OSs) from the same storage device with two different boot firmwares (UEFI and BIOS/CSM/Legacy).

Your first partition in the disk is an EFI System Partition (ESP). This mean W8.1 is installed in UEFI mode. The BIOS boot partition (/dev/sda7) means you installed Fedora in BIOS/Legacy/CSM mode.

You MUST install F21 in UEFI mode for the dual-booting to work.

1) Erase the F21 partitions in the disk. In your case /dev/sda7,/dev/sda8, and /dev/sda9.

2) Install F21 in UEFI mode.

NOTE: 32-bit UEFI booting is not supported by F21. You will have to use a 64-bit image. If your PC is not 64-bit capable, you CANNOT install F21 in UEFI mode. Then you would be stuck with your current setup or you could reinstall W8.1 in Legacy mode, and add W8.1 to the GRUB2 menu.

a) To install in UEFI mode, set the BIOS/CSM/Legacy OS support as second priority, and if possible, even disable it. Then create a UEFI-bootable F21 Live USB using the direct write methods specified in the link below. Your USB was probably not UEFI-bootable and that's why you couldn't boot it in UEFI mode but it worked fine in BIOS/Legacy/CSM mode.

b) Assuming you have a 64-bit PC, after the UEFI F21 installation you have to add W8.1 to the GRUB2 menu. Usually, GRUB2 will recognize Windows and add an automatic entry. If it works, problem solved. If the automatic entry does not work, you have to add a custom entry to GRUB2 (like you did in the 40_custom file) to point to the W8.1 bootloader. This link below has all the details:

This link is for installing Fedora and erasing Windows. Skip the instructions to erase Windows. All the other instructions will work to setup a UEFI dual-booting system with Windows and Fedora.

Bit of Advice:

Back up your data before working with partitions and OS installations. You are literally a few clicks away from wiping all your data if you make a mistake.

EDIT: Post-Installation

UEFI booting is a bit different than BIOS/Legacy/CSM booting. Every OS can install its boot loader to the ESP. The motherboard firmware then chooses which one to boot by default. The problem is that the motherboard firmware is defaulting to the Windows Boot Manager. What you want to do is to set the F21 GRUB2 as the default boot loader which is also able to "chain-load" Windows. To do this, do the following:

1) When the PC is first booted up you see the firmware screen with messages (the POST screen). There has to be a key to bring up the UEFI boot menu (usually one of the F1-F12 keys ... (more)

edit flag offensive delete link more


Ok, i'll try this, thank you.

redthree gravatar imageredthree ( 2015-06-05 11:14:28 -0500 )edit

Hey @cgonz31 it worked!! thanks. But know it goes through to windows :(

redthree gravatar imageredthree ( 2015-06-05 12:30:51 -0500 )edit

I updated the answer to address the issue.

cgonz31 gravatar imagecgonz31 ( 2015-06-05 13:26:31 -0500 )edit

Question Tools



Asked: 2015-06-05 07:56:41 -0500

Seen: 5,565 times

Last updated: Jun 05 '15