Background

I'm setting up a new build, with all new hardware, tabula rosa. I want to have multiple Linux installations and common data partitions.

From what I'e gathered so far, using new hardware and up-to-date kernels, I should be able to use rEFInd as a simple boot manager and use a fully modern boot process.

I've read Rod's general instructioms, but I need some more specific advice.

Question

Since disk partition editors tend to "helpfully" hide the EFI partition, how can I set that up on a new unformatted disk?

With gparted 0.16.1, I created a gpt type partition table. But, there's no indication that this is the case: the display looks no different than before or a legacy partion table in place. So did it do anything? The New partition command gives no options for the special EFI reserved partition, so did it do that automatically too? screenshot

Constraints and Assumptions

There is no existing OS, and no optical drives. Assume that any existing contents on the ssd should be blown away (junkware from the manufacturer or previous attempts to partition). I'm booting UBCD from a USB thumbdrive, so using gparted or other tools included in the Partion Magic image would be easiest.

Once I have a proper GPT disk with the special EFI partition, I'm comfortable using gparted etc. for addional partions, as I've done as long as there have been PC's with HDD's.

  • 1
    I'm not sure that I do see a clear question here. You said a lot about what you intend to do, but it sounds like you haven't tried to do anything. The partition table in the example you link is pretty straightforward. What specifically is it you do not understand? – goldilocks Mar 14 '15 at 13:13
  • The question is highlighted, using italics. Woukd bold-italic be better? SE doesn't have a large-font or colored option. – JDługosz Mar 14 '15 at 13:16
  • I tried gparted and found the option to create gpt, but (1) it didn't seem to do anything, and (2) I don't see any efi partition or how to make it in another step, amd (3) Mint's installer crashed, so it must not have been right. – JDługosz Mar 14 '15 at 13:23
  • I saw the italics -- but it does not make a lot of sense unless you explain why you have been unable to do this -- the easiest way to do that is to explain what you actually tried and what actually happened. Otherwise people have to guess where you're at and are disinclined to go through "Oh no I did that already", etc. Anyway, if you want to create a GPT disk, start with fdisk and use the g option. Then you create the partitions, including the EFI one. I'd leave gparted out of this if you can't get it to work. – goldilocks Mar 14 '15 at 13:34
  • Re the gparted screenshot: Primary vs. logical/extended partitions are characteristics of MBR based drives. Because the MBR table is only big enough to reference 4 primary partitions, if you want more you must make one a "logical partition" which is really just another table holding references to "extended partitions" (which are normal, but possibly not bootable). GPT drives don't have this limitation. So if you only have the choice to create primary partitions, it's likely a GPT context. The EFI partition is a normal one, just it's small, has a special label, and no filesystem. – goldilocks Mar 15 '15 at 12:32
up vote 3 down vote accepted

Current util-linux versions of fdisk support GPT, the one I'm looking at here is fdisk from util-linux 2.24.2 (reported via fdisk -v).

Run fdisk /dev/whatever. Have a look at the options with m. Note these change depending on the state of the partition table. First check what state the disk is currently in with p. Note the Disklabel type; if it is gpt you don't have to do anything, you can delete the existing partitions and start creating your own.

If not, use the g option. This will eliminate any existing partitions because fdisk does not convert the MBR table. You can now start adding partitions with n. For the EFI partition, use t to set the type to 1, then the table should read, e.g.,

 Device    Start          End   Size Type
 /dev/sdb1   256    122096640 465.8G EFI System

Obviously that's a bit silly, but hopefully the point is clear. None of your changes take effect until you use w and exit.

  • Thanks for the clear answer. The fdisk on the parted magic image is 2.23.2 so the menu was a little different, but I got it created and then set to the right type. I looked again in GParted and formatted as fat32 there. GParted doesn't show anything concerning the type anywhere, and (looking again with fdisk) did not mess it up either. – JDługosz Mar 15 '15 at 9:58
  • It's especially unclear because fdisk's m help does not list everything, and is missing p and t in particular. It shows when I tested it in a VM. On the real machine, it adds a warning that GPT is experimental, and doesn't show the same options. I think the difference might be the EFI bootware? (I had to boot with BIOS in the VM since VMWare's UEFI has no fallback to legacy bootable media. – JDługosz Mar 17 '15 at 10:52
  • Hmmph. Well GPT is a pretty recent addition to fdisk, I don't know when the "experimental" warning was removed (because I remember seeing it, but then a while back noticed it wasn't there -- that could happen in one minor version 2.23 -> 2.24). The p and t options should definitely be there or something is very very wrong. That's part of the base functionality, unless maybe it thinks it cannot figure the device out at all and is refusing to mess with it. I haven't used it via VM's much, so...different issue? – goldilocks Mar 17 '15 at 14:27
  • WRT "EFI bootware" those answers on the Super User Q state pretty clearly the partition isn't actually used for firmware, just OS bootloaders -- if that's what you mean. I.e., if VMWare implements UEFI it should work without having seen the disk before (otherwise you have a chicken - egg problem). Another stupid thing that should be well documented somewhere obvious but perhaps is not. >_< – goldilocks Mar 17 '15 at 14:32
  • The VMWare 11 machine with legacy BIOS showed the full list of options. The real Supermicro X10-SAT with the same UBCD/partionMagic boot image was missing those two options at the least, and showed a warning. – JDługosz Mar 17 '15 at 18:09

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.