switch_root
Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT, and exec NEW_INIT. toybox
On Linux
Linux
switch_root [-c /dev/console] NEW_ROOT NEW_INIT...
-cRedirect console to device in NEW_ROOT-hHang instead of exiting on failure (avoids kernel panic)Linux
Use a different filesystem as the root of the mount tree. Note: switch_root will fail to function if the new root is not the root of a mount. Use bind-mounting as a workaround.
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/initIdentifyDisplay help
switch_root --helpIdentify