"switch_root" did not work

Vladimir Dronnikov dronnikov at gmail.com
Fri Oct 16 11:35:12 UTC 2009


> Thank you very much.
> pivot_root indeed works, and now I can switch root fs to a directory of NFS.
> The directory is a full file system of linux.
> When I execute "/sbin/init" in the new root file system, it prompts me
> "init: unable to send message".  who can tell me the reason?

Difficult to say. I doubt it is busybox who sucks. Try to execute
/bin/sh instead of /sbin/init in your pivot_root call. Once you are in
shell (if you _are_, of course:) try to execute some commands you
expect to behave well:
ls /
ls /dev
ls /sbin
cat /sbin/init
vi /sbin/init

If it succeeds, try to "exec /sbin/init" manually.
Post results.

--
Vladimir


More information about the busybox mailing list