Trouble dual booting 12.2 and Windows 7 on EFI enabled system

I have spent the past 2 days trying to install both Windows 7 and Opensuse 12.2 to my laptop that is EFI enabled. I have exhausted every resource I could find (as a result it is a clean hard drive at the moment). The only solution seems to be forcing them both to use legacy MBR partitioning, which I am fine with, but doing it seems impossible.

If I install Windows 7 first, no matter what I try, it sets up GPT partitioning. Opensuse will not install this way because it says it needs to remove the Windows 7 partitions to set the GPT label.

If I install OpenSUSE first, it tells me I should make sure to set up /Boot/EFI. The Windows 7 disc will not use the disk to install in this state because it says it can’t read GPT disks.

The BIOS has no options as far as EFI and there is only 1 boot option for each device so I appear to be hard set in booting UEFI first.

Installing to an external disc is not a good option for me, is there any way for me to dual boot?

There are a couple of bugs in the openSUSE installer. One is that it will want to reformat the /boot/efi partition which wipes out the
existing win7 boot. What I’ve done is:

1). Install win7 allowing it to create the uefi boot partition.
2). Once finished the system will boot win7
3). Boot the openSUSE DVD (must use the DVD as the other boot methods don’t support uefi
4) the disk partitionner will want to format the /boot/efi which if allowed to do so will erase the existing boot.
5) Don’t allow the installer to format /boot/FBI the system will complain that system partitions aren’t being formatted and ask if your sure.
6) Make sure however that the / and /boot (and other Linux partitions) are formatted, keep home unformatted if you need the data preserved.
7). Allow the installer to do it’s job and at the end Susie will boot but win7 won’t.
8) The other bug is that the os-prober won’t find the uefi boot partition and configure grub to boot it as a mrb partition
9). I’ve entered a bug report and the developers have confirmed the bug but won’t be easy to solve.
10). The work around is to use “please try again’s” guide to create the proper entry into the /etc/grub.d/40-custom file to add the stanza for win7 .
11). There will be two win7 entries in grub but use the second one (without the win flag icon).
12). Run grub2"-efi-mkconfig to rewrite the config file "grub2-efi-mkconfig >/boot/grub2-efi/grub.conf.

I have used this method for both 12.2 RC2 and the final release.

The guide goes into a lot of details but the section on creating the stanza is needed.

I am having trouble finding any guides by him, but I have found one that looks like it could work, though I am off to work soon so I can’t try it out yet. Managing EFI Boot Loaders for Linux: Using GRUB 2

My other question would be, in setting up the boot information will there be a problem if I set up the partitioning to be: **|Swap|Windows EFI|Windows C: |SUSE| **I like the idea of Having swap be first so the swap space is still on the beginning of the drive and Windows is not put too much later to ensure both have good speed, but it is not a requirement. My guess is if the guide I linked is correct, I would just have to set it as set root=’(hd0,gpt2)’

I think that EFI expect to be first.

You would think that it does, but I have gotten it to boot Windows with that partition setup, but I hadn’t been able to get OpenSUSE installed.

I found his guide. but still nothing…

Yes, you should install Windows first. But are you sure that you install Windows in UEFI mode? See this article: Booting openSUSE on UEFI BIOS with ELILO and Grub2 (part II - Windows dual-boot ). It applies to openSUSE 12.1, but the Windows part remains unchanged.

Yes, I have gotten it to the point that I now have both systems installed and I have explored /boot/EFI/ and all of the Windows information is in there. I have also managed to get the entries in the boot loader as your guide has said, but the first Windows boot option tells me that the hardware has changed and kicks me back to the selection screen, the second one just kicks me back to the selection screen. When I ran the updateGrub2 command, I seem to get 2 errors, I will paste the output.

grub2-efi-probe: error: failed to get canonical path of /boot/efi/EFI/windows/bootmgfw.efi.
Generating grub.cfg …
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.4.6-2.10-desktop
Found initrd image: /boot/initrd-3.4.6-2.10-desktop
/dev/sdb: open failed: No medium found
No volume groups found

Could this be set up with secure boot??

Hummm. It doesn’t sound good. I’m afraid it’s the price to pay for using Windows noawdays … or, much worse, for not using it.

Please do not use updateGrub2 under 12.2! This script was intended to be used under 12.1, where neither grub2 nor grub2-efi was officially supported nor installable from setup.

Do you mean boot options in UEFI or boot options in GRUB?

The boot options in GRUB. Though my boot options in UEFI do list both Windows Boot Loader and OpenSUSE Boot Loader, though both lead to GRUB.

The current implementations of UEFI don’t seem to have been as ready for the wild as one would hope before they push it this far… Windows can’t handle it right, Mac knew it couldn’t handle it right so they made sure they went hybrid, and Linux doesn’t seem ready for it yet either. Doesn’t help that my first system dealing with UEFI is almost optionless as far as the BIOS I guess though.

Using grub2-efi-mkconfig has about the same results for me. Also was not aware that you were advising against updategrub2 in 12.2, I found updategrub in the community repos for 12.2. I can give you the output for grub2-efi-mkconfig if you wanted though.

It’s possible. Once grub2-efi is installed, updategrub just runs grub2-efi-mkconfig on UEFI systems or grub2-mkconfig on BIOS sytems. But some files have been moved in the Grub2 package, which causes non fatal errors on BIOS systems. I don’t have a 12.2 UEFI system to test yet.

