| ▲ | duskwuff 2 hours ago | |
One bit of magic you may be interested in is pivot_root, which allows another filesystem to take the place of the root filesystem (e.g. / and /mnt become /old and /). It's usually used during startup, to allow the "real" root filesystem to take the place of the initrd, but could have other uses. | ||
| ▲ | Dylan16807 an hour ago | parent [-] | |
Last time I tried to use it though I just could not get it to let go of the main filesystem even after repeatedly killing the processes I could and restarting the rest. Taking control at the initrd stage, as in the second page of the article, is significantly more reliable. But have busybox in your initrd so you don't have to suffer. It takes up 0.5% of the size of my initrd file. | ||