2

I've a netboot Linux server where the the /root is mounted as readonly.

# Set to 'yes' to mount the system filesystems read-only.
READONLY=yes
# Set to 'yes' to mount various temporary state as either tmpfs
# or on the block device labelled RW_LABEL. Implied by READONLY
TEMPORARY_STATE=yes
# Place to put a tmpfs for temporary scratch writable space
RW_MOUNT=/var/lib/stateless/writable
# Label on local filesystem which can be used for temporary scratch space
RW_LABEL=stateless-rw
# Options to use for temporary mount
RW_OPTIONS=
# Label for partition with persistent data
STATE_LABEL=stateless-state
# Where to mount to the persistent data
STATE_MOUNT=/var/lib/stateless/state
# Options to use for peristent mount
STATE_OPTIONS=
CLIENTSTATE=

I can see the files/directories on /etc/rwtab mounted in the temporary read-write filesystem. Now I would like to add files/directories to this list /etc/rwtab and unable to do so as itself readonly.

Now, I need to install software and update some configurations. Do I have to remount the root partition.

# mount -o remount,rw /

This is a Production server.

3
  • OP is apparently using a RHEL/CentOS feature called "Stateless Linux". Sep 23, 2013 at 16:53
  • Why would you use this on a production server? It sounds like it's designed for live images (ie. Linux running from a CD), not for a system installed on a harddisk that you want to update. Sep 23, 2013 at 16:54
  • Martin, assuming you have a build pipeline for your OS build automation, this would actually be a great way to ensure consistency in a production environment, assuming you do not allow for too many things to be in that state/tmpfs overlay. This would probably also be quite useful in VM environments such as OpenStack that have a build pipeline for the OS.
    – Aaron
    May 15, 2015 at 16:58

2 Answers 2

1

Since this is a stateless Linux, the actual /root is mounted through NFS from a separate machine where files are obviously mounted as rw. Thanks to @Martin von Wittich

0

On the system serving out / over nfs:

yum --installroot=<shared nfs root directory> update||install||erase <package>
1
  • Hi and welcome to the site! We expect answers to be more detailed here. Could you please edit and explain what the suggested solution does, how it works and how the OP is supposed to use it?
    – terdon
    Jan 8, 2015 at 17:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .