Re: chroot in /usr and initrd booting
On Sun, Jun 09, 2002 at 01:03:34PM -0400, Michael Stone wrote:
> On Fri, Jun 07, 2002 at 03:32:57AM +0200, Andreas Bombe wrote:
> > I have filed #146208 against shellutils almost a month ago. It's about
> > the chroot binary being in /usr/sbin instead of /sbin and I didn't get any
> > reaction so far.
>
> I thought I responded. Oh well.
>
> This absolutely will not happen before woody is released.
I'd agree that just moving chroot to /sbin might not be the wisest idea
in freeze. However leaving a (admittedly ugly) symlink in /usr/sbin
should make this a relatively safe change.
> Long term, I'm not convinced it's necessary, since you could very easily
> copy chroot into your initrd; I haven't seen a compelling reason to make
> this change.
I'm using the following snippet in the linuxrc on my initrd (which is
the one recommended in pivot_root(1)):
cd /new_root
pivot_root . initrd
exec chroot . /sbin/init <dev/console >dev/console 2>&1
I do have chroot in the initrd, but the pivot_root moves it out of the
path on the current kernels. I could say "exec /initrd/sbin/chroot ..."
there, but then this wouldn't work when pivot_root doesn't change the
linuxrc root in a different implementation.
The problem is not having a chroot in initrd (which is recommended
anyway) but calling it without knowing its path. I worked around this
by copying a chroot executable into my root filesystem, alternatively
you could use some extra commands to find the chroot to use and then use
an absolute path.
I agree that it is not a critical problem, it only makes initrd built to
the recommendation not work on Debian with separate /usr. So you
couldn't just use externally provided or script generated initrd images
with Debian.
--
Andreas Bombe <bombe@informatik.tu-muenchen.de> DSA key 0x04880A44
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: