I'm not sure I completely understand though. Doesn't "exec" make it run as PID 1?
Not if the script containing the "exec" does not run as pid 1 in the first place.
When busybox init runs, it runs as pid 1, and stays there until you shutdown the machine. Any script it spawns, even in your ::sysinit lines, will spawn with other pids. So your /bin/init.sh script is not running as pid 1, so switch_root will fail. But I'm not even sure why you want to use switch_root here. switch_root is only useful when you have to boot on an initramfs; from what you've said it doesn't appear necessary for your goal. If you have a rootfs with a functional init, which appears to be the case, you can just boot qemu on that rootfs and it should work. (You might need to turn your rootfs into a disk image first, but the point is that your situation doesn't seem to require an initramfs and switch_root.) -- Laurent _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
