reroot to ggate device

Mike Wolman mike at
Sat May 13 20:11:25 UTC 2017


I am trying to reroot to a ggate device something like:

    root@:~ # ggatec create -o rw /tmp/omega2-ggate-fs.img
    root@:~ # kenv vfs.root.mountfrom=ufs:/dev/ggate0
    root@:~ # reboot -r
    May 13 20:02:59  reroot: rerooted by root
    Stopping cron.
    Stopping devd.
    Writing entropy file:.
    Writing early boot entropy file:/etc/rc.shutdown: WARNING: write 
failed (read-only fs?)
    Trying to mount root from ufs:/dev/ggate0 []...

Obviously this doesnt work as init kills the ggate0 devices backend 
ggatec process when rerooting.

In init.c for reroot:

      error = kill(-1, SIGKILL);

 From kill (2) man page:

      If pid is -1:
              If the user has super-user privileges, the signal is sent 
to all
              processes excluding system processes (with P_SYSTEM flag 
set) ...

Is it possible to set a userland programs p_flag to P_SYSTEM somehow?

Or is it possible/sensible to edit init to accept a pid as an argument 
not to kill when rerooting?

Or is this just not feasible without hacking init as in this 

More information about the freebsd-questions mailing list