summaryrefslogtreecommitdiff
path: root/util-linux/Config.in
diff options
context:
space:
mode:
authorRob Landley2005-10-27 22:55:50 +0000
committerRob Landley2005-10-27 22:55:50 +0000
commit0f34a821ab99e4936c7aa4974f58784442172211 (patch)
tree1341f988aa02110b3a997edc52e54bcc27ea1000 /util-linux/Config.in
parent2454ebd85ddbbdc0971e9b848032f66e23245ebe (diff)
downloadbusybox-0f34a821ab99e4936c7aa4974f58784442172211.zip
busybox-0f34a821ab99e4936c7aa4974f58784442172211.tar.gz
Add a switch_root utility (like kconfig's utils/run_init.c, although not
actuall using any of that code). This is needed because pivot_root doesn't work right under initramfs. (See the menuconfig help.)
Diffstat (limited to 'util-linux/Config.in')
-rw-r--r--util-linux/Config.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/util-linux/Config.in b/util-linux/Config.in
index dc6d8fd..fe71dac 100644
--- a/util-linux/Config.in
+++ b/util-linux/Config.in
@@ -288,6 +288,28 @@ config CONFIG_PIVOT_ROOT
of wild and crazy things with your Linux system and is far more
powerful than 'chroot'.
+ Note: This is for initrd in linux 2.4. Under initramfs (introduced
+ in linux 2.6) use switch_root instead.
+
+config CONFIG_SWITCH_ROOT
+ bool "switch_root"
+ default n
+ help
+ The switch_root utility is used from initramfs to select a new
+ root device. Under initramfs, you have to use this instead of
+ pivot_root. (Stop reading here if you don't care why.)
+
+ Booting with initramfs extracts a gzipped cpio archive into rootfs
+ (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
+ or unmounted*, pivot_root will not work from initramfs. Instead,
+ switch_root deletes everything out of rootfs (including itself),
+ does a mount --move that overmounts rootfs with the new root, and
+ then execs the specified init program.
+
+ * Because the Linux kernel uses rootfs internally as the starting
+ and ending point for searching through the kernel's doubly linked
+ list of active mount points. That's why.
+
config CONFIG_RDATE
bool "rdate"
default n