You are not logged in.

#1 2013-07-21 21:56:09

slackcub
Member
Registered: 2009-03-14
Posts: 144

UEFI/GPT installation with raid and LVM.

I recently acquired a new system and I hope to be creating a UEFI/GPT Grub install. In this system I have 3 500GB drives that I was wanting to use raid on them.  Upon looking around, I found this article on the wiki, Software RAID and LVM, and will be following what it says.  I have an Asus M5A97 based motherboard, and I did see the entry for it on the GRUB EFI examples wiki entry.

Now I do know that you need a separate partition for EFI, and for GPT.

Here's my question:  Will I need separate partitions for EFI, GPT, and /boot? If so, what sizes would be appropriate?  That's the most elusive information so far.  Also, what adjustments would I need to make to that RAID/LVM wiki entry?  Any pitfalls I need to watch out for?

Thank for any help I can get!

David

Offline

#2 2013-07-21 23:35:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: UEFI/GPT installation with raid and LVM.

GPT is a kind of partition map - an alternative to MBR. I suggest reading the wiki information on GPT and, especially, UEFI before you start this.

So you don't make a partition for GPT. GPT is the partition table which tracks all of your partitions.

Your EFI partition must be at least 512M.

You do not need a separate partition for /boot though you could use one if you wished. Many people here now mount their EFI partition at /boot and obviously in that case you definitely don't want a separate /boot partition as it would be pointless. So if you have a separate /boot, you'll want to mount the EFI partition somewhere else. (/boot/efi is standard.)

As to how big it just depends on what you are planning to do with it - how many kernels, how many boot managers/loaders, how many OSs etc.

I don't know about RAID but the section on installing boot loaders is out of date and almost certainly not what you want to do. (Grub legacy, for example, won't boot in EFI mode and syslinux has support for EFI which is still experimental. I assume you intend to use grub 2 since you mention grub and obviously that's different.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-07-21 23:45:43

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: UEFI/GPT installation with raid and LVM.

You will need a separate EFI System Partition, can it cannot be RAIDed.  Your ESP can be /boot if you want it to be, as most bootloaders/bootmanagers for UEFI want the kernel and initramfs to be on the ESP.  But rEFInd for example has a few included filesystem drivers that can read a kernel off of another partition.  This would be why you would put the ESP at /boot/efi, as that way the path of the installed kernel is still on a Linux filesystem.

GPT is the partition table.  It is not a partition itself.  So it would be used in place of ms-dos (MBR) partitioning.  It is not supposed to be required for UEFI, but sometimes firmwares are picky and won't function w/o a combination of MBR/ms-dos or GPT/UEFI, but this is not typical.  To use GPT, you would use gptfdisk (gdisk) instead of the traditional fdisk.  Parted also has the capabilities of doing both types of partitioning, but I have found it to be a bit of a PITA compared to the previously mentioned tools.

Offline

#4 2013-07-22 00:48:50

slackcub
Member
Registered: 2009-03-14
Posts: 144

Re: UEFI/GPT installation with raid and LVM.

Thanks for the response. I just put Arch on my work laptop, and I needed a boot partition for the GPT drive, but I realize now that's because it was booting in BIOS mode not UEFI. 

So it looks like I'm looking at making /dev/sda1 as a 1 GB ESP (will need to read up on exactly how grub2 will do this).  I'll create sd[bc]2 as 1GB swap partitions (put together as RAID 1) just to keep things symmetrical, and use sd[abc]2 as a RAID 5, then intstall LVM on that array to make it more flexible in partitioning.

So I guess my only question at the moment is are there any pitfalls I need to watch for when installing grub on the ESP?

David

Offline

#5 2013-07-22 02:15:08

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: UEFI/GPT installation with raid and LVM.

Honestly, I think grub-efi is a PITA.  But you can have as many efi applications (bootloaders/boot managers) that you want on that ESP.  So for example, I have gummiboot, rEFInd, elilo, syslinux-efi, and grub2-efi right now... well my grub2-efi isn't really maintained.  But I primarily use gummiboot.  Gummiboot and rEFInd aren't actually bootloaders but rather, boot managers. That is they don't load the kernel and initramfs.  Instead, they simply launch other efi applications.  The kernel itself can be used as an efi application as of v3.3 and the inclusion of CONFIG_EFISTUB.  IMO, the efistub loader (combined with a boot manager) is the most elegant way to go about things.

It should be noted though that there have been reports of issues with efistub since ~3.7.  That is, it won't boot some machines.  But for those that it works for, it works just fine.  Of course, you can always have a backup bootloader like grub2-efi available.

Offline

#6 2013-07-22 02:35:08

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: UEFI/GPT installation with raid and LVM.

WonderWoofy wrote:

It should be noted though that there have been reports of issues with efistub since ~3.7.  That is, it won't boot some machines.  But for those that it works for, it works just fine.  Of course, you can always have a backup bootloader like grub2-efi available.

Most of the problem reports involve Lenovo machines. (There have also been problem reports with Macs, but those seem to have been a different problem, and I'm pretty sure they were fixed with 3.9 or 3.10 -- certainly a 3.10.0 kernel boots fine on my own ancient 32-bit Mac Mini.)

Offline

Board footer

Powered by FluxBB