Quote Originally Posted by garyng
I am confused. What do you want to achieve ? I use pivot_root in the normal initrd to boot into a real root fs(say a clooped device, or a loopback device on FAT/NTFS) but don't quite understand what you want to do in this post. pivot_root is sort of like a 'chain boot' to me and there is no way one can get back to the previous root system. I believe UML is a better way to test out a new distribution within a running system.

BTW, in general people seldom do a pivot_root to absolute path "/..." but rather :

cd /your_new_root
pivot_root . etc/init(this is a under the new root system and note the absence of / before etc)
If you want to test Knoppix-features like hw-detection, I think UML is no choice as you need real test-circumstances ...

I want to boot a directory /home/knoppix/newroot as if everything in newroot was in its own partition!

So /mnt/home/knoppix/newroot -> /

But with pivot_root this is not possible ... (Neither with relative nor absolute path)

You need the trick, I've described above ...

cu

Fabian

PS: Btw and yes, you CAN change the System, while running with pivot_root and you can also go back (if you don
't unmount the initrd) ...