SWITCH_ROOT(8)

NAME
switch_root - switch to another filesystem as the root of the mount tree

SYNOPSIS
switch_root [-c console] newroot init

DESCRIPTION
switch_root removes all files and directories on the current root filesystem and overmounts it with newroot. If a console is specified, redirect stdio and stderr to it. After the switch, execute init.

switch_root can only be run as PID 1 in an initramfs or tmpfs with a regular and executable /sbin/init.

OPTIONS

-c  Redirect stdio and stderr to console after switching to newroot.