You are not logged in.
I tried to temp change kernel options in grub menu. Changed "rw quiet" to "ro 1".
It really disables graphical mode and enables maintenance prompt, but root is mounted rw.
Last edited by leniviy (2014-07-10 20:04:12)
Arch 64, xfce4
Offline
I have a 4 G partition on which I have a minimal install for these tasks. Maybe someone else will answer your question.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Online
Forgive my ignorance, but wouldn't maintenance logically require write access to the filesystem? How do you fix something without being able to change it?
Offline
Can you remount it ro?
Offline
adding 1 before rw works for me. You can use mount -o remount ro /
Offline
Mount ro and specify init=/usr/bin/bash on the kernel line.
Without an otherwise specified init, init=systemd. Systemd remounts the / according to your /etc/fstab (if it is mounted ro in the initrams, which is what the kernel line option does). With init=/bin/bash, nothing will be (re)mounted unless you explicitly specify it. Note, though that this would include any/all other partitions.
Systemd's "rescue" target may work similarly, but I have no relevant experience with it.
EDIT: But note, this is just trying to answer the question as you stated it. I too wonder what use this would be - what maintenance can you do if you can't modify the system?
Last edited by Trilby (2014-07-10 22:43:14)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I too wonder what use this would be - what maintenance can you do if you can't modify the system?
Yesterday I needed to run `zerofree`.
Arch 64, xfce4
Offline
Can you remount it ro?
I tried. It prints "busy". I also tried:
lsof | grep -e "[[:digit:]]\+w"
, but it only prints devices and pipes
Last edited by leniviy (2014-07-11 05:38:44)
Arch 64, xfce4
Offline
Change the kernel command line to 'ro' and then also add 'systemd.mask=systemd-remount-fs.service'. This will mount the rootfs read-only in the initramfs, but should also prevent the system from parsing the fstab for the / mountpoint.
I have not tried this, but in my head, it totally works...
Offline