[arch-general] Installation: How to get HDD > LUKS > GPT working in a clean way

Yaro Kasear yaro at marupa.net
Mon Nov 28 02:23:26 UTC 2016


On 11/27/2016 08:09 PM, Merlin Büge wrote:
> Hi Yaro,
>
>
> thanks for your answer!
>
>
>> I'd set up two partitions: Your EFI system partition and the LUKS
>> container. Then inside LUKS, format the whole thing as LVM and then set
>> up from there, rather than make the LUKS container another GPT "disk."
>> Then you just use the crypt and lvm2 hooks.
> I have no EFI system partition because I don't need one.
>

My mistake. I assumed you had a typical UEFI setup, which would require one.

>> You should only really use partition tables on a physical disk, in my
>> opinion, not a LUKS container.
>>
>> The reason for this is that LVM works with a lot more flexibility and is
>> more readily automated than trying to get the system to re-read
>> partition tables.
> Hm. I can see your points. But I don't need the flexibility LVM provides,
> I have enough flexibility through Btrfs.
> And yeah, it's readily automated, and that's indeed practical for many
> people. Personally, I'd rather modify the start-up process a tiny bit
> so that GPT inside LUKS gets parsed. I just try to strip off unnecessary
> 'overhead' / layers of my system.
Okay, then.

Here's my opinion on this approach.

If you have 8 GiB or more and not hibernating, don't bother with swap, 
it'd be a waste of disk space. In that case you could just put a btrfs 
volume straight on the LUKS container without the GPT. Problem solved as 
you don't need any more volume management than opening LUKS containers.

Otherwise WITH swap: Unfortunately btrfs (still) doesn't support swap 
files properly, otherwise I'd suggest using them. You can write a custom 
hook. Unless you plan to share it, I'd make it a dead simple shell 
script that simply reruns the command to scan for added GPT partitions 
for your specific setup. Make sure you have a setup hook that gets the 
dependencies in there.

Personally, I still think you should just use LVM, for the simple reason 
you're having trouble with GPT, which is not meant for being used like 
this, since it can work as a more flexible "partition table" inside the 
LUKS container and is better supported all around. btrfs really doesn't 
act as a good replacement for logical volumes, in my experience. Having 
something with more features than you need is better than trying to 
coerce something into working ways it's not really intended.

>
>> If you were on a system where you could add disks [...]
> Since it's on my laptop, I don't need that functionality :)
>
>
> Best Regards,
>
> Merlin
>
>


More information about the arch-general mailing list