Where Will Grub2 be Installed?

I am running Win7 Pro (64 bit) on this machine. I want to install OpenSUSE 13.1 on its own hard drive (a GPT partitioned disk) no other operating systems on drive. Where is the GRUB boot loader installed? Is it installed on the drive where I install OpenSUSE? Or will it replace the Windows boot sector? Thanks

You get to make some choices during install.

Is this a UEFI box? How opensuse is booted will depend on whether using UEFI or traditional MBR booting.

I’ll make some suggestions, when I have the answer to that.

Also, are you considering opensuse 13.1 or an earlier version?

Does your BIOS give you an option of which disk to boot from?

To answer your questions;
This is a UEFI box,
I want to install OpenSUSE 13.1,
I can specify which disk I want to boot from

Since it is a UEFI box, opensuse will want to boot using UEFI.

A proper UEFI install doesn’t really boot from a disk, though not all BIOS manufacturers implement this properly.

Normally, the bootloader is installed in the EFI partition, and an entry is added to NVRAM (non-volatile memory on your computer). The UEFI firmware boots a system using the NVRAM entry.

If you take all of the defaults, it will want to create a directory “\EFI\opensuse” in your existing EFI partition (the one used by Windows), and install the bootloader in that directory.

If you prefer, you can create an EFI partition on your second disk, and have the boot loader installed there (again in “\EFI\opensuse” relative to the new EFI partition).

Some UEFI implementations work well with two EFI partitions. Some don’t. And some give a lot of trouble, though it is usually possible to get them working.

If you want an EFI partition on your second drive, you can manually partition it beforehand. Or you can do the partitioning in the installer.

Another question: Are you installing with the 64bit DVD image (perhaps written to a USB). Or are you planning to install with the live KDE or Gnome image?

It might be useful to know something about your computer (such as manufacturer and perhaps model).

Note: I’m going to treat this thread as a help thread for any problems that you run into.

An additional comment might help.

Today, mostly for experimental reasons, I did an install of 13.1 on my UEFI box. Note that this was in addition to my current install on the box.

I wanted to install on an external drive (that was my experiment). Before starting, I had removed all partitioning from the external drive.

I started the installer, then plugged in the external drive while the installer was still booting.

At the partitioning section, the installer made some partitioning recommendations that I did not like. So I clicked the button “Create partitioning”. It then gave me a list of disks to use. I selected only my external disk, then said okay.

It came back with a new recommendation. It wanted to create a VFAT partition of around 150M, and mount that at “/boot/efi”. It wanted to create a swap partition of 2G, a root partition of 20G, and the rest of the disk going to “/home”.

That looked good to me, so I accepted the recommendation. As expected, it used GPT partitioning. That VFAT partition became the EFI partition on the new disk, and was given the correct partition type code for VFAT. I’m not sure why, but the other partitions were given the partition type code for NTFS, though they were formatted properly for swap and “ext4”. I later changed the partition type code with “gdisk” running on the installed system (to 8200 for the swap partition, and 8300 for the “/” and “/home” partitions).

The install also added an NVRAM entry, which I later deleted. I have not tried booting since deleting that NVRAM entry. I should be able to boot by hitting F12 during boot to get the BIOS boot selection menu.

What the install failed to do, was create a directory “\EFI\Boot” on the external drive. So I fixed that with:

cd /boot/efi/EFI
mkdir Boot
cp -p opensuse/* Boot/.
cd Boot
mv shim.efi bootx64.efi

Separate GUID for Linux partitions is relatively new (I believe it was suggested by author of gdisk) and support was added to parted on 29-09-2012; it is not yet part of any released version. openSUSE is using parted in yast. Patch is small and probably could be backported although I’m not sure whether it is worth feature request (and it certainly not a bug). Try contact openSUSE parted maintainer.

Well … it was not really supposed to do both - \EFI\opensuse and \EFI\BOOT. Although given all the problems we had seen reported, it would make sense to do both if \EFI\BOOT does not yet exist - it would increase chances to have bootable system. The problem is
a) it has to be integrated in grub2
b) how can we detect that \EFI\BOOT was changed and stop overwriting it?

This is why I did not suggest it is a bug. However, the OP for this thread seemed concerned about keeping everything for opensuse on its own disk, so he might want that, and might need to copy manually.

In what I described – install on an external disk – it might have been better to only put in “\EFI\Boot” and omit the NVRAM. Perhaps there should be an install option for that.

The main problem I see - all those HOW-TOs about boot recovery using grub-install. While grub-install already has --removable flag that does exactly that - it cannot determine it automatically. Anything that exists in yast only will just add to confusion when attempting boot recovery outside of yast.