CINXE.COM

switch_root

<html> <head> <title>switch_root</title> <META NAME="KEYWORDS" CONTENT="switch_root"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>switch_root</b></h1></center> <PRE> <STRONG><A HREF="/man8/SWITCH_ROOT">SWITCH_ROOT(8)</A></STRONG> System Administration <STRONG><A HREF="/man8/SWITCH_ROOT">SWITCH_ROOT(8)</A></STRONG> NAME switch_root - switch to another filesystem as the root of the mount tree SYNOPSIS switch_root [-hV] switch_root newroot init [arg...] DESCRIPTION switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process. WARNING: switch_root removes recursively all files and directories on the current root filesystem. OPTIONS -h, --help Display help text and exit. -V, --version Display version information and exit. RETURN VALUE switch_root returns 0 on success and 1 on failure. NOTES 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: mount --bind $DIR $DIR SEE ALSO <STRONG><A HREF="/man2/chroot">chroot(2)</A></STRONG>, <STRONG><A HREF="/man8/init">init(8)</A></STRONG>, <STRONG><A HREF="/man8/mkinitrd">mkinitrd(8)</A></STRONG>, <STRONG><A HREF="/man8/mount">mount(8)</A></STRONG> AUTHORS Peter Jones &lt;pjones@redhat.com&gt; Jeremy Katz &lt;katzj@redhat.com&gt; Karel Zak &lt;kzak@redhat.com&gt; AVAILABILITY The switch_root command is part of the util-linux package and is avail- able from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux June 2009 <STRONG><A HREF="/man8/SWITCH_ROOT">SWITCH_ROOT(8)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10