Re: [PATCH] replace switch_root shell script with binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-03-04 at 13:54 +0100, Harald Hoyer wrote:
> The switch_root shell script did not work with bash-4.0-2, because
> "exec" gets the real path of the executable which is then
> "/sysroot/lib/ld-linux.so.2" instread of "./lib/ld-linux.so.2".

That is a little odd -- dash does not exhibit that behaviour.  

The only command that tries to use ./lib/ld-linux.so.2 is the final
chroot, and at that point /sysroot does not mean anything anymore
because of the move mount we did.  Is this a bug in bash we can work
around by setting $PWD?

> Also the required chroot binary might live in /usr/bin, which can
> be mounted later.

yeah, but /usr/sbin and /usr/bin are stupid places to have chroot, it is
a core utility anyways. :)

[ patch snipped ]

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux