mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Victor Lowther <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kay Sievers <kay.sievers-tD+1rO4QERM@public.gmane.org>
Subject: Re: [PATCH 1/4] Move actually mounting the root filesystem into its own series of hooks.
Date: Thu, 26 Feb 2009 13:20:22 +0100	[thread overview]
Message-ID: <20090226122022.GA6639@nb.net.home> (raw)
In-Reply-To: <40b7db44cbcb49b1fb50445d786cd4851adba14a.1235615253.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Wed, Feb 25, 2009 at 06:32:36PM -0800, Victor Lowther wrote:
> We now have mount hooks.  They are sourced in an infinite loop until one of
> them actually mounts the real root filesystem.
> 
> This makes it easier to add support for arbitrarily complex schemes to find
> the root filesystem without having to patch the init script.
> 
> This patch series is also avaialble ass the hookify-finding-root branch at 
> http://git.fnordovax.org/dracut
> 
> ---
>  hooks/mount-partition.sh |   30 ++++++++++++++++++++++++++++
>  init                     |   49 ++++++++++++++++-----------------------------
>  modules/90crypt.sh       |    2 +-
>  modules/99base.sh        |    4 +-
>  4 files changed, 51 insertions(+), 34 deletions(-)
> 
> diff --git a/hooks/mount-partition.sh b/hooks/mount-partition.sh
> new file mode 100755
> index 0000000..53a0f4c
> --- /dev/null
> +++ b/hooks/mount-partition.sh
> @@ -0,0 +1,30 @@
> +#!/bin/sh
> +[ "$root" ] || {
> +    root=$(getarg root); root=${root#root=}
> +    case $root in
> +	LABEL=*) root=${root#LABEL=}
> +            root="$(echo $root |sed 's,/,\\x2f,g')"
> +            root="/dev/disk/by-label/${root}" ;;

 Note that this is probably not a proper way how to encode a label
 string. I guess that LABEL= option (e.g. from grub.conf) is in human
 readable format (like in /etc/fstab). The mount(8) also supports
 quoted LABELs and UUIDs (e.g. LABEL="foo").

 Currently we don't have a command line util that supports all these
 features, the problem should be fixed in the next util-linux-ng
 release by blkid(8).
 
    Karel

-- 
 Karel Zak  <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2009-02-26 12:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26  2:32 [PATCH 1/4] Move actually mounting the root filesystem into its own series of hooks Victor Lowther
     [not found] ` <40b7db44cbcb49b1fb50445d786cd4851adba14a.1235615253.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-26  2:32   ` [PATCH 2/4] Modify getarg to be slightly more useful Victor Lowther
2009-02-26  2:32   ` [PATCH 3/4] Trim out device nodes we do not have to actually create Victor Lowther
2009-02-26  2:32   ` [PATCH 4/4] Add some predefined break points Victor Lowther
     [not found]     ` <43ca8d3a8aed54367069b23fc43720cbf5517ec0.1235615253.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-26 14:04       ` Bogdan Costescu
     [not found]         ` <Pine.LNX.4.64.0902261501070.2766-qcrbbFV08EMdmw7VdWMmteH3J2bgQ+4lG9Ur7JDdleE@public.gmane.org>
2009-02-27 17:15           ` Victor Lowther
     [not found]             ` <1235754943.6445.3.camel-76q0VzFBGGr21HsLBtNmTckMGDeJXHgy@public.gmane.org>
2009-03-01 15:07               ` maximilian attems
     [not found]                 ` <20090301150733.GA12608-U9r9yeDMy7A@public.gmane.org>
2009-03-01 15:56                   ` Thiago Galesi
2009-03-01 20:02                   ` Victor Lowther
2009-02-26 12:20   ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090226122022.GA6639@nb.net.home \
    --to=kzak-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kay.sievers-tD+1rO4QERM@public.gmane.org \
    --cc=victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox