Re: How to supervise an early process [root pivot]

From: Martin \ <et.code_at_ethome.sk>
Date: Tue, 21 Jun 2016 17:41:52 +0200

On Tue, 21 Jun 2016 15:18:38 +0000
Charles Duffy <charles_at_dyfis.net> wrote:
> Couldn't one play with bind mounts to keep the absolute paths consistent on
> both sides of the pivot operation?

Well I decided to accept "don't do that" approach. Also bind mounts are Linux
specific. My main area of interest is s6 on my FreeBSD systems, but I try
to understand Linux side of things as well.

More over, I looked up once again FreeBSD pivot_root like thing.

It is apparently called "reroot". It seems already present on my testing
system.

Info from reboot manpage implies that reroot kills even init:
  -r The system kills all processes, unmounts all filesystems, mounts
     the new root filesystem, and begins the usual startup sequence.
     After changing vfs.root.mountfrom with kenv(8), reboot -r can be
     used to change the root filesystem while preserving kernel state.

This means Linux style pivot_root doesn't even happen, rerooted init gets
clean state which seems much better even.

Also although FreeBSD has nullfs mounts, those are not exactly same as Linux
bind and it seems it doesn't need (*)dev helper at all. It appears to me,
that /dev is always populated by kernel beforehand.

"Don't do that" makes sense under these conditions.

  eto
Received on Tue Jun 21 2016 - 15:41:52 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC