blob: 73c677bab65caba0faad09706ea9b3460d80b4f2 [file] [log] [blame]
Denys Vlasenko200bcc82017-08-21 19:30:01 +02001/*
2 * run-init implementation for busybox
3 *
4 * Copyright (c) 2017 Denys Vlasenko <vda.linux@gmail.com>
5 *
6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */
8//config:config RUN_INIT
Denys Vlasenkob097a842018-12-28 03:20:17 +01009//config: bool "run-init (7.7 kb)"
Denys Vlasenko200bcc82017-08-21 19:30:01 +020010//config: default y
Denys Vlasenko200bcc82017-08-21 19:30:01 +020011//config: help
12//config: The run-init utility is used from initramfs to select a new
13//config: root device. Under initramfs, you have to use this instead of
14//config: pivot_root.
15//config:
16//config: Booting with initramfs extracts a gzipped cpio archive into rootfs
17//config: (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
18//config: or unmounted, pivot_root will not work from initramfs. Instead,
19//config: run-init deletes everything out of rootfs (including itself),
20//config: does a mount --move that overmounts rootfs with the new root, and
21//config: then execs the specified init program.
22//config:
23//config: util-linux has a similar tool, switch-root.
24//config: run-init differs by also having a "-d CAPS_TO_DROP" option.
25
26/* applet and kbuild hooks are in switch_root.c */