title: mount rootfs on loopback
body: <p>I have a rootfs boot image that I want to test by mounting on my local file system. How can I do this ?</p>
  
  <p>EDIT: The file was a rootfs.img but it turned out I did not have the correct filesystem support in my custom kernel. pjz's answer works once the fs support is there.</p>