AnsweredAssumed Answered

How can I mount root file system on RAM?

Question asked by victor Wang on Jun 13, 2018
Latest reply on Jun 28, 2018 by Victor Linnik

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.

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install overlayroot
  4. sudo apt-get install ubuntu-server
  5. vim /etc/overlayroot.conf

    overlayroot="tmpfs:swap=1,recurse=0"

  6. reboot

After I did all these steps I still cannot success to execute overlayroot.

 

 

In conclusion, I need help on several questions.

  1. Is anyone get anyway to protect eMMC from power unexpect off?
  2. Is anyone can help me on overlayroot package?
  3. Did anyone got similar way to reached the same work as overlayroot?

 

Thanks in Advanced!

Outcomes