Mailing List Archive

new machine : root partition mounted RO
The new machine I've built is working well in other ways,
I've gone thro' the 'change-root' steps,
compiled the kernel -- 6.1.27-gentoo-r1 -- ,
configured Lilo -- which has never let me down in 20 years -- ,
created Fstab & rebooted. No problem booting into the new system,
except that it insists on mounting the root filesystem 'read-only'.

It's only '/' : the other fs's listed in Fstab are mounted RW
& I can edit a test file & save it there ; if I try to do that in /etc ,
which is on the root partition, it refuses to save it.

Also, I can't create a user, as it can't alter /etc .

Dmesg shows signs of something wrong ; the gist is

nvme 0000:03:00.0: platform quirk: setting simple suspend
nvme nvme0: pci function 0000:03:00.0

nvme nvme0: Shutdown timeout set to 10 seconds
nvme nvme0: 12/0/0 default/read/poll queues
nvme0n1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10

EXT4-fs (nvme0n1p2): orphan cleanup on readonly fs
EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode.
Quota mode: none.
VFS: Mounted root (ext4 filesystem) readonly on device 259:2.

Adding 32767996k swap on /dev/nvme0n1p3.
Priority:-2 extents:1 across:32767996k SS
EXT4-fs (nvme0n1p7): mounted filesystem with ordered data mode.
Quota mode: none.
EXT4-fs (nvme0n1p8): mounted filesystem with ordered data mode.
Quota mode: none.
EXT4-fs (nvme0n1p9): mounted filesystem with ordered data mode.
Quota mode: none.
EXT4-fs (nvme0n1p10): mounted filesystem with ordered data mode.
Quota mode: none.

Those are the only mentions of a 'nvme' device (an M2 SSD).

As above, I've tested nvme0n1p10 & it's mounted RW.

I've tried 'fsck /dev/nvme0n1p2' & Gparted "check" (via System Rescue) ;
both report no problem very quickly :

fsck : "clean, nn/nn files, nn/nn blocks".
Gparted : "completed : calibrate ; check for errors + fix them ;
grow fs to fill system".

lilo.conf explicitly says 'read-write' twice, incl globally.

Could it be some kernel option ? 'grep' shows no 'read_only' or similar.

Can anyone offer advice ? -- please read my desciption above carefully.

--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
Re: new machine : root partition mounted RO [ In reply to ]
On Thursday, 25 May 2023 07:02:04 BST Philip Webb wrote:
> The new machine I've built is working well in other ways,
> I've gone thro' the 'change-root' steps,
> compiled the kernel -- 6.1.27-gentoo-r1 -- ,
> configured Lilo -- which has never let me down in 20 years -- ,
> created Fstab & rebooted. No problem booting into the new system,
> except that it insists on mounting the root filesystem 'read-only'.
>
> It's only '/' : the other fs's listed in Fstab are mounted RW
> & I can edit a test file & save it there ; if I try to do that in /etc ,
> which is on the root partition, it refuses to save it.
>
> Also, I can't create a user, as it can't alter /etc .
>
> Dmesg shows signs of something wrong ; the gist is
>
> nvme 0000:03:00.0: platform quirk: setting simple suspend
> nvme nvme0: pci function 0000:03:00.0
>
> nvme nvme0: Shutdown timeout set to 10 seconds
> nvme nvme0: 12/0/0 default/read/poll queues
> nvme0n1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10
>
> EXT4-fs (nvme0n1p2): orphan cleanup on readonly fs
> EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode.
> Quota mode: none.
> VFS: Mounted root (ext4 filesystem) readonly on device 259:2.
>
> Adding 32767996k swap on /dev/nvme0n1p3.
> Priority:-2 extents:1 across:32767996k SS
> EXT4-fs (nvme0n1p7): mounted filesystem with ordered data mode.
> Quota mode: none.
> EXT4-fs (nvme0n1p8): mounted filesystem with ordered data mode.
> Quota mode: none.
> EXT4-fs (nvme0n1p9): mounted filesystem with ordered data mode.
> Quota mode: none.
> EXT4-fs (nvme0n1p10): mounted filesystem with ordered data mode.
> Quota mode: none.
>
> Those are the only mentions of a 'nvme' device (an M2 SSD).
>
> As above, I've tested nvme0n1p10 & it's mounted RW.
>
> I've tried 'fsck /dev/nvme0n1p2' & Gparted "check" (via System Rescue) ;
> both report no problem very quickly :
>
> fsck : "clean, nn/nn files, nn/nn blocks".

This is odd. It would normally return something like "XX orphan inodes
deleted" after it asks for your input. Does using 'fsck.ext4 -v' show any
additional information?

