Hi All,
I'm using Yocto project to build my image and installed Ubuntu 16.04 LXDE as my root file system.
I'm trying to protect my eMMC get panic when the power is unexpectedly off.
Thereby, I found a overlayroot package that can do what I need.
After some googling, I realized that overlayroot is trying to let original root filesystem mount on /media/root-ro as type read-only file.
And it will mount it to /media/root-rw as type tmpfs.
Then mount overlayroot on / as type overlay
Below is content of mount.
/dev/sda1 on /media/root-ro type ext4 (ro) tmpfs-root on /media/root-rw type tmpfs (rw,relatime) /dev/sda2 on /data type ext4 (rw)
All of this were based on X86 platform with Ubuntu 16.04 OS system and it worked perfectly.
However While I try exactly same way on i.MX6DL sabreSD, it couldn't work right.
These are what I had done step by step.
overlayroot="tmpfs:swap=1,recurse=0"
After I did all these steps I still cannot success to execute overlayroot.
In conclusion, I need help on several questions.
Thanks in Advanced!
We have no experience with overlayroot. Sorry for the inconvenience.
However we can offer you following way to make rootfs unchanged.
You can move all significant parts of rootfs like /etc/ into RAM this way:
mkdir /media/etc
mount tmpfs -t tmpfs /media/etc
cp -a /etc/* /media/etc
mount -o bind /media/etc /etc
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------