[lkml]   [2000]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] root-hopping for pre-2.3.41-3
On Wed, 26 Jan 2000, Horst von Brand wrote:

> said:
> > H. Peter Anvin wrote:
> > > I therefore conclude that doing automatic stuff is pointless and
> > > probably harmful. The recommended sequence for root-switching will
> > > then look something like (error checking omitted):
> > Looks nice, but doesn't quite work. Think of the kernel threads. Some
> > of them follow init, but things like rpciod and lockd don't. And there
> > are probably plenty of others (USB ? msp3400 ? etc.).

The current change_root() works and doesn't bother the kernel threads.
Rpciod sleeps until portmap is up (much later in the boot-sequence),
and the lock-daemon isn't involved until after the real init is started.

> I'd say go with the proposal of the fake root/cwd directory for kernel
> threads that don't need access to the filesystem (all of them, I
> guess). Cleanest way out, unless you allow them to live without root/cwd.
> --
> Dr. Horst H. von Brand
> Departamento de Informatica Fono: +56 32 654431
> Universidad Tecnica Federico Santa Maria +56 32 654239
> Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

Most if not all of the use of "root-hopping" occurs upon startup
where a single statically-linked shell executes statically-linked
'insmod' to prepare for the new root. The real init starts with
the new root and never even knows about any previous.

Even if the boot-root is via NFS, once the real init is started with
the new root, anything remaining "under" that root will go away
because NFS is stateless. Purists can umount the old NFS root
during SYSV startup if /proc contains the correct alias, i.e.
if the boot-server root was "server:/boot/root", you can
`umount server:/boot/root` without touching the current root
mounted over it.

Now, if somebody expects to "root-hop" once the system is up
with mapped shared-libraries, etc., they are in a world of hurt.
That's not what changing the root was all about. If you intend
to make root-hopping take on a new meaning and cover all the
cases of changing the root of a "hot" operating system, it's
going to be a lot of code to do not much that's useful in the

Dick Johnson

Penguin : Linux version 2.3.39 on an i686 machine (800.63 BogoMips).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:56    [W:0.063 / U:17.208 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site