Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] New install - root is mounted read-only

154 views
Skip to first unread message

Wols Lists

unread,
Jun 18, 2021, 5:20:04 AM6/18/21
to
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

Adam Carter

unread,
Jun 18, 2021, 5:40:03 AM6/18/21
to
On Fri, Jun 18, 2021 at 7:15 PM Wols Lists <antl...@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.

tastytea

unread,
Jun 18, 2021, 8:00:04 AM6/18/21
to
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 tast...@tastytea.de` or at
<https://tastytea.de/tastytea.asc>.

Neil Bothwick

unread,
Jun 18, 2021, 8:10:03 AM6/18/21
to
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.

Wols Lists

unread,
Jun 21, 2021, 10:30:04 AM6/21/21
to
On 18/06/21 10:31, Adam Carter wrote:
> On Fri, Jun 18, 2021 at 7:15 PM Wols Lists <antl...@youngman.org.uk
> <mailto:antl...@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
>
I hadn't updated fstab - there weren't any entries in it.

As soon as I added the root file system, it remounted fine and it all
works. Now to get Wayland working ... :-) (and write a custom systemd to
start dm-integrity and make my home partition appear ...)

Cheers,
Wol
0 new messages