1 //po4a: entry man manual
4 :man manual: System Administration
5 :man source: util-linux {release-version}
11 switch_root - switch to another filesystem as the root of the mount tree
17 *switch_root* _newroot init_ [_arg_...]
21 *switch_root* moves already mounted _/proc_, _/dev_, _/sys_ and _/run_ to _newroot_ and makes _newroot_ the new root filesystem and starts _init_ process.
23 *WARNING: switch_root removes recursively all files and directories on the current root filesystem.*
27 include::man-common/help-version.adoc[]
31 *switch_root* returns 1 on failure, it never returns on success.
35 *switch_root* will fail to function if _newroot_ is not the root of a mount. If you want to switch root into a directory that does not meet this requirement then you can first use a bind-mounting trick to turn any directory into a mount point:
38 mount --bind $DIR $DIR
43 mailto:pjones@redhat.com[Peter Jones],
44 mailto:katzj@redhat.com[Jeremy Katz],
45 mailto:kzak@redhat.com[Karel Zak]
54 include::man-common/bugreports.adoc[]
56 include::man-common/footer.adoc[]
59 include::man-common/translation.adoc[]