GPT+BIOS on openSUSE 13.1 x64

What is the best way to set up a GPT disk with a traditional BIOS on openSUSE 13.1 x64? I Googled it and found that a protective MBR is one answer, or creating a separate small boot partition to put Grub2 on. I see very little info on GPT+BIOS, and almost none pertaining to openSUSE. In the YaST setup phase, I don’t see anything that lets you set a partition on a disk to GPT besides a toggle option in the last screen to create a MBR or not on one partition. Is there an option hiding somewhere? I know YaST detects whether or not you’re booting the CD from a BIOS or UEFI computer, but does the installer let you create GPT partitions with YaST when booting from the non-LILO DVD?

I’ve done this on an external drive. It works fine with linux. It might be a problem with Windows.

The protective MBR is a standard part of GPT.

My advice: Create a “BIOS Boot Partition”. You can position this between sector 34 and 2047, a part of the disk that won’t otherwise be used.

If you are starting with a clean (unpartitioned) disk, then use “gdisk”, and use “x” to get to expert mode. Then set the alignment to 1. Otherwise you will have problems creating a partition starting at sector 34.

Create a new partition at 34, ending at 2047. Give it the partition type code of “ef02”.

Then write the changes and exit “gdisk”. Best to restart “gdisk” with the standard alignment, before doing anything else.

When you are satisfied with the partitioning, just install. Tell the installer to put grub2 in the MBR. That works fine, in my experience. The grub-installer will recognize that this is a GPT disk, and will automatically put part of its code in the BIOS Boot Partition.

You will need to install booting to the MBR. The standard generic MBR boot code does not understand GPT, so won’t find any partitions to boot. But Grub2 does that nicely.

An alternative, which I have not tested, is to setup hybrid partitioning. You can also do that with “gdisk”, though all of the advice I have seen recommends not doing this. With hybrid partitioning, you can have up to 3 partitions that are listed in both the MBR and the GPT partition table. As long as you are booting one of those, the generic MBR boot code should be able to boot a hybrid partition.

It looks like gdisk isn’t loaded when choosing “Rescue Mode” using the DVD, although fdisk is. I would rather not pull the drive out of this PC. What are my options?

Download and burn the openSUSE Rescue system to a usb device and use that.

I got the Rescue system working from a USB drive, but had some questions. Am I only supposed to create the BIOS Boot partition in gdisk, then set up the others through YaST? I tried that, and after the install I ran: “gdisk /dev/sda”, and it says it found a valid GPT. However, when running: “gdisk /dev/sda2” and “gdisk /dev/sda3” (the two data partitions), it found no GPT, or said it was invalid. I also tried another install, and used gdisk beforehand to set up the partitions to import into YaST, but YaST doubled everything and didn’t want to import the partition setup. Thanks for the help.

I don’t have an answer for that. It is possible that Yast notices that this is a traditional BIOS system, and erase the GP table.

I always do full partitioning with “gdisk” (or “fdisk” in the non-GPT case), and then during an install, I go to expert mode and just tell the installer which of the existing partitions to use for what.

In the case of the external disk using GPT, I actually first installed with it plugged into a UEFI system. I then later converted to using “grub2” and a BIOS boot partition, so that I could boot it on an older BIOS system.

After partitioning with gdisk, YaST says it cannot find mount points. I can create a new GPT in YaST, but then it erases the BIOS Boot partition I created in gdisk. Do you have any other suggestions?

Are you installing from the DVD?

I can try a fresh install to my external drive, to see whether I get the same thing. I’ll start by erasing the current partitioning and create a new setup.

Yes, I am installing from the DVD. It looks like gdisk will let you set the sector alignment and partition the disk all in one try, without exiting. I think I tried exiting and then going back into it and it didn’t matter. If you want to try and see what happens, I’m curious to see what result you get. :slight_smile: YaST doesn’t tell the user which partition is GPT or MBR (unless I’m not seeing something)…maybe that would be a nice feature to make things less confusing.

Okay, it is busy installing as I write this.

I probably did not give enough detail before.

I first partitioned the disk with “gdisk”

GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdf: 156301488 sectors, 74.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 11B54440-F03F-49E9-84D6-9ADA51D8B3F2
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 156301454
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34            2047   1007.0 KiB  EF02  BIOS boot partition
   2            2048        41945087   20.0 GiB    8300  Linux filesystem
   3        41945088        62916607   10.0 GiB    8200  Linux swap
   4        62916608       156301454   44.5 GiB    8300  Linux filesystem

That’s the output from “gdisk -l”. The disk itself is an old IDE disk mounted in an external enclosure. It’s a left-over from a long discarded older computer.

Next, the install to that external drive.

I’ll skip the preliminaries, and get to the partitioning section.

