Confused with grub2-efi / opensuse / win 8

I trated myself to a new desktop computer yesterday.

It is my first experience of efi (instead of a bios). The p/c came with windows 8 installed - which I have left on, simply creating some partitions to share data and some empty space for opensuse to install. Ran the opensuse dvd (12.3 m2 64 bit) and it installed fine (once I had turned-off ‘secure boot’ in the efi settings).

I selected grub2-efi as the bootloader. My problem was that that the p/c just booted into windows 8. I eventually found a efi setting to make opensuse the default o/s. This starts opensuse fine but with no alternative to load windows instead - without changing the setting in efi back to windows, which is a bit round the houses. I am guessing that it is best to leave opensuse as the defaut efi o/s but to add an entry to the opensuse boot loader to allow windows to start - if selected.

Although I am fairly fine using opensuse I have always used grub 1 - so do not know where to start? Can anyone please point me in the right direction? I have ran fdisk -l but as efi uses gpt it isn’t of much use. I am guessing the relevant entries are:

sda1 - HPFS/NTFS
sda2 - EFI boot - Fat
sda3 - Microsoft Reserved
sda4 - Win95 FAT32 LBA
sda5 - Windows drive c - HPFS/NTFS
sda6-11 are just windows data partitions
sda12 - EFI boot
sda13 - / linux
sda14 - linux swap

Many thanks

UEFI systems usually provide firmware boot menu support. So you can select any of available boot items. You can also set one time boot menu item for the next boot using “efibootmgr -n”.

Hmm … I wonder how Windows handle suspend-to-disk. Whether it sets BootNext to ensure system is booted into Windows next time. If not, using Linux as default boot option may not be the best choice.

Currently openSUSE does not support autodetection of other boot loaders on ESP. See https://bugzilla.novell.com/show_bug.cgi?id=775610#c7 for extensive description how you can manually add Windows to boot menu. Hopefully patches to support UEFI systems will be added in time for 12.3.

You have two ESP on the same disk. That may cause issues with Windows recovery (or general BCD configuration). Did you add it manually or it was automatic suggestion? Could you please install gptfdisk and provide output of “gdisk -l /dev/sda” in tags code, please.

What would be the procedure to boot openSUSE from a GPT partitioned disk? How do you create a ESP partition? I see that its is said to be FAT, but what FAT is it in the openSUSE Partitioner? So there are two basic problems. How might you install openSUSE to an existing GPT disk, forgetting for the moment about Windows being there and be able to boot from a GPT hard disk. But more important to me, is how you would install openSUSE to a GPT disk, with our standard tools and get it to boot? I assume you have a UEFI compatible computer and that secure boot is turned off. I see lots of lip service to be able to use a GPT disk, and indeed the kernel can read and write to an existing GPT partitioned disk, but no specific instructions in the most basic setup to make this work with the standard openSUSE 12.2 installation disk. The different possibilities are endless I know. But assume these very basic steps:

  1. You have a UEFI compatible PC.
  2. You are not using Secure Boot.
  3. You have an existing GPT hard disk setup and it must remain GPT. You may create it as you wish before the install.
  4. You can create and remove Partitions as you desire to install openSUSE within the normal GPT setup, but you are not reverting to a MBR setup.
  5. You will install openSUSE 12.2 from the standard DVD.
  6. When complete, you are booting openSUSE from a GPT disk in a EFI based PC with openSUSE 12.2.

Can this be done? But more importantly, what would be the blow by blow, step by step instructions? If you can’t get this to work, then nothing else matters in my opinion and indeed for openSUSE 12.3 to remain relevant, this has got to work. We can and will blame all sorts of other things on Windows, which is OK, but we have to have our own way of doing this. So, can you fulfill my request? By the way, please_try_again has such instructions, but I don’t find VFAT as a choice in openSUSE for the ESP. Consider that this has to be using openSUSE or you specify the EXACTLY what tools are to be used.

Thank You for using openSUSE,

Do you ask me? You do not need to do anything, default installation will work. What I mentioned was corner case which I expected was fixed as per Access Denied. That was reason for my question.

I will test dual boot once more with 12.3M3.

On 2013-01-01 17:46, jdmcdaniel3 wrote:

> What would be the procedure to boot openSUSE from a GPT partitioned
> disk? How do you create a ESP partition?

There is some description in the wikipedia UEFI article, booting section.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Yes, the question is yours. Now I am not picking on you in any way. But if you have knowledge on how this (GPT disk booting & partitioning) works, lets have it. So the default does not work for me, but that may be because my setup has too many disks. How do you, using custom partitioning, create a booting setup on a GPT disk? Is it as simple as creating a small FAT partition (32 bit?, 500 mb?) and in the booting section, select that as the boot partition? When you say it happens by default, that is only true perhaps if you have only one GPT disk I assume. By default is one thing, understand how to do it manually is another. If you can’t describe it manually, then likely, by default is going to fail for you, a lot.

Thank You,

Thanks very much for the posts. Most apprecaited.

Well I have installed gptfdisk and the output of "gdisk -l /dev/sda is:

Number Start (sector) End (sector) Size Code Name
1 2048 1023999 499.0 MiB 2700 Basic data partition
2 1024000 1228799 100.0 MiB EF00 EFI system partition
3 1228800 1490943 128.0 MiB 0C01 Microsoft reserved part
4 1490944 3588095 1024.0 MiB FFFF Basic data partition
5 3588096 229038079 107.5 GiB 0700 Basic data partition
6 229038080 685393919 217.6 GiB 0700 Basic data partition
7 685395968 1094995967 195.3 GiB 0700 Basic data partition
8 1094995968 1299793919 97.7 GiB 0700 Basic data partition
11 1827692544 1953521663 60.0 GiB 0700 Basic data partition
12 1304702976 1305040895 165.0 MiB EF00 primary
13 1305040896 1827692543 249.2 GiB 0700 primary
14 1300123648 1304334335 2.0 GiB 0700 primary

I had a go at altering the menu to add windows to the grub2-efi menu as per:

https://bugzilla.novell.com/show_bug.cgi?id=775610#c7

But no joy.

By way of background the opensuse dvd installed in a fairly normal way (the only thing that I noticed was that the windows partitions were not automatically mounted - which is straight forward to do manually). I have left suitable empty space on my hard disc (sda) and left the install to set up suitable partitions.

There is no real problem in booting either system - it is just a bit of a faff having to go into the efi/bios settings everytime to change the o/s choice. Just used to grub 1 were a windows boot option is automatically included.

So I do not have an answer to this problem and by all means, I thank you for sharing the situation. Perhaps it will inspires those in the know to provide a real solution.

Thank You,

And what does it mean? You do not have Windows in boot menu, you have it but it does not boot or you just have bad day? Please, explain what you did and what does not work. Otherwise it is impossible to help.

Do you use UEFI boot or legacy BIOS boot? UEFI installation definitely works using default installer settings. Legacy BIOS installation with GPT does have issue - it by default installs bootloader in partition, same as in MBR case, but there is no partition to mark as active …

It would help if you gave some more details, whether you use BIOS or UEFI and what exactly does not work.

If you mean does it have to be Fat32 or Fat16, it has to be fat32 for Windows. It used to be irrelevant for Linux, and some Linux setups used to create a fat16 partition which broke Windows UEFI booting.

The size is expected to be at least 100mb, more if you plan to install elilo (but why would you?) because it puts the kernels in the ESP. Thus, with elilo and many kernels, the ESP has to be large enough.

It’s not “as simple” as creating a FAT partition because, it’s a EFI system paritition and not a regular FAT partition. Its GUID (not to be confused with UUID) has to start with C12A7328 - something you can check with** lspart -U**. See this post in that excellent thread: Trouble dual booting 12.2 and Windows 7 on EFI enabled system

And happy new year to you and your loved ones, James. :slight_smile:

First off, if there is anyone that can do it, I feel it is you please_try_again. My problem is simple, well at least the one I would admit to today.

Install openSUSE 12.2 on GPT disk using its built-in tools when its default setup does not work. You can’t use terms like VFAT when it can’t be selected and if its special, how in the world do you do it? I try to create step by step procedures that any knuckle-head, such as myself, can follow. You can’t say it should work or it works by default, lets write down exactly what you do to make it work. If it requires any extra tools or steps outside of openSUSE, lets define them. Am I clear on what is required here? Anyone can step in and help or bow out if they just determined they don’t know what they are doing. I am myself hanging in here just in case a solution pops into this discussion.

Thank You for using openSUSE and taking the time to read my post,

Or just blank the first track of the HDD if it contains a MBR. Most Linux will create a GPT if you boot in UEFI with a blank HDD (Fedora even does it on legacy BIOS systems).

YES.

Definitely!

Yes, as I explained in my previous post, it’s not regular vfat. Don’t forget that my articles were written for 11.1 - as you could not install grub2-efi directly from openSUSE setup. I haven’t installed openSUSE (12.2) on an UEFI system. @arvidjaar did it a couple times on virtual machines.

Yes, you’re right. It has the VFAT filesystem - provided we’re talking about the EFI system partition in UEFI booting (and not about the BIOS partition in GPT booting on legacy hardware). But it also has a special GUID, which tells the system that it is a EFI system partition.

Well, if you dualboot with Windows, just mount the one created by Windows … but I don’t have the setup before my eyes. And if you install openSUSE, I assume it will create a valid ESP. You can also use several ESPs (actually one for each system). We already had this discussion with @arvidjaar in another thread.

I don’t know how many dozens of hard disks you have James, however in UEFI, it doesn’t really matter - since we’re not playing with boot loaders in boot sectors. But to make it simple, if you put a “blank” hard disk (meaning without a preexisting MBR) in a computer, insert the install DVD, at this point,** call the BIOS setup to make sure that it’s going to boot in UEFI mode***, and run the setup, I would assume that you’ll end up with a normal and working Linux GPT system.

  • This is probably the most tricky part, and that was why it didn’t work for many people under 11.1. It has nothing to do with the software though. By default, many BIOS (at least one year ago) used to boot in compatibility mode. Then - under openSUSE or other Linux - the MBR setup was executed each time. In my articles, every time while booting from a DVD, I had to call the BIOS setup and put the UEFI CD/DVD device on the top of the boot priority. It was necessary only for the DVD. Don’t know if it’s better now … it might.

I have many hard disks. I have one external now that is 2 TB, but since I already have a working setup, a new openSUSE install is not defaulting to using the GPT disk. I can not figure out how to create a custom partition setup that works and boots from a GPT disk selected from an EFI PC. I understand it must be an ESP partition, but can you not create this manually? Again, I will look at your previous posts, but I have not seen a step by step guide to do this to my satisfaction and freely admit I have been unable to do it. And so far, I have been left unsatisfied by what I have read so far. That is, steps I can reproduce using openSUSE 12.2 as I did outline in a previous post in this very message thread.

Thank You,

Of course, but it has to be “marked” as ESP. I would assume that mounting it in /boot/efi would be sufficient, but I don’t know. Thus, mounting an existing ‘regular’ vfat without reformating it might indeed not work. As I said I don’t have the setup before my eyes, and I never did it with 12.2.

What troubled me a little bit in openSUSE 12.2 setup - that I only ran on non UEFI systems - is that it gives you the choice between many boot managers. It’s nice, but it doesn’t make sense to be able to choose grub2-efi on a BIOS system or install Grub2 on UEFI system. If those choices would not appear or at least be greyed out when they are not applicable, you could tell for sure if you booted in UEFI mode and which kind of setup you’re running.

My question is - because I haven’t tried with openSUSE 12.2 - what do you see when you boot the install DVD in UEFI mode. Does it still boot ELILO? (as it used to do with 12.1). Under 12.1, if it didn’t boot ELILO, you could already tell at this point that it wasn’t going to work (use GPT partitioning, etc).

On Tue 01 Jan 2013 11:46:01 PM CST, please try again wrote:

jdmcdaniel3;2514897 Wrote:
> I understand it must be an ESP partition, but can you not create this
> manually?

Of course, but it has to be “marked” as ESP. I would assume that
mounting it in /boot/efi would be sufficient, but I don’t know. Thus,
mounting an existing ‘regular’ vfat without reformating it might indeed
not work. As I said I don’t have the setup before my eyes, and I never
did it with 12.2.

jdmcdaniel3;2514897 Wrote:
>
> Again, I will look at your previous posts, but I have not seen a step
> by step guide to do this to my satisfaction and freely admit I have
> been unable to do it. And so far, I have been left unsatisfied by
> what I have read so far. That is, steps I can reproduce using
> openSUSE 12.2 as I did outline in a previous post in this very
> message thread.
>

What troubled me a little bit in openSUSE 12.2 setup - that I only ran
on non UEFI systems - is that it gives you the choice between many boot
managers. It’s nice, but it doesn’t make sense to be able to choose
grub2-efi on a BIOS system or install Grub2 on UEFI system. If those
choices would not appear or at least be greyed out when they are not
applicable, you could tell for sure if you booted in UEFI mode and which
kind of setup you’re running.

My question is - because I haven’t tried with openSUSE 12.2 - what do
you see when you boot the install DVD in UEFI mode. Does it still boot
ELILO? (as it used to do with 12.1). Under 12.1, if it didn’t boot
ELILO, you could already tell at this point that it wasn’t going to work
(use GPT partitioning, etc).

Hi
You need to configure the disk prior to the install, boot in legacy
mode into a live cd and install gptfdisk, then zero out the mbr…


dd if=/dev/zero of=/dev/sda bs=512 count=1
gdisk /dev/sda

Now in gdisk create two partitions;
1 - 128M type ef00
2 - 128M type 0c01
Then as many more as you require or wait for the install via YaST.

Now configure (if not already done) to boot in UEFI mode, then select
the dvd (It will boot ELILO) which must be the UEFI one, not legacy via
the UEFI BIOS Boot menu…

One thing you might want to check in the live cd it to run efibootmgr
and see if you can manipulate the UEFI nvram, my HP ProBook UEFI nvram
is somewhat lacking, this DELL is fine…

I’m currently running openSUSE and Windows 7 but openSUSE is set to
default, windows booting is via the UEFI menu at present…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 5:42, 3 users, load average: 2.36, 2.45, 1.82
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

So, just another thing that I do not understand when you say “boot ELILO”. Let me say that the default kernel sees the GPT disk just fine and you can create as many Primary I guess, disk partitions as you like (I made 28 small ones just to see) and point openSUSE there for root / and /home. I have the option to use grub-efi or ELILO as boot managers, but I am not sure what to do next. I do have an UEFI PC and it even has a Secure Boot option, not enabled at present. But until I can get off the launch pad with a GPT/ESP booting disk, I am not sure what else I might be doing.

Thank You,

Hi,

UEFI booting is different.

After my experience, you will have to select the system to boot from by UEFI BIOS setup.

This is different from older versions of openSUSE with some boot loader (e.g. GRUB) controlling the “whole” boot process.

It’s the UEFI BIOS that’s in charge now, i.e. which is to select the OS (or the respective boot loader) to be run.

Good luck
Mike

When you boot from the install DVD, you should see “ELILO booting …” or something similar. I haven’t tried under 12.2, but see what Malcolm said:

If you don’t see “ELILO booting”, you got the wrong setup because your BIOS picked the wrong DVD device. Since there are two boot loaders, a UEFI and a legacy one on the DVD, they appear as 2 devices in BIOS setup (actually the embedded EFI shell). The legacy one often has boot priority. This is why if you don’t explicitely change the boot order in BIOS setup just after inserting the DVD, you’re going to run the legacy setup, not the UEFI one. It would be easier if openSUSE - as well as other Linux distros - would make two different bootable DVDs instead of that “hybrid” one.

Yes. GPT is required for UEFI, but UEFI is not required for GPT. It means that you can use GPT on legacy systems too. However in this case, you won’t use a vfat (human readable) EFI partition but a BIOS (non human readable) binary partition. I don’t know exactly how it is called. It serves the same purpose as the EFI partition, except that it is binary (you can neither mount nor read it). I have no experience with this kind of setup. I read about it in C’T magazine, in an article describing how Fedora would install on a blank HDD on legacy hardware. I did mention it in several threads already.

What you should do if you haven’t seen “ELILO booting” is cancelling the setup, rebooting with the DVD inserted, calling the BIOS setup and draging the UEFI labelled DVD device to the first position. However - it has been reported in the forum already - it seems not to be possible at all with “some” mainboards. Some mainboards simply won’t let you boot Linux in UEFI mode. It has nothing to do with Secure Boot. If you have one of those, I can just add its name at the end of my articles as not compatible, so that people won’t buy it. :frowning:

If you can not boot in UEFI mode, you can still install openSUSE with GPT and use a BIOS partition … and I would say probably write an article, because there isn’t any on that topic.:wink: