So this is a sister question to my previous one about partitioning for a UEFI boot loader. Parititioning for a UEFI boot loader, can LVM be used?

Disclaimer: I don't give a flip about the data on it. Windows 8 can die in a fire.

Following instructions I have a single 400MB device that I think was previously a 'Microsoft Reserved' partition of some kind (I believe it was an MBR partition?). Before I realized what I had to do I deleted the existing partition with the fdisk utility and created an MBR partition with an ext4 filesystem and rebooted for changes to take effect.

I then realized that this won't work for the UEFI firmware, a firmware so hipster and awesome that it just has to be different in every way. I went into gdisk this time and searched for partitions, it found none. I created a new GUID partition on this 400MB device with the proper EFI type code EF00 I believe. This appeared to be successful so I made a FAT32 filesystem on it, mkfs -t fat32 /dev/sda1 and this was successful.

I followed all the instructions to install Arch Linux from the bootable Installation CD that happened to boot in UEFI mode I might add. I got to the point where I installed gummiboot on the system and it immediately informed me that my device sda1 is not a proper EFI partition. Thoroughly confused I did a gdisk -l on the device and found that it identified the GPT partition is damaged and the MBR partition still exists.

 Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: damaged

It then presented three options, MBR, GPT or clean GPT. I chose GPT thinking it would remove the MBR partition tables but it doesn't make a difference.

Realizing I am beyond my knowledge at this point and have no clue how to create a proper GPT partition from an existing MBR partition, I ran a Quick Analyse on testdisk and everything looks good and green. The testdisk utility recognizes this as a proper EFI bootable partition in every respect.

I would like to repair the GPT partition if possible so I can avoid all of the installation and customization steps of starting over in my Arch installation. If this is not possible and I have to destroy this partition and start over is there a way I can save the data that was already installed here and manually add it back after I have fixed the boot partition?

  • Did you try the verify or repair commands in gdisk? Don't forget to write the changes after making repairs. – psusi Dec 16 '14 at 14:46
  • The 400MB partition was probably your EFS, which had all of the information (like .efi files) for your UEFI to load the OS's. Try using sgdisk again on the partition you have already set up. Usually size is 512MB though. (I can't remember why exactly, I think it may be arbitrary) – No Time Dec 16 '14 at 16:00
  • @psusi I feel like I tried this and nothing happened. Maybe I forgot to write changes after making repairs? I will try again when I get home tonight. – maple_shaft Dec 16 '14 at 17:54
  • After attempting to repair boot partitions and several more installs and failed Grub installation attempts, I got fed up and scorched earth the damn SSD. After zero filling everything it seems like everything is working fine now. The boot loader actually installed correctly now! I blame Microsoft. – maple_shaft Dec 17 '14 at 14:18

Quoting the Ubuntu UEFI Community Wiki. The same Rules apply regardless of Distribution.

Creating an EFI partition

If you are manually partitioning your disk in the Ubuntu installer, you need to make sure you have an EFI partition set up.

  1. If your disk already contains an EFI partition (eg if your computer had Windows8 preinstalled), it can be used for Ubuntu too. Do not format it. It is strongly recommended to have only 1 EFI partition per disk.
  2. An EFI partition can be created via a recent version of GParted (the Gparted version included in the 12.04 disk is OK. Note: I've included a link to the GParted LiveCD), and must have the following attributes:

    • Mount point: /boot/efi (remark: no need to set this mount point when using the manual partitioning, the Ubuntu installer will detect it automatically)
    • Size: minimum 100Mib. 200MiB recommended.
    • Type: FAT32
    • Other: needs a "boot" flag.

See this screenshot, which will give you an idea for layout. (Notice /dev/sda1, I apologize for relying on Ubuntu shots again.) You may create this partition by resizing your arch install if need be. This is also a layout for OSX, so if you want to dual boot with Win8, you would combine sda2 and sda3 from the screenshot below into 1 partition of type ntfs, and then sda4, sda5, and sda6, would be used for Arch.

GParted Partition Map with UEFI


Regarding LVM

I believe LVM can be used, but experience would dictate that the EFI partition and mount point you create cannot exist inside a volume group, nor should it exist as a volume. In order to keep your EFI partition "clean," create a partition that isn't part of any LV.

  • Please read my comment on the question. Thanks for your help. This answer was informative but I eventually had to give up and zero fill the drive. – maple_shaft Dec 17 '14 at 14:19
  • @maple_shaft I hate that you had to lose all the data, but I hope my answer helped afterwards – eyoung100 Dec 17 '14 at 15:53

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.