/data
Filesystem¶
The /data
filesystem is the only persistent writeable filesystem present in
the production embedded software images. Transient data such as logfiles are
normally written to files in a small memory resident filesystem. The root
filesystem is intentionally mounted read-only to avoid accidental bricking
of the system.
/data
Filesystem Resize¶
As of the RC1 release, the /data
partition and filesystem are automatically
expanded to fill the available space, either on SD card or in eMMC, the first time
the image is booted. For more information, see here.
System Configuration Files¶
As discussed in detail here and here, the rootfs is mounted read-only. Occassionally, you might need to tweak one of the immutable configuration files in the true /etc. First, the system must be in a fairly quiescent state… shutdown the end product application and all optional services to the greatest extent possible.
Tip
Any process that holds an open file descriptor on /etc will prevent
unmounting the overlay. The udev system service is a good example of this.
If you have trouble umount
ing /etc, you can use lsof | grep /etc
to find the processes that have open file descriptors on /etc.
Second, you must unmount the overlay by…
1# to stop udev (you must be root to do this)
2root@imx6dl-g3-sd:~# /etc/init.d/udev stop
3
4# to unmount the overlay (you must be root to do this)
5root@imx6dl-g3-sd:~# umount /etc
Last, you must temporarily remount the rootfs so it’s writeable. Here’s how…
1# to remount rootfs read-write (you must be root to do this)
2root@imx6dl-g3-sd:~# mount -n -o remount,rw /
3
4# now your are ready to edit configuration files in the real /etc
You should immediately reboot the G3 module when your changes are complete and tested so the rootfs returns to its default read-only state.