[arch-projects] [RFC initscripts 29/29] Skip cryptos tagged as %early

Tom Gundersen teg at jklm.no
Fri May 18 19:50:12 EDT 2012


On Fri, May 18, 2012 at 6:22 PM, Matthew Monaco <dgbaley27 at 0x01b.net> wrote:
> From: Matthew Monaco <matthew.monaco at 0x01b.net>
>
> We'll have the late hook in the initrd automatically map all volumes
> with an %early tag. Skipping them here is up for discussion though, as
> they should be skipped if they're mapped anyway.

I don't like this patch.

Actually, not sure if I like the %early tag in the first place (is
this the syntax other distro's use as well?). I don't think there is
any need for marking things as %early, the only time the initrd might
read the real crypttab is after the rootfs has been mounted, and then
it's only job is to set up whatever is needed to mount /usr. Or am I
missing some setup we want to support where the initrd can not figure
out which volumes to map? Notice that encrypting /usr is almost
entirely pointless, so we should be very hesitant to add syntax just
to  support this.

> What should the procedure be if we're in rc.sysinit, and an %early
> volume is not mounted for whatever reason?

Then we should set it up.

>  rc.sysinit |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rc.sysinit b/rc.sysinit
> index 270f384..be51dbb 100755
> --- a/rc.sysinit
> +++ b/rc.sysinit
> @@ -153,7 +153,7 @@ activate_cryptos() {
>  }
>
>  # Map any unmapped encrypted volumes in crypttab, non-random
> -activate_cryptos -O \!%random
> +activate_cryptos -O '!%early,!%random'
>
>  # Check filesystems
>  run_hook sysinit_prefsck
> @@ -190,7 +190,7 @@ status "Initializing Random Seed" load_random_seed
>  status "Storing new Random Seed" store_random_seed
>
>  # Map any unmapped encrypted volumes in crypttab, only random
> -activate_cryptos -O %random
> +activate_cryptos -O '!%early,%random'
>
>  status "Activating Swap" swapon -a
>
> --
> 1.7.10.2
>


More information about the arch-projects mailing list