On Fri, Jun 07, 2002 at 04:13:11AM +0200, Andreas Bombe wrote: > On Thu, Jun 06, 2002 at 08:45:13PM -0500, Steve Langasek wrote: > > On Fri, Jun 07, 2002 at 03:32:57AM +0200, Andreas Bombe wrote: > > > In short, when booting an initrd, after the pivot_root a chroot has to > > > be done into the new root. If /usr is on a separate partition, chroot > > > isn't available, boot fails. > > > > With what kernels must you do a chroot after pivot_root? On systems > > where I'm using pivot_root + Linux 2.4.18, I only have to do 'cd /'. > I'm just going by the Documentation/initrd.txt in the Linux sources > (I looked in 2.4.18 here). pivot_root(1) also recommends a chroot. > In any case much is implementation defined (like whether the shell's > root is implicitly changed), so it's better to stick to the protocol. > It might change, and a simple cd might not be sufficient anymore. > Anyway, can you umount the initrd if you only did a 'cd /'? Well, no, because the script itself, if still running, has files open on that device: the executable and all the libraries it loads. You have to exec a different program/script on your main root in order to free up the mount point, IIRC. Steve Langasek postmodern programmer
Attachment:
pgpA2Y4vRSZBE.pgp
Description: PGP signature