On the first partitioning screen, I clicked “Create Partition Setup”

On the next screen, I ignored the check boxes. Instead, I clicked “Custom Partitioning”. That’s what allows me to use existing partitions.

The next screen presented a list of partitions. In my case, this was complex because it had partitions for the internal drive, the external drive, and the USB flash drive that I had used with the DVD iso image.

I looked for the partitions that I had created on the external drive. I ignored the BIOS boot partition there, as it’s use should be automatic by grub install. So I started with “/dev/sdf2” for the root partition. I right clicked on that, and selected EDIT.

Next, on the edit page, I checked the box “Format Partition”. I set the file system to “ext4”. I checked the box “Mount Partition”, and I set the mount point to “/”.
I did about the same for “/dev/sdf4”, except that I set the mount point to “/home”.
For the swap partition, I set the file system to “swap” and the mount point to “swap”, and also checked the boxes to format partition and mount partition.

When I accepted the result, there was a strange message “Your boot partition is smaller than 12MB”. I think that is a spurious message, and I went ahead and ignored it.

In the meantime, install has completed and the newly installed system is up and running (I only install XFCE).

I hope that helps. My best guess is that you missed the part about setting a mount point.

I got it installed, and everything went smoothly. However, I got this far before and here is what is throwing me off aside from YaST not being able to import a GPT partition scheme using the import button (no mount points found error message): when I run “gdisk -l /dev/sda” or just “gdisk /dev/sda”, it says it found a valid GPT. If I run “gdisk -l /dev/sda3” or “gdisk /dev/sda4” (the two data partitions), it says it found an invalid GPT and a valid MBR. If I were to convert it to a valid GPT, it would wipe out the install and I’m back to square one. In the final setup screen, I selected boot from MBR. I experimented with it and also tried with that off, and I think it still worked but maybe I’m wrong.

It is best NOT to mix mbr and GPT. It is possible to do a hybrid but it becomes complicated and some BIOS (EFI) don’t do it well. Stick with one format

If you don’t understand some output paste it here in code tags. Show us the whole thing including the command line that got the output. it is hard since we can’t see over your shoulder. So show us don’t tell us.

You misunderstood “import”. I use that for most of my installs. But what “import” does, is look for a prior install of opensuse, read the “/etc/fstab” file from that prior install, and use that. My understanding is that you did not have a prior install.

That’s a different mistake. “gdisk” wants to look at the entire disk, as in “gdisk -l /dev/sda”. Telling it to look at an individual partition will only confuse it. It is possibly seeing a PBR (partition boot record) and mistaking that for an MBR.

Excellent. Thanks for you help. All seems good.

I too am stuck on this. I have a pair of WD Red 3TB drives, which I am setting up with RAID1.

os13.1-x86-64 creates a GPT partition and a protective MBR partition.

the installer fails completely to make the system boot, the BIOS (an old Intel motherboard with core2, no UEFI/EFI support), simply says no boot device.

I created a small “biosboot” partition (on my fifth installation attempt)

if I boot rescue I can fsck the /dev/md124 and /dev/md126 devices, mount them, mount-bind the /dev /sys /proc dirs into them, mount devpts, and then chroot in, the OS has installed just fine!

I have tried all sorts of things to get grub working, created hybrid partition tables etc. I found an interesting script called bootinfoscript and it could see the grub2 core.img data in the biosboot partition (and strings confirmed it too).

I am absolutely stumped!

Your problem is likely related to RAID. So you might do better to start your own thread.

There was an earlier thread with a similar problem, something to do with there being no provision to mirror the BIOS Boot Partition.

One suggestion was to put “/boot” on a USB flash drive or similar, so that you can boot from a non-RAID disk.

well, a strange thing. I found a spare old PC, not too different from the one I had been using, and put the drives in it, and it booted, or, at least tried to but didn’t find the root partition.
This PC also has an Intel core2duo motherboard of the same generation as the other - no UEFI, no EFI, nothing.

I then destroyed the contents of the disk by dd’ing 4GB from /dev/zero over them, and started the install from scratch.

Just for reference as to how I did the disks:
On /dev/sda I created a 7.84MB biosboot partition, then 1GB linux-raid (type FD) for boot, then 2G formatted as swap, then 56G linux-raid for root, then the rest as home. Then in advanced tools, cloned that disk.

Then I created the RAID1 mirrors and set them to be formatted and mounted as /boot and / appropriately.

Then back at the overall summary page, having read a previous bug report, I clicked into the BOOT options at the install summary page, and OK to accept the settings. It warned me that /boot was way too small, but I ignored it.

And then I just set installation to what I wanted, and let it finish and then it booted. Voila, I have a fully booting/working system!