The switch_root shell script did not work with bash-4.0-2, because "exec" gets the real path of the executable which is then "/sysroot/lib/ld-linux.so.2" instread of "./lib/ld-linux.so.2". Also the required chroot binary might live in /usr/bin, which can be mounted later. Here is the switch_root code from nash, which can be stripped down further, but which works.