Hide Forgot
Description of problem: Setting READONLY to 'yes' in /etc/sysconfig/readonly-root does not work on RHEL 7 - root file system is mounted as read-write after reboot. After discussion with systemd devels we came to conclusion that this is caused by missing drop-in files for affected mounts, as they are handled by systemd in RHEL 7. Version-Release number of selected component (if applicable): initscripts-9.49.37-1.el7 How reproducible: always Steps to Reproduce: # sed -i'' -re 's/(READONLY=).*/\1yes/' /etc/sysconfig/readonly-root # reboot # grep READONLY= /etc/sysconfig/readonly-root # grep " / " /proc/mounts # touch /test Actual results: # grep READONLY= /etc/sysconfig/readonly-root READONLY=yes # grep " / " /proc/mounts rootfs / rootfs rw 0 0 /dev/mapper/VolGroup00-LogVol00 / ext4 rw,seclabel,relatime,data=ordered 0 0 # touch /test # echo $? 0 Expected results: ## Example from RHEL 6.9 # grep READONLY= /etc/sysconfig/readonly-root READONLY=yes # grep " / " /proc/mounts rootfs / rootfs rw 0 0 /dev/vda1 / ext4 ro,seclabel,relatime,barrier=1,data=ordered 0 0 # touch /test touch: cannot touch `/test': Read-only file system
We have discussed this issue thoroughly with both Lukas & Michal, and come to a conclusion it's not possible to fix this issue in any sane way. Turned out the drop-ins for this issue won't work. It would require a quite huge change to systemd, which wouldn't be accepted by upstream. And we definitely do not want to keep such a change donwstream only... The simplest workaround is for user to READONLY=yes in /etc/sysconfig/readonly-root, and to manually append the 'ro' to mount options of '/' mount point in /etc/fstab. Therefore, I'm closing thsi as CANTFIX, and I will request a KB article / documentation change for this. https://github.com/fedora-sysv/initscripts/pull/190
Hello David, I've edited your draft doc text for the 7.5 Release Notes. Can you please review my description and let me know if any changes are necessary? Thanks, Marek
(In reply to Marek Suchanek from comment #6) > Hello David, > > I've edited your draft doc text for the 7.5 Release Notes. Can you please > review my description and let me know if any changes are necessary? > > Thanks, > Marek Looks good to me. :)