Mailing List Archive

New install - root is mounted read-only
I've started tackling my new build again, and when it boots root is
read-only. Hopefully I've just missed something stupid, but how to I get
it to transition read-write?

System is grub, systemd, and root is an lv ...

Do I need to do anything special with the initrd? Manually remounting
fixes it fine as far as I can tell.

Cheers,
Wol
Re: New install - root is mounted read-only [ In reply to ]
On Fri, Jun 18, 2021 at 7:15 PM Wols Lists <antlists@youngman.org.uk> wrote:

> I've started tackling my new build again, and when it boots root is
> read-only. Hopefully I've just missed something stupid, but how to I get
> it to transition read-write?
>

Weird - here's my fstab and dmesg entries if you want to compare;
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/nvme0n1p1 /boot vfat noauto 1 2
/dev/nvme0n1p2 / ext4 noatime 0 1

dmesg | grep -i mount
[ 0.204991] Mount-cache hash table entries: 131072 (order: 8, 1048576
bytes, linear)
[ 0.205069] Mountpoint-cache hash table entries: 131072 (order: 8,
1048576 bytes, linear)
[ 2.390990] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data
mode. Opts: (null). Quota mode: none.
[ 2.391735] VFS: Mounted root (ext4 filesystem) readonly on device 259:2.
[ 2.392955] devtmpfs: mounted
[ 2.660857] systemd[1]: Condition check resulted in Arbitrary Executable
File Formats File System Automount Point being skipped.
[ 2.691123] systemd[1]: Mounting Huge Pages File System...
[ 2.695813] systemd[1]: Mounting Kernel Debug File System...
[ 2.699613] systemd[1]: Mounting Kernel Trace File System...
[ 2.703758] systemd[1]: Mounting Temporary Directory (/tmp)...
[ 2.739488] systemd[1]: Mounted Huge Pages File System.
[ 2.741924] systemd[1]: Mounted Kernel Debug File System.
[ 2.744313] systemd[1]: Mounted Kernel Trace File System.
[ 2.746582] systemd[1]: Mounted Temporary Directory (/tmp).
[ 2.776402] systemd[1]: Mounting FUSE Control File System...
[ 2.782926] systemd[1]: Mounting Kernel Configuration File System...
[ 2.787158] systemd[1]: Starting Remount Root and Kernel File Systems...
[ 2.794343] systemd[1]: Mounted FUSE Control File System.
[ 2.796604] systemd[1]: Mounted Kernel Configuration File System.
[ 2.796823] EXT4-fs (nvme0n1p2): re-mounted. Opts: (null). Quota mode:
none.
[ 2.803599] systemd[1]: Finished Remount Root and Kernel File Systems.
[ 2.845843] systemd[1]: Set up automount mnt-backup.automount.
[ 2.848547] systemd[1]: Set up automount mnt-public.automount.
Re: New install - root is mounted read-only [ In reply to ]
On 2021-06-18 10:55+0100 Wols Lists <antlists@youngman.org.uk> wrote:

> I've started tackling my new build again, and when it boots root is
> read-only. Hopefully I've just missed something stupid, but how to I
> get it to transition read-write?
>
> System is grub, systemd, and root is an lv ...
>
> Do I need to do anything special with the initrd? Manually remounting
> fixes it fine as far as I can tell.

Do you use a custom initrd? The kernel usually mounts / ro at first and
the initrd remounts it with `mount -o remount,rw /` later.
You can also mount / rw from the beginning by specifying “rw” instead of
“ro” on the kernel commandline¹. The current kernel commandline is
visible in /proc/cmdline.

Kind regards, tastytea

¹ <https://www.kernel.org/doc/html/v5.10/admin-guide/kernel-parameters.html>

--
Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at
<https://tastytea.de/tastytea.asc>.
Re: New install - root is mounted read-only [ In reply to ]
On Fri, 18 Jun 2021 10:55:32 +0100, Wols Lists wrote:

> I've started tackling my new build again, and when it boots root is
> read-only. Hopefully I've just missed something stupid, but how to I get
> it to transition read-write?
>
> System is grub, systemd, and root is an lv ...
>
> Do I need to do anything special with the initrd? Manually remounting
> fixes it fine as far as I can tell.

What are you using to build the initrd? What is in fstab? What kernel
options are you using, /proc/cmdline?


--
Neil Bothwick

Employ teenagers - while they know everything.