Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710544 - sys-boot/grub-2.04-r1 sets root readonly explicitly
Summary: sys-boot/grub-2.04-r1 sets root readonly explicitly
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-23 09:01 UTC by kavol
Modified: 2020-02-24 15:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2020-02-23 09:01:15 UTC
Recently, I've changed my way of managing kernel updates, so after ages, I've run grub-mkconfig.

What was my surprise after reboot that the system barely booted, no network, no graphical environment ...

Soon I have found that I can't write anything - that the root filesystem is set to readonly. Chasing the cause, I have found there is "ro" on the kernel commandline!

It seems that the problem comes from /etc/grub.d/10_linux, line 146 reads:

        linux   ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}


Reproducible: Always

Steps to Reproduce:
1. # grub-mkconfig -o /boot/grub/grub.cfg
2. # reboot
3. stare at the boot sequence and wonder why so many things fail ...
Actual Results:  
# mount
/dev/sda1 on / type f2fs (ro ...

Expected Results:  
# mount
/dev/sda1 on / type f2fs (rw ...

Changing 'ro' to 'rw' in /boot/grub.cfg fixed my problem. However, I wonder why this problem doesn't show on my server with the same grub version ... unfortunately, it runs so long that the boot messages have rotated away already, and I don't feel like rebooting it just to see now :-)
Comment 1 Jonas Stein gentoo-dev 2020-02-23 11:18:51 UTC
It is sad to read that you have problems with the software. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 2 kavol 2020-02-23 12:53:21 UTC
Ahem, have you even read the description before pasting your boilerplate and closing this?

Ordinary Gentoo system simply does not work with root filesystem mounted readonly.

While generating grub.cfg grub inserts a parameter to mount root readonly. Thus it breaks.

The mentioned file/line needs to change "ro" to "rw" to fix the problem. The file is not an user configuration but it is distributed in Gentoo, hence this is a defect in Gentoo product.
Comment 3 Alexander Tsoy 2020-02-24 04:30:37 UTC
(In reply to kavol from comment #2)
> The mentioned file/line needs to change "ro" to "rw" to fix the problem.
Mounting rootfs readonly is a standard practice to allow fsck. It should be remounted as readwrite later by /etc/init.d/root (if you use openrc). If this doesn't happen, then there is probably a f2fs-specific bug somewhere.

What version of sys-fs/f2fs-tools is installed on your system? AFAIK, versions prior to 1.13.0 fails to check readonly filesystem and returns error, which in turn prevents "root" service from starting.
Comment 4 Alexander Tsoy 2020-02-24 04:35:51 UTC
See also: bug 681618, bug 666657
Comment 5 Mike Gilbert gentoo-dev 2020-02-24 15:49:24 UTC
As Alexander indicates, the behavior of grub is intentional here.