build: lookup for the "mount" binary
Quoted 28 lines · Cristian Rodríguez
Quoted 16 lines · Harald Hoyer
Quoted 15 lines · Cristian Rodríguez
Quoted 7 lines · Tom Gundersen
Quoted 1 line · Cristian Rodríguez
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 :-)
Quoted 8 lines
Quoted 2 lines
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.
Quoted 9 lines
The resulting initrd drops you into the emergency shell because systemd is unable to find
/bin/mountto 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 beforeinst_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
??
Otherwise dracut would have installed the symbolic link and the file it points to.
What we might can do, is search _all_ components of PATH for the binaries and install everyone of them.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Quoted 52 lines · Harald Hoyer
Quoted 28 lines · Cristian Rodríguez
Quoted 16 lines · Harald Hoyer
Quoted 15 lines · Cristian Rodríguez
Quoted 7 lines · Tom Gundersen
Quoted 1 line · Cristian Rodríguez
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 :-)
Quoted 8 lines
Quoted 2 lines
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.
Quoted 9 lines
The resulting initrd drops you into the emergency shell because systemd is unable to find
/bin/mountto 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 beforeinst_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_installret = 0
dracut-install: cp '/usr/bin/mount' '/var/tmp/initramfs.pRJ2ZL/usr/bin/mount'
dracut-install:dracut_installret = 0
dracut-install:dracut_install'/usr/bin/mount' OK
Quoted 8 lines
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 .
Quoted 2 lines
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.
--
"Judging by their response, the meanest thing you can do to people on the Internet is to give them really good software for free". - Anil Dash
'Twas brillig, and Cristian Rodríguez at 31/10/13 15:17 did gyre and gimble:
Quoted 72 lines · Harald Hoyer
Quoted 59 lines · Cristian Rodríguez
Quoted 34 lines · Harald Hoyer
Quoted 17 lines · Cristian Rodríguez
Quoted 16 lines · Tom Gundersen
Quoted 8 lines
Quoted 1 line · Cristian Rodríguez
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 :-)
Quoted 9 lines
Quoted 2 lines
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/mountto mount /sysroot.Quoted 9 lines
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.shjust 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_installret = 0
dracut-install: cp '/usr/bin/mount' '/var/tmp/initramfs.pRJ2ZL/usr/bin/mount'
dracut-install:dracut_installret = 0
dracut-install:dracut_install'/usr/bin/mount' OKQuoted 8 lines
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.
Quoted 8 lines
Quoted 3 lines
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
Signature · 10 lines
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/