I’m having trouble with GRUB (again). I have Windows 7 installed on /dev/sda which is a GPT disk. It was installed in EFI mode.
I also have openSUSE installed on /dev/sdc which is also GPT and installed in EFI mode.
Problem: GRUB isn’t finding Windows. It’s weird because the other day it was working but I had to reinstall SUSE and now it’s not seeing Windows.
os-prober:
No volume groups found
gdisk
/dev/sda
p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 13050607-F5DE-4E7D-802B-7A16466E3157
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 976773119 465.8 GiB 0700 Basic data partition
I tried to add a GRUB entry manually to /boot/grub2-efi/grub.cfg
Here’s what it looks like:
### 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.
menuentry "Windows 7" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 60A4569EA456768E
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/40_custom ###
I got the UUID with
/usr/sbin/grub2-probe -t fs_uuid -d /dev/sda1
First: step away from the idea that a reinstall is fixing things. The incredible stability of linux rather guarantees a return of the erroneous behaviour.
I had that problem with 12.3 Beta1. But it was fixed by the time of the final release.
When I was having that problem, I found that if I mounted the EFI partition that Windows uses (I just mounted at “/mnt”), and ran “grub2-mkconfig” it would then find windows. You might give that a try.
So once more - you have a single partition of size 465G on disk /dev/sda, which contains your Windows installation. Is it correct? Is this partition of type “FAT”? Could you please show output of “blkid”?
Yes. It is called ESP (EFI System Partition). Can you boot your Windows installation directly, without using grub2? Do you have /boot/efi mounted? Could you show “ls -lR /boot/efi”?
I am not sure what happens in this case. Windows apparently has copies of EFI bootloaders, which is fine. But where does it keep boot configuration in this case? Normally on EFI it is in ESP.
My understanding (which could be wrong) is that Windows 7 - 64bit will install on a GPT disk as long as UEFI firmware is used. And on an FDISK partitioned disk, it can only be installed in traditional MBR (non-UEFI) mode.
But perhaps you have 32-bit windows, and that probably doesn’t work at all with UEFI and GPT.
My understanding (which could be wrong) is that Windows 7 - 64bit will install on a GPT disk as long as UEFI firmware is used. And on an FDISK partitioned disk, it can only be installed in traditional MBR (non-UEFI) mode.
But perhaps you have 32-bit windows, and that probably doesn’t work at all with UEFI and GPT.
I’m on x64. Yes you’re right that 32 bit doesn’t work with UEFI.
The problem I had was that I could not boot the Windows ISO in UEFI, therefore it moaned about the GPT disk.
As I understand the Windows boot manager is called bootmgfw.efi and is located (on the ISO) in /efi/Microsoft.
I created a new directory called /efi/boot and renamed “bootmgfw.efi” to “bootx64.efi” and placed it in the new directory, this allowed me to boot the Windows installer in UEFI mode which worked.
I must say I’m VERY impressed with 12.3, I was even playing Half-Life 2 through Steam thanks to please_try_again’s ati upgrade script! Who’d have thought! Now if I could just convince the games industry to use openGL…I don’t even have to use MS Access anymore so Windows’ days are numbered!
Anyway, I’m going to reinstall Windows just because I can’t think of anything else to do at the moment…
>
>nrickert;2561922 Wrote:
>>
>>
>> That’s an unusual way to install Windows.
>
>I had to mess around with the Windows ISO since it didn’t want to
>install on a GPT disk.
>
>
>ls -lR /boot/efi:
>
>
>Code:
>--------------------
>
> /boot/efi:
> total 4
> drwxrwxr-x 3 root root 4096 Jun 1 11:54 EFI
>
> /boot/efi/EFI:
> total 4
> drwxrwxr-x 2 root root 4096 Jun 1 11:54 opensuse
>
> /boot/efi/EFI/opensuse:
> total 120
> -rwxrwxr-x 1 root root 121344 Jun 1 14:36 grubx64.efi
>
>
>
>--------------------
I have no idea what you could possibly done to achieve that freak sda, but
one thing is really clear, you are not providing nearly enough
information. Which MSwindows? I had zero problems installing Win7 on a
GPT/EFI disk. If you want to install Win7 to a SSD, just unplug all other
disks. You can even get it to install GPT/EFI to a blank SSD.
Getting openSuse on the system after that only requires some care.
When asked for command results, include the command between the code tags.
The exact options and targets matter.