Hi all, <br> here is a description of what I'm trying to do.<br><br>I created a small rootfs with buildroot and I gPXE booted it. Once that is running I do<br><br>mount -t tmpfs -o size=4G mount -t tmpfs -o size=4G none /tmp<br>
<br>(I have a system with 8GB of RAM)<br><br>and then i copy with scp a new rootfs (rootfs.img whose size is around 2.5GB) under /tmp<br><br>At this point, this I run this simple script<br><br>#!/bin/bash<br>cd /tmp<br>mkdir newrootfs<br>
mount rootfs.img newrootfs<br>
cd newrootfs<br>mkdir oldrootfs<br>pivot_root . oldrootfs<br>exec chroot . sh -c 'exec /sbin/init' <dev/console >dev/console 2>&1<br><br>I can see the new root is rootfs, but still there is something not working. When I run the script I get the message<br>

<br>init: illegal runlevel (null)<br><br>Any idea of what can be wrong? <br><br>Thank you all,<br> Luca<br>