LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2018, 04:23 AM   #1
victorwang
Member
 
Registered: Aug 2017
Posts: 30

Rep: Reputation: Disabled
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?
 
Old 06-07-2018, 06:58 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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/
 
Old 06-07-2018, 08:28 PM   #3
victorwang
Member
 
Registered: Aug 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
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?
 
Old 06-09-2018, 11:52 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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.
 
Old 06-10-2018, 08:39 PM   #5
victorwang
Member
 
Registered: Aug 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
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?
 
Old 06-10-2018, 10:25 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Do you have a swap partition. Overlayroot doesn't work with swap files.
 
Old 06-10-2018, 10:38 PM   #7
victorwang
Member
 
Registered: Aug 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
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.
 
Old 06-11-2018, 02:45 AM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Did you reboot the system? Overlayroot requires a reboot after installation and configuration.
 
Old 06-11-2018, 02:54 AM   #9
victorwang
Member
 
Registered: Aug 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
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?
 
Old 06-11-2018, 03:20 AM   #10
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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.
 
Old 06-11-2018, 09:04 PM   #11
victorwang
Member
 
Registered: Aug 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Protecting /root from user battles Linux - Security 8 02-26-2015 04:09 PM
Boot failure - ubuntu mounting root filesystem freeze hoodedmanwithsythe Ubuntu 6 08-19-2007 09:27 PM
Password Protecting Root User dudeman41465 Linux - Software 1 09-16-2005 02:27 AM
Protecting Root Password ukndoit Linux - Security 10 10-16-2003 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration