-
Notifications
You must be signed in to change notification settings - Fork 0
How this works
When your install is hijacked, the Arnix installer moves critical directories (like /usr
and /etc
) to a subdirectory in /arnix/generations
.
This breaks the Filesystem Hierarchy Standard (FHS) and makes everything not work anymore. Therefore we use bind mounts to fix this ASAP.
On boot, the initrd usually launches /sbin/init
on the root filesystem. That file usually is your init system of choice.
However, Arnix replaces said init and uses that opportunity to set up the remaining system (remember: /usr, /etc, /var, ... are empty after the hijack).
Arnix's init mounts all the directories it hijacked and then hands off control to the real init, which is located at ... /sbin/init?
Why run /sbin/init again if that's just Arnix again?
It's not. The --bind
option for mount
just hides everything on the target directory. This is really convenient because we don't have to break the FHS.