3 :man manual: System Administration
4 :man source: util-linux {release-version}
10 switch_root - switch to another filesystem as the root of the mount tree
16 *switch_root* _newroot init_ [_arg_...]
20 *switch_root* moves already mounted _/proc_, _/dev_, _/sys_ and _/run_ to _newroot_ and makes _newroot_ the new root filesystem and starts _init_ process.
22 *WARNING: switch_root removes recursively all files and directories on the current root filesystem.*
27 Display help text and exit.
30 Display version information and exit.
34 *switch_root* returns 0 on success and 1 on failure.
38 *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:
41 mount --bind $DIR $DIR
46 mailto:pjones@redhat.com[Peter Jones] +
47 mailto:katzj@redhat.com[Jeremy Katz] +
48 mailto:kzak@redhat.com[Karel Zak]
57 include::../man-common/bugreports.adoc[]
59 include::../man-common/footer.adoc[]
62 include::../man-common/translation.adoc[]