1 .\" Karel Zak <kzak@redhat.com>
2 .TH SWITCH_ROOT 8 "June 2009" "util-linux" "System Administration"
4 switch_root \- switch to another filesystem as the root of the mount tree
15 moves already mounted /proc, /dev, /sys and /run to
19 the new root filesystem and starts
23 .B WARNING: switch_root removes recursively all files and directories on the current root filesystem.
26 .IP "\fB\-h, \-\-help\fP"
27 Display help text and exit.
28 .IP "\fB\-V, \-\-version\fP"
29 Display version information and exit.
33 returns 0 on success and 1 on failure.
36 switch_root will fail to function if
38 is not the root of a mount. If you want to switch root into a directory that
39 does not meet this requirement then you can first use a bind-mounting trick to
40 turn any directory into a mount point:
44 mount --bind $DIR $DIR
55 Peter Jones <pjones@redhat.com>
56 Jeremy Katz <katzj@redhat.com>
57 Karel Zak <kzak@redhat.com>
60 The switch_root command is part of the util-linux package and is available from
61 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.