2

I have a rootfs boot image that I want to test by mounting on my local file system. How can I do this ?

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.

Naseer
  • 1,735
  • 2
  • 21
  • 22

1 Answers1

3

Need more info - what kind of image is it?

is it a file that's a filesystem? if so you mount it like:

  mount -o loop rootfs.img /mnt/rootfs

if it's a subdir of your filesystem that you'r exporting via nfs, you can simulat ethe environment you've created by chrooting to it:

  chroot /path/to/nfs/rootdir/
pjz
  • 41,842
  • 6
  • 48
  • 60