1SWITCH_ROOT(8)               System Administration              SWITCH_ROOT(8)
2
3
4

NAME

6       switch_root  -  switch  to  another filesystem as the root of the mount
7       tree
8

SYNOPSIS

10       switch_root [-hV]
11
12       switch_root newroot init [arg...]
13

DESCRIPTION

15       switch_root moves already mounted /proc, /dev, /sys and /run to newroot
16       and makes newroot the new root filesystem and starts init process.
17
18       WARNING:  switch_root  removes recursively all files and directories on
19       the current root filesystem.
20
21

OPTIONS

23       -h, --help
24              Display help text and exit.
25
26       -V, --version
27              Display version information and exit.
28
29

EXIT STATUS

31       switch_root returns 0 on success and 1 on failure.
32
33

NOTES

35       switch_root will fail to function if newroot  is  not  the  root  of  a
36       mount.  If  you want to switch root into a directory that does not meet
37       this requirement then you can first use a bind-mounting trick  to  turn
38       any directory into a mount point:
39
40              mount --bind $DIR $DIR
41
42

AUTHORS

44       Peter Jones <pjones@redhat.com>
45       Jeremy Katz <katzj@redhat.com>
46       Karel Zak <kzak@redhat.com>
47

SEE ALSO

49       chroot(2), init(8), mkinitrd(8), mount(8)
50

AVAILABILITY

52       The switch_root command is part of the util-linux package and is availā€
53       able from https://www.kernel.org/pub/linux/utils/util-linux/.
54
55
56
57util-linux                         June 2009                    SWITCH_ROOT(8)
Impressum