LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Protecting the Root Filesystem on Ubuntu with Overlayroot (https://www.linuxquestions.org/questions/linux-newbie-8/protecting-the-root-filesystem-on-ubuntu-with-overlayroot-4175631402/)

victorwang 06-07-2018 04:23 AM

Protecting the Root Filesystem on Ubuntu with Overlayroot
 
I'm trying to protect root filesystem on Ubuntu 16.04 with Overlayroot.

I had install overlayroot and modify the overlayroot.conf file as below.

overlayroot_cfgdisk="disabled"
overlayroot="tmpfs"

After I modified the file then reboot the system, I ran `mount` to see is it successful.

But there is no overlayroot mounted.

Log is as below link.

https://imgur.com/cownGoO

Did I miss anything here?

AwesomeMachine 06-07-2018 06:58 AM

The first line in your mount command output is the root file system. Maybe you need more changes to overlayroot.conf. https://spin.atomicobject.com/2015/0...ot-filesystem/

victorwang 06-07-2018 08:28 PM

Quote:

Originally Posted by AwesomeMachine (Post 5864650)
The first line in your mount command output is the root file system. Maybe you need more changes to overlayroot.conf. https://spin.atomicobject.com/2015/0...ot-filesystem/


Actually I had tried modify like below.
overlayroot="tmpfs:swap=1,recurse=0"
But it still not work too.
Is overlayroot got any relation with kernel driver?

AwesomeMachine 06-09-2018 11:52 AM

Did you add this at the very end of the overlayroot.conf file? Or near the beginning? It has to go at the very end, or you have to delete the '#' at the beginning of the line.

victorwang 06-10-2018 08:39 PM

Quote:

Originally Posted by AwesomeMachine (Post 5865495)
Did you add this at the very end of the overlayroot.conf file? Or near the beginning? It has to go at the very end, or you have to delete the '#' at the beginning of the line.

Yes, I added it at the very end of the overlayroot.conf file.

And I did check that linux kernel had include overlayfs driver.

But It still can not mount it.

Here is another phenomenon, When I reboot the system I can not see any log that is relate to overlayroot.

Is that mean it did not event execute overlayroot shell script?

AwesomeMachine 06-10-2018 10:25 PM

Do you have a swap partition. Overlayroot doesn't work with swap files.

victorwang 06-10-2018 10:38 PM

Quote:

Originally Posted by AwesomeMachine (Post 5866015)
Do you have a swap partition. Overlayroot doesn't work with swap files.

I used
Code:

df
and
Code:

mount
to check mount files.

Below is the result.

df:
https://imgur.com/k3wf92s

mount:
https://imgur.com/J3K8rkS

Sorry that I use link to post my code for instead.

As you can see in the "mount" link, overlayroot did not mount and root is still mount as type ext4 RW.

And also I cannot find any log that is relate to overlayroot.

I think that I do not have swap partition.

AwesomeMachine 06-11-2018 02:45 AM

Did you reboot the system? Overlayroot requires a reboot after installation and configuration.

victorwang 06-11-2018 02:54 AM

Quote:

Originally Posted by AwesomeMachine (Post 5866096)
Did you reboot the system? Overlayroot requires a reboot after installation and configuration.

Yes, I did reboot the system.

I trying to use overlayroot on Ubuntu 18.

And it worked perfect.

Is that Ubuntu 16.04 did not support overlayroot well?

AwesomeMachine 06-11-2018 03:20 AM

Well, the mount command in your photo was run immediately after the installation of overlayroot. So, you didn't reboot the system before you ran the mount command in the photo. Just telling me stuff isn't going to make it true.

victorwang 06-11-2018 09:04 PM

Quote:

Originally Posted by AwesomeMachine (Post 5866106)
Well, the mount command in your photo was run immediately after the installation of overlayroot. So, you didn't reboot the system before you ran the mount command in the photo. Just telling me stuff isn't going to make it true.

I was trying other method while I asking question here.

What you saw is that I was trying to do other method after I reboot the system.

So you will see other command in the picture.

If you ask to have other picture, below was the link that I took it after I reboot the system.

https://imgur.com/CN78hNj


All times are GMT -5. The time now is 12:54 AM.