~ # 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---------------------
r8168 Gigabit Ethernet driver 8.023.00-NAPI loaded
r8168: mcfg == RTL8168E/8111E (0014)
r8168 0000:00:01.0: no MSI. Back to INTx.
eth%d: RTL8168B/8111B at 0xc098c000, 00:00:00:00:00:00, IRQ 9
r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,8