Installing on an external drive — UEFI version

My previous post described installation on an MBR based system.  Here, I’ll described how it worked out on a newer UEFI based computer.  This was an install of opensuse 13.1, using the DVD version of the installer iso, but with the iso “burned” to a USB device.

I shall keep this report roughly parallel to the report in my prior post.

Booting the installer

I had my computer set to secure-boot mode.  I started with only the installer USB flash drive plugged in.  I hit F12 during boot, and the BIOS gave me a boot menu.  I selected the USB device for booting.  On the resulting boot screen, I selected install.  And I plugged in the external hard drive, while still on that boot screen.

The newer BIOS on this computer gives more choices.  I did not actually need to delay plugging in the external hard drive.  Hitting F12 during boot brings up a menu which includes all known UEFI bootable devices.  If I were to disable secure-boot, the menu would also include a separate list of MBR bootable devices.

After selecting install, and hitting enter, on the grub boot menu, the installer flash drive booted nicely into the installer.  The first few steps of install were as normal — accept the license and set the timezone.


Next came the partitioning section of the install.  I was given suggested partitioning, which included use of the internal hard drives.  Since I did not want that, I chose “Create partition setup”.

The next screen listed the available drives.  I selected only the external hard drive.  On the following screen, I selected “Use entire disk”.

The installer proceeded to suggest partitioning.  It suggested:

145M    EFI partition (mounted as "/boot/efi")
2G      swap partition
20G     root partition
52G     home partition

I accepted the suggestion.  Later checking (after completing the install) showed that the disk had been given GPT partitioning.  The first partition was properly flagged as an EFI partition — “gdisk” shows that as a partition type code of EF00.  The other partitions were apparently typed as NTFS partitions, and shown in “gdisk” as having type codes of 0700.  I later learned that the assignment of GUID partition codes for linux is relatively recent, and the version of “parted” used by the installer did not have support for those.  I eventually (after the install) changed those partitions to the proper typing, using “gdisk”.

Boot configuration

The installer already had reasonable defaults.  It had recognized the computer as UEFI based, so wanted to use “grub2-efi”.  And there are not many choices to make with “grub2-efi”.  It had, by default,  selected to setup support for secure-boot, which was fine by me.  Note that if I disable secure-boot in the BIOS, this will still work, though the security checking during boot will be skipped.

There is one detail to watch.  The install, by default, will create NVRAM entries named “opensuse” and “opensuse-secureboot”.  If you already have entries with those names, those will be overwritten by the new boot entries.  There’s a way to avoid this.  Go into the “boot Loader Options” screen, and change the “Distributor” code.  Replace “OpenSUSE 13.1” with “SomeOtherName 13.1”.  Whatever name you use (without the 13.1) will be used for the NVRAM boot entry.

There’s one remaining boot problem.  The install will set it up to boot from an NVRAM entry.  But I wanted to be able to boot it by plugging in the external hard drive USB connector, and selecting the boot via the BIOS.  That requires additional information in the EFI partition.  The installer does not seem to provide for that, so I did that manually at a later time.

Install and reboot

I continued with the install.  That went smoothly.  And the reboot for final configuration also went well.  I did not need to disconnect and USB devices.  The installer had provided an NVRAM entry for the newly installed system and had made that first in boot order.

Final adjustments

As mentioned above, I did not want to boot from an NVRAM entry.  I wanted to boot the device from the BIOS menu when connected.  While booted into the system, I did:

cd /boot/efi/EFI

That gave me the list of directories. There was only one, with the name of the newly installed system. I’ll call that “opensuse” in what follows, but it will instead be the name that you set in the “Distributor” option of the boot configuration settings.

mkdir Boot
cp -p opensuse/* Boot/.  ## copy boot files
cd Boot
mv shim.efi bootx64.efi

That last name, “bootx64.efi”, is the name that the UEFI firmware expects for a device boot on a typical 64bit PC. Other UEFI hardware may have a different default name.

Those changes make the disk directly bootable, via the BIOS boot menu.

Finally, one additional change.  I ran the command “efibootmgr -v” which showed that the system was using NVRAM entry 0003.  I deleted that with

efibootmgr -b 0003 -B

For final testing, I rebooted.  I then hit F12 during boot to bring up the BIOS boot menu.  And I was able to select that external drive to boot.

A final note

The system, as installed, can only be booted on a UEFI box.  It won’t boot on an older MBR based system.  My previous installation (for MBR) could only boot with MBR mode.  I could still boot it on my UEFI box, by disabling secure-boot and using the MBR compatibility support.

I may later experiment with ways of having a hybrid system — one that can boot in either MBR mode or UEFI mode.

I’ll also note that there is a lot of variation between support for UEFI by various computer vendors.  What I have decribed above worked well with my Dell Inspiron 660.  It might not work for you.  If the first reboot does not work, you might try going to rescue mode (booted from install media).  Mount the EFI partition of that external drive, and then do the equivalent of the final adjustments described above.  That should make your system bootable via the BIOS boot selection.


Tags: , , ,

About Neil Rickert

Mathematician and computer scientist who dabbles in cognitive science.

Trackbacks / Pingbacks

  1. UEFI and MBR bootable | Thoughts on computing - 2013/12/29

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: