2024-01-23 08:26:57 +01:00
|
|
|
# switch_root
|
|
|
|
|
|
|
|
> Use a different filesystem as the root of the mount tree.
|
2024-02-05 12:34:49 +05:30
|
|
|
> Note: switch_root will fail to function if the new root is not the root of a mount. Use bind-mounting as a workaround.
|
2024-01-23 08:26:57 +01:00
|
|
|
> See also: `chroot`, `mount`.
|
|
|
|
> More information: <https://manned.org/switch_root.8>.
|
|
|
|
|
|
|
|
- Move `/proc`, `/dev`, `/sys` and `/run` to the specified filesystem, use this filesystem as the new root and start the specified init process:
|
|
|
|
|
|
|
|
`switch_root {{new_root}} {{/sbin/init}}`
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
2025-03-28 16:06:49 +02:00
|
|
|
`switch_root {{[-h|--help]}}`
|