public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] new machine : root partition mounted RO
@ 2023-05-25  6:02 Philip Webb
  2023-05-25  7:27 ` Michael
  2023-05-25  7:32 ` [gentoo-user] new machine : root partition mounted RO ralfconn
  0 siblings, 2 replies; 5+ messages in thread
From: Philip Webb @ 2023-05-25  6:02 UTC (permalink / raw
  To: Gentoo User

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] new machine : root partition mounted RO
  2023-05-25  6:02 [gentoo-user] new machine : root partition mounted RO Philip Webb
@ 2023-05-25  7:27 ` Michael
  2023-05-26  5:30   ` [gentoo-user] new machine : root partition mounted RO : SOLVED Philip Webb
  2023-05-25  7:32 ` [gentoo-user] new machine : root partition mounted RO ralfconn
  1 sibling, 1 reply; 5+ messages in thread
From: Michael @ 2023-05-25  7:27 UTC (permalink / raw
  To: Gentoo User

[-- Attachment #1: Type: text/plain, Size: 3047 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] new machine : root partition mounted RO
  2023-05-25  6:02 [gentoo-user] new machine : root partition mounted RO Philip Webb
  2023-05-25  7:27 ` Michael
@ 2023-05-25  7:32 ` ralfconn
  1 sibling, 0 replies; 5+ messages in thread
From: ralfconn @ 2023-05-25  7:32 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] new machine : root partition mounted RO : SOLVED
  2023-05-25  7:27 ` Michael
@ 2023-05-26  5:30   ` Philip Webb
  2023-05-26  6:58     ` Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Webb @ 2023-05-26  5:30 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] new machine : root partition mounted RO : SOLVED
  2023-05-26  5:30   ` [gentoo-user] new machine : root partition mounted RO : SOLVED Philip Webb
@ 2023-05-26  6:58     ` Michael
  0 siblings, 0 replies; 5+ messages in thread
From: Michael @ 2023-05-26  6:58 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-26  6:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-25  6:02 [gentoo-user] new machine : root partition mounted RO Philip Webb
2023-05-25  7:27 ` Michael
2023-05-26  5:30   ` [gentoo-user] new machine : root partition mounted RO : SOLVED Philip Webb
2023-05-26  6:58     ` Michael
2023-05-25  7:32 ` [gentoo-user] new machine : root partition mounted RO ralfconn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox