switch_root.8 - ubase - suckless linux base utils
(HTM) git clone git://git.suckless.org/ubase
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
switch_root.8 (632B)
---
1 .Dd February 2, 2015
2 .Dt SWITCH_ROOT 8
3 .Os ubase
4 .Sh NAME
5 .Nm switch_root
6 .Nd switch to another filesystem as the root of the mount tree
7 .Sh SYNOPSIS
8 .Nm
9 .Op Fl c Ar console
10 .Ar newroot init
11 .Sh DESCRIPTION
12 .Nm
13 removes all files and directories on the current root filesystem and
14 overmounts it with
15 .Ar newroot .
16 If a
17 .Ar console
18 is specified, redirect stdio and stderr to it. After the switch, execute
19 .Ar init .
20 .Pp
21 .Nm
22 can only be run as PID 1 in an initramfs or tmpfs with a regular and
23 executable /sbin/init.
24 .Sh OPTIONS
25 .Bl -tag -width Ds
26 .It Fl c
27 Redirect stdio and stderr to
28 .Ar console
29 after switching to
30 .Ar newroot .
31 .El