[yocto] NFS rootfs: mount: only root can mount proc on /proc

John Rama john.rama01 at gmail.com
Wed Dec 14 17:27:42 PST 2016


Dear Yocto specialists

I would like to know how people, who familiar with Yocto, prepare NFS rootfs for target.

When running bitbake with image recipe, the target rootfs is generated at the following directory
{YOCTO_BUILD_DIR}//tmp//work/{TARGET}-poky-linux-gnueabi/{IMAGE}/1.0-r0//rootfs/.
However it's UID and GID is based on the account with which you runs the bitbake.
If you export this rootfs for the target, it will results in the problem reported in following thread.

http://www.linuxquestions.org/questions/linux-software-2/nfs-rootfs-mount-only-root-can-mount-proc-on-proc-4175595326/

I would like to hear how people avoid this problem.

The ideas I can come up with are followings, but those of them are not perfect..
1. Run the bitbake as root account
  - would not run as root since the all of generated files are root permission even for the log files.
2. Change UID and GID whenever generating new image
  - I guess next build would fall into the trouble because of the owner change.
3. Untar the tar ball under  {YOCTO_BUILD_DIR}//tmp//deploy/image/{TARGET}/*rootfs.tar.bz2 to  the export dir
  - takes additional time.. Not good.

So, is there any good idea to workaround this problem ?
Any insights and comments are really appreciated.

Kind Regards,
John Rama



More information about the yocto mailing list