Do you see any I/O errors in dmesg when you try to mount it using sysrescue?


> Gparted : "completed : calibrate ; check for errors + fix them ;
> grow fs to fill system".
>
> lilo.conf explicitly says 'read-write' twice, incl globally.
>
> Could it be some kernel option ? 'grep' shows no 'read_only' or similar.
>
> Can anyone offer advice ? -- please read my desciption above carefully.

Check if inadvertently you have specified read only in the fstab, if your
UUID/LABEL/dev is incorrect, or show the relevant /etc/fstab entry - but I'm
guessing you have already looked at your mount options in fstab for this
partition.

Also confirm its mounted status is correct with 'cat /proc/mounts'.

Can you run successfully:

mount -o remount,rw /dev/nvme0n1p2 /

while keeping an eye on 'dmesg -W' for new messages? Any configuration errors
or fs corruption ought to pop up in dmesg and /var/log/messages.

HTH
Re: new machine : root partition mounted RO [ In reply to ]
On 5/25/23 08:02, Philip Webb wrote:
> The new machine I've built is working well in other ways,
> I've gone thro' the 'change-root' steps,
> compiled the kernel -- 6.1.27-gentoo-r1 -- ,
> configured Lilo -- which has never let me down in 20 years -- ,
> created Fstab & rebooted. No problem booting into the new system,
> except that it insists on mounting the root filesystem 'read-only'.
>
> It's only '/' : the other fs's listed in Fstab are mounted RW
> & I can edit a test file & save it there ; if I try to do that in /etc ,
> which is on the root partition, it refuses to save it.
>
> Also, I can't create a user, as it can't alter /etc .
>
> Dmesg shows signs of something wrong ; the gist is
>
> nvme 0000:03:00.0: platform quirk: setting simple suspend
> nvme nvme0: pci function 0000:03:00.0
>
> nvme nvme0: Shutdown timeout set to 10 seconds
> nvme nvme0: 12/0/0 default/read/poll queues
> nvme0n1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10
>
> EXT4-fs (nvme0n1p2): orphan cleanup on readonly fs
> EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode.
> Quota mode: none.
> VFS: Mounted root (ext4 filesystem) readonly on device 259:2.
>
> Adding 32767996k swap on /dev/nvme0n1p3.
> Priority:-2 extents:1 across:32767996k SS
> EXT4-fs (nvme0n1p7): mounted filesystem with ordered data mode.
> Quota mode: none.
> EXT4-fs (nvme0n1p8): mounted filesystem with ordered data mode.
> Quota mode: none.
> EXT4-fs (nvme0n1p9): mounted filesystem with ordered data mode.
> Quota mode: none.
> EXT4-fs (nvme0n1p10): mounted filesystem with ordered data mode.
> Quota mode: none.
>
> Those are the only mentions of a 'nvme' device (an M2 SSD).
>
> As above, I've tested nvme0n1p10 & it's mounted RW.
>
> I've tried 'fsck /dev/nvme0n1p2' & Gparted "check" (via System Rescue) ;
> both report no problem very quickly :
>
> fsck : "clean, nn/nn files, nn/nn blocks".
> Gparted : "completed : calibrate ; check for errors + fix them ;
> grow fs to fill system".
>
> lilo.conf explicitly says 'read-write' twice, incl globally.
>
> Could it be some kernel option ? 'grep' shows no 'read_only' or similar.
>
> Can anyone offer advice ? -- please read my desciption above carefully.

root fs is mounted ro by the kernel and then remounted rw by the
/etc/init.d/root openrc init script; I think the script uses fstab to
find the rootfs. In my /var/log/rc.log I have:

root                      | * Remounting root filesystem read/write ...
[ ok ]

What does your rc.log say?

raf
Re: new machine : root partition mounted RO : SOLVED [ In reply to ]
Thanks to both respondents for their advice.

I solved the problem by changing Fstab col 6 for '/' to '1',
which forces a boot-time Fsck. Apparently, there was some e-grunge
in the file system, which the check cleaned up.
After that '/' was mounted RW & I could proceed.

--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
Re: new machine : root partition mounted RO : SOLVED [ In reply to ]
On Friday, 26 May 2023 06:30:23 BST Philip Webb wrote:
> Thanks to both respondents for their advice.
>
> I solved the problem by changing Fstab col 6 for '/' to '1',
> which forces a boot-time Fsck. Apparently, there was some e-grunge
> in the file system, which the check cleaned up.
> After that '/' was mounted RW & I could proceed.

Yes, this configuration[1] is necessary to be able to check the root fs at
boot, otherwise the default is to mount it as read only if any errors are
encountered.

[1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/
System#Creating_the_fstab_file