My setup consists of a server, running Ubuntu 10.10, and a device, running a customized Linux. The device gets its kernel and mounts its root filesystem from the server using TFTP and NFS, respectively.

In my exports file I have:


I have a file containing the EXT2 filesystem which I mount onto /export/rootfs:

mount -t ext2 -o loop TargetFS.ext2 /export/rootfs

When I boot my device I get "no space left on device during initialization, although it has space. If I copy the contents of TargetFS.ext2 to /export/rootfs instead of mounting it, I don't have this problem.

Any thoughts?


You are mounting the TargetFS.ext2 file using the loopback driver. Depending on the location & type of the file, you can mount it rw by using -o rw,loop instead of just -o loop. Despite the fact that you are mounting your file in the same place you are mounting your NFS share, you are still trying to write changes to the file.

Keep in mind that wherever the file resides will have to be writable, and have sufficient space to accommodate any/all changes. Sometimes, files that you can mount as loopback, still can not be written-to due to compression or whatever... or you decide you don't want to write changes to the raw image... The alternative is to look at a "fan-out" file-system which will let you mount one file-system as read-only... and a 2nd as read/write on-top as an "overlay". mini_fo has done this quite well in many embedded devices like openwrt for a very long time. (image is read-only and a ram-drive is overlay'd on top to allow logs & such to have a place to write to)

  • I had tried before mounting with the rw option without luck. Anyway, I went to check the permissions and I realized I missed running a script that fixes all the permission issues of TargetFS.ext2 and now it works! Thanks. – Thiago Cardoso Apr 14 '11 at 14:24
  • About the mini_fo, does it do what I wanted in this question? If so, answer me there too :) In the meanwhile I'm trying to compile the module to test in my setup. – Thiago Cardoso Apr 14 '11 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.