2009/10/16 薛正华 <[email protected]>:
> I put busybox into a initrd.img (ram disk). After linux kernel starts,
> it switches root file system to that of initrd.img, and it works well. Now,
> I want to switch root file system to NFS, and I used the following busybox
> command in the initrd enviroment.
>
> "exec switch_root /mnt /sbin/init ",
>
> But it prompted usage information  of switch_root, and did not execute the
> command.

This usage information says why it can fail to work, did you read it? -

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

--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to