~ # switch_root
BusyBox v1.18.3 (2011-02-23 16:15:41 CST) multi-call binary.
Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]
Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.
Options:
-c DEV Reopen stdio to DEV after switch
/下什么都删除了
proc都没有
手动执行mount
/ # exec /sbin/switch_root /mnt /linuxrc
-------------------rcS---------------------
pwd is /
mount: no /proc/mounts
ls: /mnt/dev/pts: No such file or directory
mount: mounting none on /dev/shm failed: No such file or directory
mount: mounting none on /dev/pts failed: No such file or directory
------------------set runtime env------------------
1)insmod
-------------------module.sh---------------------
r