summaryrefslogtreecommitdiff
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2009-06-09 21:11:53 +0200
committerKarel Zak <kzak@redhat.com>2009-06-22 21:30:47 +0200
commitb39bd02572a8dc3dd86b3a6e535b5051e3f20273 (patch)
tree3f74cc7fa6d4c7a01752500592aa9a9355eed548 /sys-utils
parent8f24e52ed75ea16962a40a9628ae9ef85a2d034c (diff)
downloadutil-linux-old-b39bd02572a8dc3dd86b3a6e535b5051e3f20273.tar.gz
switch_root: add man page
Acked-by: Peter Jones <pjones@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/Makefile.am1
-rw-r--r--sys-utils/switch_root.849
2 files changed, 50 insertions, 0 deletions
diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am
index 6700677f..27f85b8d 100644
--- a/sys-utils/Makefile.am
+++ b/sys-utils/Makefile.am
@@ -30,6 +30,7 @@ endif
if BUILD_SWITCH_ROOT
sbin_PROGRAMS += switch_root
+dist_man_MANS += switch_root.8
endif
if BUILD_ARCH
diff --git a/sys-utils/switch_root.8 b/sys-utils/switch_root.8
new file mode 100644
index 00000000..ea175b00
--- /dev/null
+++ b/sys-utils/switch_root.8
@@ -0,0 +1,49 @@
+.\" Karel Zak <kzak@redhat.com>
+.TH SWITCH_ROOT 8 "June 2009" "Linux"
+.SH NAME
+switch_root \- switch to another filesystem as the root of the mount tree.
+.SH SYNOPSIS
+.B switch_root
+.RB [\-hV]
+.LP
+.B switch_root
+.I newroot
+.I init
+.RB [ \fIarg\fP
+.RB ...]
+.SH DESCRIPTION
+.B switch_root
+moves already mounted /proc, /dev and /sys to
+.I newroot
+and makes
+.I newroot
+the new root filesystem and starts
+.I init
+process.
+
+.B WARNING: switch_root removes recursively all files and directories on the current root filesystem.
+
+.SH OPTIONS
+.IP "\fB\-h, \-\-help\fP"
+show help and exit
+.IP "\fB\-V, \-\-version\fP"
+show version number and exit
+
+.SH RETURN VALUE
+.B switch_root
+returns 0 on success and 1 on failure.
+
+.SH "SEE ALSO"
+.BR mount (8)
+.BR chroot (2)
+.BR init (8)
+.BR mkinitrd (8)
+.SH AUTHORS
+.nf
+Peter Jones <pjones@redhat.com>
+Jeremy Katz <katzj@redhat.com>
+Karel Zak <kzak@redhat.com>
+.fi
+.SH AVAILABILITY
+The switch_root command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.