Yeah… Someone asked me to enable my repo two days before 12.2 was released … and I did. But when I get some time, I’ll see which modifications I should apply to this script. Btw the package includes other scripts, such as findgrub and updateLegacygrub, which are still useful under 12.2.

It won’t certainly hurt*, but I’m not sure I’ll be a big help. Right now, I have neither Windows, nor openSUSE 12.2 on a UEFI machine. But meanwhile, other people have started to install openSUSE on UEFI. Maybe they’ll have some suggestions.

  • but use CODE tags please! ([noparse]


This may be the reason why Windows complaints. Apparently either UEFI menu entries were changed or Windows bootloader itself was overwritten. You could use efibootmgr to check menu entries. I am not sure how to verify Windows bootloader … may be going into Windows recovery console and reinstalling bootloader is the simplest way.

The recovery console kicks me back to the boot menu as well. What is the likelihood that I can re-install Windows over top of itself to bring the boot entry back, boot into Opensuse from the DVD, and have it probe for itself and have it fix its UEFI entry. I am well aware that when I install Windows, the entry for “OpenSuse Boot Loader” is overwritten. Or is there any way to force both to install as MBR, my BIOS boots to MBR just fine but it will always pick UEFI if it is there?

You will need to select Legacy Boot in your BIOS setup. See example here: Installing Windows 7 on UEFI based computer - Ask the Core Team - Site Home - TechNet Blogs Just how exactly is it called depends on your system.

The recovery console kicks me back to the boot menu as well.
If you boot into SUSE, do you have /boot/efi mounted? If yes, does it have /boot/efi/efi/Microsoft/BOOT directory (case does not matter, it is FAT32 so case insensitive)? What is the content of this directory? Also could you provide output of “efibootmgr -v” in openSUSE?

My BIOS does not have any options for legacy things like that, though the original windows installation was set up as MBR (so the manufacturer had some way). And isn’t upgrading the BIOS a tad risky? I have already edited the windows disc before to change what version I can install with the disc so I was thinking there might be something similar for this situation.

The /boot/efi/efi/Microsoft/BOOT directory is mounted and appears to have the same files and folders as before I installed linux.

Here is the output of the command:

BootCurrent: 000B
Timeout: 0 seconds
BootOrder: 000B,000A,0005,0004,0006,0007,0008,0009
Boot0000  Setup
Boot0001  Boot Menu
Boot0002  Diagnostic Splash
Boot0003  Acer D2D
Boot0004* HDD0: WDC WD5000BPVT-22HXZT3                          ACPI(a0341d0,0)PCI(11,0)ATAPI(0,0,0)..bYVD.A...O.*..
Boot0005* ATAPI CDROM: HL-DT-STDVDRAM GT34N                     ACPI(a0341d0,0)PCI(11,0)ATAPI(1,0,0)......!N.:^G.V.T
Boot0006* USB FDD:      030a2400d23878bc820f604d8316c068ee79d25b6ff015a28830b543a8b8641009461e49
Boot0007* Network Boot: 030a2400d23878bc820f604d8316c068ee79d25b78a84aaf2b2afc4ea79cf5cc8f3d3803
Boot0008* USB HDD:      030a2400d23878bc820f604d8316c068ee79d25b33e821aaaf33bc4789bd419f88c50803
Boot0009* USB CDROM:    030a2400d23878bc820f604d8316c068ee79d25b86701296aa5a7848b66cd49dd3ba6a55
Boot000A* Windows Boot Manager  HD(1,800,32000,107d048d-6f76-4982-b609-4507add3f0ce)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.}...a................
Boot000B* opensuse      HD(1,800,32000,107d048d-6f76-4982-b609-4507add3f0ce)File(\EFI\opensuse\grubx64.efi)

This looks fine as far as I can tell from UEFI point of view.

The recovery console kicks me back to the boot menu as well
I actually meant system recovery from installation DVD.
Here is concise description how UEFI booting works: Tianocore_UEFI_DUET_Builds - How_UEFI_booting_works - Open wiki - Gitorious. Another one which gives some tips how to recover Windows bootmanager: Tianocore_UEFI_DUET_Builds - Windows_x64_BIOS_to_UEFI - Open wiki - Gitorious

the first Windows boot option tells me that the hardware has changed
Could you provide exact message which can be searched for? I hope Windows does not checksum entire content of system partition …

I thought of that too, the DVD I have tells me that it can’t be used for recovery, only installation and the button is even grayed out. I have ideas as to why it says that (mainly that it is a version-free DVD), though it is a legal downloaded one from MSDNAA.

Could you provide exact message which can be searched for? I hope Windows does not checksum entire content of system partition …

I will do you one better and give you the exact screen:
When I pick startup repair, it has a loading bar and says “Windows is loading files,” but as soon as it finishes, it kicks me back to the same screen I picked “launch startup repair” from. If I pick “Start Windows normally,” it just kicks me back to GRUB.

I am afraid that the only other idea I have is to try something like EasyBCD to try to repair Windows bootloader configuration. It seems that openSUSE installation somehow corrupts it. And if this does not work I have to give up. I would be very interested in reproducing it, but I do not have hardware to try.