2 * run-init implementation for busybox
4 * Copyright (c) 2017 Denys Vlasenko <vda.linux@gmail.com>
6 * Licensed under GPLv2, see file LICENSE in this source tree.
8 //config:config RUN_INIT
9 //config: bool "run-init (7.5 kb)"
11 //config: select PLATFORM_LINUX
13 //config: The run-init utility is used from initramfs to select a new
14 //config: root device. Under initramfs, you have to use this instead of
17 //config: Booting with initramfs extracts a gzipped cpio archive into rootfs
18 //config: (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
19 //config: or unmounted, pivot_root will not work from initramfs. Instead,
20 //config: run-init deletes everything out of rootfs (including itself),
21 //config: does a mount --move that overmounts rootfs with the new root, and
22 //config: then execs the specified init program.
24 //config: util-linux has a similar tool, switch-root.
25 //config: run-init differs by also having a "-d CAPS_TO_DROP" option.
27 /* applet and kbuild hooks are in switch_root.c */