LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-11-2015, 05:25 AM   #1
mrajanna
LQ Newbie
 
Registered: May 2015
Posts: 3

Rep: Reputation: Disabled
Read only root partition


Dear All,

I have a requirement of changing my root partition to Readonly.

After changing / to readonly in /etc/fstab, I rebooted the system.

Mount points of USB devices is /mnt/sdxx.

But after above changes USB folder is not creating under /mnt/sdXX because of Read only Root partition.

Can I get any work around for this requirement please..
 
Old 05-11-2015, 05:28 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Obviously a ridiculous requirement.
 
Old 05-11-2015, 05:32 AM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,146

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Live OS are using overlayfs on top of read only root.
 
Old 05-11-2015, 05:35 AM   #4
mrajanna
LQ Newbie
 
Registered: May 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
If / partition is changed to 'rw' in /etc/fstab, then sdxx directory gets created under /mnt whenever USB is plugged.

But my / partition should be 'ro' and it is the requirement, any workaround please.
 
Old 05-11-2015, 05:55 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
goto #3 http://r.duckduckgo.com/l/?kh=-1&udd...-use-overlayfs
 
Old 05-11-2015, 06:16 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
It may depend on distro. But if you make a static mount point for usb drive then it should be mountable.
 
Old 05-11-2015, 08:03 AM   #7
mrajanna
LQ Newbie
 
Registered: May 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
I am not sure of static mount point, I don't know how to make it work.
My distro is Windriver 6.

In my case, root partition will always be mounted as readonly due to security reasons.

When I plug usb device folder I should get USB folder created in /mnt. I am sure USB mount point is under /mnt. But this is not happening.
 
Old 05-11-2015, 03:26 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
an operating system cannot "do things" if it's read only.
mounting a usb drive requires write access to parts of the os at least.
i guess the answer to your question lies in post #3.
or, if you explain what you are really trying to achieve, maybe there are other ways to achieve it.
 
Old 05-12-2015, 09:48 AM   #9
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,500

Rep: Reputation: Disabled
There are certain folders that need to be writable, /etc, /var, /tmp, & /home, (I may have missed another one but from memory, those).
If you want to set your / partition to be read only, these mount points need to be in a separate writable partition.
 
  


Reply



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
Non-root user has read-only access to fat-c partition Ook Slackware 12 05-25-2007 08:49 AM
i can only read my mp3 partition as root ? jamasoo SUSE / openSUSE 8 01-15-2007 10:07 AM
RH AS4 OS, the ROOT partition changed to READ-ONLY jiawj Red Hat 1 04-19-2006 07:33 AM
Make Gentoo use read only root partition BuckRogers01 Linux - Distributions 4 03-05-2006 02:30 PM
boot root partition read only mrtwice Linux - General 11 10-10-2003 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:07 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
Open Source Consulting | Domain Registration