View previous topic :: View next topic |
Author |
Message |
CPUFan n00b
Joined: 21 May 2015 Posts: 58
|
Posted: Wed Dec 27, 2017 1:09 pm Post subject: root dir is readonly, fstab ignored? [solved] |
|
|
Hello,
I made a fresh Gentoo install on my laptop. Almost everything works, except for my root directory being mounted read-only (and others not being mounted at all).
What I've tried/checked:
- The UUIDs and PARTUUIDs all match
- Using sda's in the fstab does not do any difference
- /etc/rc.conf has not been altered except that I set RC_PARALLEL to "no"
- Using rc-status in the system rescue CD, I get tons of errors of the kind "mkdir '/run/openrc/starting': No such file or directory'". "/run" does exist, but /run/openrc points to /lib64/rc/init.d, but there is no init.d directory in "/lib64/rc". Maybe this simply doesn't work from a live CD?
- After boot, "/etc/inid.t/root status" says "status: stopped"
- At https://forums.gentoo.org/viewtopic-t-1019602-start-0.html , they solved it by enabling "CONFIG_FILE_LOCKING". I really don't know what it does. Should I try it?
Can someone please give some hints? Below is some data.
Kind regards,
Johannes
---- >8 ----
Some generic info:
- The hard disk is an SSD
- UEFI+gpt are being used
- No LVM/DM/encryption/etc.
boot entry:
Code: |
...
linux /vmlinuz-4.14.8-gentoo-r1 root=PARTUUID=9f75afba-7b9f-4fcd-8efd-bf17c9a29b03 ro
|
/etc/fstab:
Code: |
tmpfs /tmp tmpfs defaults,size=6G 0 0
UUID=FE65-DE9E /boot vfat rw 0 2
UUID=3aac3302-c512-438a-a3fb-2ea3ab7c932c / ext4 acl,user_xattr,noatime,discard 1 1
|
Log directly after boot prompt (no LiveCD involved):
Code: |
$ runlevel
unknown
$ blkid
/dev/sda1: UUID="FE65-DE9E" TYPE="vfat"
/dev/sda2: UUID="3aac3302-c512-438a-a3fb-2ea3ab7c932c" TYPE="ext4"
$ lsblk
lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory
$ ls -a /sys
. .. .keep
$ mount
/dev/root on / type ext4 (ro,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=...k,nr_inodes=...,mode=755)
proc on /proc type proc (rw,nosuid, nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nodev,relatime,size=...,mode=755)
$ mount -a
[314....] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
$ mount
# the same output, plus two new partitions (but root is still mounted ro)
tmpfs on /tmp type tmpfs (rw,relatime,size=...)
/dev/sda1 on /boot type vfat (rw,....,errors=remount-ro)
$ mount -o remount,rw /
[439...] EXT4-fs (sda2): re-mounted. Opts: acl,user_xattr,discard # these options indeed match the fstab
$ mount
# the same output, but /dev/root has changed options, including rw:
/dev/root on / type ext4 (rw,noatime,discard,data=ordered)
|
dmesg: https://paste.pound-python.org/show/wQWUZWbGxLapETkXXZhp/
kernel config: https://paste.pound-python.org/show/SbB5DnNJ7beVllZywNt0/
Last edited by CPUFan on Thu Dec 28, 2017 9:44 am; edited 2 times in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3684
|
Posted: Wed Dec 27, 2017 1:38 pm Post subject: |
|
|
Does it boot using boot option 5) of system rescue cd? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Wed Dec 27, 2017 1:56 pm Post subject: |
|
|
CPUFan,
Code: | lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory |
Under the same test conditions does /sys exist?
Is there anything in /sys ?
Is your kernel set up to provide /sys?
Code: | $ grep SYSFS /usr/src/linux/.config
...
CONFIG_SYSFS=y
... |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
CPUFan n00b
Joined: 21 May 2015 Posts: 58
|
Posted: Wed Dec 27, 2017 2:09 pm Post subject: |
|
|
Thanks for your quick answers.
charles17 wrote: |
Does it boot using boot option 5) of system rescue cd?
|
No. Strangely, booting from hard disk in the rescue CD's menu takes 7 seconds and then still boots from the live disk (I think it's the live disk booted, since it asks for a keymap). It then fails "/sbin/init is not found on root filesystem". However, booting the rescue CD directly works without this error.
NeddySeagoon wrote: | Under the same test conditions does /sys exist?
Is there anything in /sys ?
|
It exists, but there's only ".keep" in it, nothing else. (fyi, it's booted normally, i.e. without live CD)
NeddySeagoon wrote: | Is your kernel set up to provide /sys? |
Yes, it's set to "y".
I'm adding the kernel config to the original post now, just in case it's a kernel issue. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Wed Dec 27, 2017 2:23 pm Post subject: |
|
|
CPUFan,
What do you have in /etc/runlevels/sysinit/ ?
Code: | $ ls /etc/runlevels/sysinit/
devfs dmesg sysfs tmpfiles.dev |
The sysfs entry mounts /sys.
Its a symlink sysfs -> /etc/init.d/sysfs
make it by hand from a livecd if its missing. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
CPUFan n00b
Joined: 21 May 2015 Posts: 58
|
Posted: Wed Dec 27, 2017 2:31 pm Post subject: |
|
|
NeddySeagoon wrote: | What do you have in /etc/runlevels/sysinit/ ? |
Sysfs is there and linking to /etc/init.d/sysfs (like in your case).
Code: | $ ls /etc/runlevels/sysinit
devfs dmesg kmod-static-nodes sysfs udev udev-trigger |
They all link to /etc/init.d scripts with the same name. The only one you have and I don't have is tmpfiles.dev. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Wed Dec 27, 2017 2:50 pm Post subject: |
|
|
CPUFan,
Thats OK. I don't use udev, so don't have udev and udev-trigger.
tmpfiles.dev has been removed in a more recent version of openrc that I have.
Lets try a manual mount of /sys.
Code: | mount -t sysfs sys /sys |
I hope it doesn't work and provides an interesting error message instead.
Check the content of /sys and the end of dmesg _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
CPUFan n00b
Joined: 21 May 2015 Posts: 58
|
Posted: Wed Dec 27, 2017 3:08 pm Post subject: |
|
|
NeddySeagoon,
I'm in non-live-boot, i.e. boot from hard disk:
Code: | $ ls -a /sys
. .. .keep
$ mount -t sysfs sys /sys
$ ls -a /sys
. .. block bus class dev devices firmware fs kernel module power
|
So, no error output from mount. dmesg is silent, too.
Btw, isn't mounting "/sys" done by the "root" job? The root job is "stopped" for some reasons. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Wed Dec 27, 2017 3:57 pm Post subject: |
|
|
CPUFan,
/sysfs is mounted by /etc/init.d/sysfs which is in your sysinit runlevel.
It should be on the boot screen with the Mounting /proc message.
Its is the first handful of messages as OpenRC starts.
Is it there at all?
Do you see a [!!] or an [ok] after it?
My version of /etc/init.d/sysfs shows that it does not depend on anything. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
CPUFan n00b
Joined: 21 May 2015 Posts: 58
|
Posted: Wed Dec 27, 2017 5:08 pm Post subject: |
|
|
NeddySeagoon wrote: |
Is it there at all?
Do you see a [!!] or an [ok] after it?
|
I could see that it did mount /proc and /run, like the live CD, but then, opposed to the live cd, not /sys (which should be next). Instead, it shows something red and immediatelly jumps to the root login.
Booting from my hard disc drive in recovery mode, I get errors on boot (right before it should mount the sysfs), that the "flock" system call was not available. So, following https://forums.gentoo.org/viewtopic-t-1019602-start-0.html, I enable CONFIG_FILE_LOCKING, and ...
... it worked!
I really wonder why this was disabled. Moving my .config away and typing make defconfig generates a new .config with having it set to 'Y'. I could swear I never touched this option.
Maybe CONFIG_FILE_LOCKING did get disabled by enabling another option? At least, I can not see that any option can disable CONFIG_FILE_LOCKING, but my kernel config knowledge is just basic. |
|
Back to top |
|
|
CPUFan n00b
Joined: 21 May 2015 Posts: 58
|
Posted: Thu Dec 28, 2017 9:45 am Post subject: |
|
|
Sorry, I forgot marking this as solved.
Thanks everyone for the help! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|