[arch-general] Kpartx should be in the repos and archiso for enabling encrypted GPT install

Bruno Pagani bruno.n.pagani at gmail.com
Sun Jan 13 23:33:50 UTC 2019


Le 14/01/2019 à 00:22, Merlin Büge a écrit :
> On Sun, 13 Jan 2019 08:56:55 -0800 (PST)
> Neven Sajko via arch-general <arch-general at archlinux.org> wrote:
>
>> To mount a root GPT partition which resides on an encrypted disk, one
>> needs the kpartx tool to make the mapping for the partition (the
>> kernel does not independently make those for partitions on device
>> mapper maps, which is what a dm-crypt decrypted device is). Thus
>> kpartx needs to be on the Archlinux installation ISO to enable that
>> kind of setup.
> Hi,
>
> I'm not sure this is applicable to your setup (I'm tired right now but
> skimmed the hole thread), but I'm using a root GPT inside a LUKS
> container. To make the kernel aware of the partitions at boot, I run
> partprobe (part of parted) on the opened LUKS mapping device:
>
> $ cat /etc/initcpio/install/partprobe 
> #!/bin/bash
>
> build() {
>     add_binary partprobe
>     add_runscript
> }
>
> help() {
>     cat <<HELPEOF
> This custom hook scans a mapped LUKS container for GPT partitions and
> informs the OS kernel about them.
> HELPEOF
> }
>
> $ cat /etc/initcpio/hooks/partprobe 
> #!/usr/bin/ash
>
> run_hook() {
>     partprobe /dev/mapper/matrix_vol
> }
>
> Works fine for me. Sorry if I'm missing the point here.
>
> Kind Regards,
> Merlin

This is interesting, partprobe seems to be an even lighter alternative.

Once again, the wiki is eager for more scenarios. ;)

Regards,
Bruno


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20190114/8866f43c/attachment.asc>


More information about the arch-general mailing list