LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Suse/Novell (http://www.linuxquestions.org/questions/suse-novell-60/)
-   -   Do I Need a Special UEFI Boot Partition? (http://www.linuxquestions.org/questions/suse-novell-60/do-i-need-a-special-uefi-boot-partition-4175430310/)

joncr 10-03-2012 11:44 AM

Do I Need a Special UEFI Boot Partition?
 
Attempting an install of OpenSuse 12.2 from the Gnome LiveCD onto a UEFI machine with a 3TB GPT drive flagged for boot via parted.

Simple partitioning: Swap and "/".

On the initial boot at the end of the install, I get "error: no active partition".

Do I need to create a tiny FAT32 partition as the first partition on /dev/sda and mark it for boot to keep UEFI happy? If so, do I need to tell the installation routine to format it?

ruario 10-05-2012 02:54 AM

Yes, you need a EFI System partition (ESP) to boot using UEFI because that is where the bootloader is stored on UEFI based systems. You aren't marking it as bootable in the MBR sense because you won't be using MBR but rather GPT. You mark it specifically as being the ESP. If you use GPT fdisk this is done by using the partition type code EF00.

All that said, I would install from the install DVD, rather than the LiveCD. The install DVD is UEFI aware and should do all of this for you.

joncr 10-05-2012 07:41 AM

Quote:

Originally Posted by ruario (Post 4797837)
Yes, you need a EFI System partition (ESP) to boot using UEFI because that is where the bootloader is stored on UEFI based systems. You aren't marking it as bootable in the MBR sense because you won't be using MBR but rather GPT. You mark it specifically as being the ESP. If you use GPT fdisk this is done by using the partition type code EF00.

All that said, I would install from the install DVD, rather than the LiveCD. The install DVD is UEFI aware and should do all of this for you.

Thanks. I'll remember that EF00 code.

I had no luck with the DVD. It would boot, correctly, into the ELILO prompt, load the kernel, and then stall out with a black screen and flashing cursor. (I have anNvidia card. Booting without nomodeset has produced that in the past, but I couldn't find a way to add a parameter to the ELILO boot off the DVD.)

If I set the BIOS to boot the DVD in non-EFI mode, it booted to the usual graphical install routine. If I let the partitioner do things automatically, it created a 20Gb "/" partition and a 50Gb Home, on a 3TB drive, and then put a 2Gb swap (the machine has 16Gb memory) in sda1. None of the partitions could be resized. Manual partitioning was fine, but the "no active partition" error appeared at the initial reboot.

Workaround: I stuck a second drive in the machine and boot off that, with the rest of the filesystem spread across the large drive.

Installers in distributions targeting the mainstream, which I assume includes OpenSuse, need to get smarter about partitioning and boot loaders. Typical users can't be expected to know about UEFI, GPT, MBR, etc. They'll just assume Linux is broken.

ruario 10-05-2012 08:36 AM

Quote:

Originally Posted by joncr (Post 4797980)
If I set the BIOS to boot the DVD in non-EFI mode, it booted to the usual graphical install routine. If I let the partitioner do things automatically, it created a 20Gb "/" partition and a 50Gb Home, on a 3TB drive, and then put a 2Gb swap (the machine has 16Gb memory) in sda1. None of the partitions could be resized. Manual partitioning was fine, but the "no active partition" error appeared at the initial reboot.

Hmm ... yes that is an odd choice! I wonder if since you booted the LiveCD in BIOS emulation mode (a.k.a. non-EFI mode) the installer tries to do MBR partitioning which will fail on a drive that large. You basically have to do GPT (and you definitely have to do GPT if you want to use EFI for booting rather than BIOS emulation).

What I would do is make sure you have a GPT partition scheme (use any live media that works or put the disk in another drive first) and make sure you have the ESP and any other partitions your require.

When you install again it may work or it may fail because the installer tries to configure Grub2 for MBR. If that happens boot from Live media again and configure the ESP to use ELILO as a boot loader by hand. This will get you up and running and from there you can work out what to do with Grub2

I wrote the current SlackDocs page on UEFI installation. Much of it is obviously Slackware specific but it does include instructions on how to setup ELILO. You could probably tweak these to your requirements:

http://docs.slackware.com/howtos:sla..._uefi_hardware

TIP: If using ELILO make your ESP at least 50Mb and ideally more (since you have such a big drive I would go for 200Mb). This will give you space for the kernel, initrd and configuration files. All of which need to be placed on this partition.

Also this page is absolutely awesome for understanding how EFI booting works (or should work) on Linux:
http://www.rodsbooks.com/efi-bootloaders/

joncr 10-05-2012 09:15 AM

Quote:

Originally Posted by ruario (Post 4798006)
What I would do is make sure you have a GPT partition scheme (use any live media that works or put the disk in another drive first) and make sure you have the ESP and any other partitions your require.

I tried two approaches. I shelled out and set up a GPT table with no partitions, as well as a GPT table with partitions. Same behavior. I didn't know about the EFOO flag, though. Everything is fine if the drive is partitioned as MSDOS, but, of course, that takes away the 3TB. (Still, it's been my experience on a number of distributions that, for both GPT and MSDOS drives, when the install routine creates the partition that will be the boot partition, is does not add the correct boot flag. As a result, the new system fails at the first boot. Sometimes an error message is visible, sometimes it isn't. I don't know if that flag isn't set due to a technical limitation, or because of what seems to be a universal assumption that the disk Linux is being installed on already has Windows on it.)

On the other hand, since the DVD repeatedly failed to boot when the machine was in EFI mode, I have to think something's wrong there.

Thanks very much for the links. I will check them out. I used Slackware for a very long time.


All times are GMT -5. The time now is 07:15 PM.