mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Colin Guthrie <gmane-D409yXkIzt2rnn0nCzrM/w@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [systemd-devel] [PATCH] build: lookup for the "mount" binary
Date: Thu, 31 Oct 2013 17:08:56 +0000	[thread overview]
Message-ID: <l4u2qu$geh$1@ger.gmane.org> (raw)
In-Reply-To: <5272746D.4080303-stAJ6ESoqRxg9hUCZPvPmw@public.gmane.org>

'Twas brillig, and Cristian Rodríguez at 31/10/13 15:17 did gyre and gimble:
> El jue 31 oct 2013 07:43:54 CLST, Harald Hoyer escribió:
>> On 10/30/2013 09:25 PM, Cristian Rodríguez wrote:
>>> El 30/10/13 15:34, Harald Hoyer escribió:
>>>> On 10/30/2013 07:27 PM, Cristian Rodríguez wrote:
>>>>> El mié 30 oct 2013 15:18:48 CLST, Tom Gundersen escribió:
>>>>>> On Wed, Oct 30, 2013 at 7:12 PM, Cristian Rodríguez
>>>>>> <crrodriguez-stAJ6ESoqRxg9hUCZPvPmw@public.gmane.org> wrote:
>>>>>>> Real executable might be in /usr and not in /bin
>>>>>>
>>>>>> I'm not against the patch, but the justification seems lacking...
>>>>>> Does
>>>>>> anyone actually do this? I.e., have a mount that is not symlinked to
>>>>>> by /bin/mount?
>>>>>
>>>>> I am not aware of anyone not having a symlink to /bin/mount.. however,
>>>>> when creating an initrd with dracut the symlink is not included (only
>>>>> the real binary is at /usr/bin/mount) and mounting stuff breaks.
>>>>>
>>>>> It is either this patch or I should send a patch to dracut instead :-)
>>>>>
>>>>> In any case, from my perspective this is the right thing to do anyway.
>>>>>
>>>>
>>>> Can you provide me the output of "dracut --debug -f test.img", so I
>>>> can see what
>>>> goes wrong?
>>>>
>>>> Normally dracut also installs the symlink.
>>>>
>>>
>>> Here is the debug log attached, this is dracut git HEAD.
>>>
>>> The resulting initrd drops you into the emergency shell because
>>> systemd is
>>> unable to find /bin/mount to mount /sysroot.
>>>
>>> Workaround to continue boot is to create the symlink and exit or a
>>> adding
>>> band-aid hack to
>>> http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/modules.d/99fs-lib/module-setup.sh
>>>
>>> just before inst_multiple -o $_helpers fsck to force installation of
>>> mount as
>>> /bin/mount , clearly not the right thing to do ;-)
>>>
>>
>> dracut-install: Handle 'mount'
>> dracut-install: PATH=/usr/sbin:/sbin:/usr/bin:/bin
>> dracut-install: stat(/usr/sbin/mount) != 0
>> dracut-install: stat(/sbin/mount) != 0
>> dracut-install: find_binary(mount) == /usr/bin/mount
>> dracut-install: dracut_install '/usr/bin/mount'
>> dracut-install: dracut_install('/usr/bin/mount', '/usr/bin/mount')
>> dracut-install: dracut_install ret = 0
>> dracut-install: cp '/usr/bin/mount'
>> '/var/tmp/initramfs.pRJ2ZL/usr/bin/mount'
>> dracut-install: dracut_install ret = 0
>> dracut-install: dracut_install '/usr/bin/mount' OK
>>
>>
>> So, the PATH dracut uses is PATH=/usr/sbin:/sbin:/usr/bin:/bin.
>> dracut-install finds a real mount at /usr/bin/mount.
>>
>> So, you are saying, that you have a symbolic link pointing:
>>
>> /bin/mount -> /usr/bin/mount
>>
>> ??
> 
> Yes /bin/mount -> /usr/bin/mount .
> 
> 
>> What we might can do, is search _all_ components of PATH for the
>> binaries and
>> install everyone of them.
> 
> That will be cool. because there is the same problem with the following
> binaries
> 
> setfont, loadkeys, blkid and mount.

As a semi-hack, can you not just run the convertfs.sh script included in
dracut before doing the final compress?

Wouldn't this "fix" the problem too?

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

      parent reply	other threads:[~2013-10-31 17:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1383156754-30935-1-git-send-email-crrodriguez@opensuse.org>
     [not found] ` <CAG-2HqUcQy8DK_W5w974+cWAKFc8p0fe7rimy0FEqDMZwW0sXg@mail.gmail.com>
     [not found]   ` <52714F7A.7070600@opensuse.org>
     [not found]     ` <52715138.7030001@gmail.com>
     [not found]       ` <52716B30.6080204@opensuse.org>
2013-10-31 10:43         ` [PATCH] build: lookup for the "mount" binary Harald Hoyer
     [not found]           ` <5272346A.9040300-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-31 15:17             ` [systemd-devel] " Cristian Rodríguez
     [not found]               ` <5272746D.4080303-stAJ6ESoqRxg9hUCZPvPmw@public.gmane.org>
2013-10-31 17:08                 ` Colin Guthrie [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='l4u2qu$geh$1@ger.gmane.org' \
    --to=gmane-d409yxkizt2rnn0nczrm/w@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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