You are not logged in.

#1 2013-07-24 11:14:17

cm
Member
Registered: 2013-07-24
Posts: 32

root device not read-write warning

There's a new warning message (https://projects.archlinux.org/mkinitcp … a191b3233a) that goes like this:
WARNING:
The root device is not configured read-write! It may be
fscked again later!

I was told to configure grub correctly but whatever I do I always have to manually modify /boot/grub/grub.cfg
and remove " ro " even if I explicitly add " rw " in /etc/default/grub. How can I make grub-mkconfig not put " ro "
in /boot/grub/grub.cfg? Is this documented somewhere?

I considered using syslinux instead but couldn't figure out how I can install it somewhere else than MBR.

Last edited by cm (2013-07-24 14:42:52)

Offline

#2 2013-07-24 12:29:42

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: root device not read-write warning

Perhaps you should post your /etc/default/grub ...

Offline

#3 2013-07-24 12:41:00

Rog
Member
Registered: 2010-12-02
Posts: 9

Re: root device not read-write warning

I have this warning too.

/boot/syslinux/syslinux.cfg

DEFAULT tux
LABEL tux
LINUX ../vmlinuz-linux
APPEND root=/dev/sda1 ro init=/usr/lib/systemd/systemd
INITRD ../initramfs-linux.img

/etc/fstab

# /dev/sda1 LABEL=Root
UUID=d32b156a-20dd-4a30-952f-e115e4e15901	/	ext4	rw,relatime	0 1

# /dev/sda2 LABEL=Home
UUID=d5f55c01-05ff-4fb2-8760-0d202edaca23	/home	ext4	rw,relatime	0 2

Offline

#4 2013-07-24 13:01:24

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,399
Website

Re: root device not read-write warning

Rog wrote:

I have this warning too.

/boot/syslinux/syslinux.cfg

...
APPEND root=/dev/sda1 ro init=/usr/lib/systemd/systemd
...

Change your APPEND line, in case it's not obvious, 'ro' should be 'rw'.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2013-07-24 13:17:33

FarStar07
Member
Registered: 2012-04-02
Posts: 51

Re: root device not read-write warning

Hello,

Have you [Testing] enabled? After the last "big" update, the message "root device is not configured read-write..." appeared. But there was a Pacman's warning during the update:

systemd 205 restructures the cgroup hierarchy and changes internal protocols. You should reboot at your earliest convenience. The "timestamp" hook for mkinitcpio no longer exists. If you used this hook, you must remove it from /etc/mkinitcpio.conf. A "systemd" hook has been added which provides this functionality, and more.

So, in /etc/mkinitcpio.conf file, replace the 'base', 'usr', 'udev' and 'timestamp' hooks by systemd hook only.
For information, my hooks line is:

HOOKS="systemd keymap autodetect modconf block keyboard filesystems fsck"

Then, sudo mkinitcpio -p linux in a terminal and reboot. Here, the problem has been solved like that.

Last edited by FarStar07 (2013-07-24 14:10:47)

Offline

#6 2013-07-24 14:09:58

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: root device not read-write warning

Before this thread gets littered with misinformation and "workarounds"...

This is the change in mkinitcpio which generates the warning. It's necessary in response to this systemd commit.

Restated: Previously, if you included the 'fsck' hook in mkinitcpio.conf, early init would write to /run/initramfs/root-fsck after fsck'ing root. This flag file would tell systemd that root has already been checked, and there's no need to check it again. Support for reading this flag file has been removed and now the only indication that systemd should not fsck the root device is that it's mounted read-write. So, if you now include the 'fsck' hook in /etc/mkinitcpio.conf and specify neither 'ro' or 'rw' on your kernel commandline, or explicitly specify 'ro', systemd will fsck your root device again. This is why the warning exists.

Yes, using the 'systemd' hook is an option. An option and not a requirement. Just fix your kernel commandline to specify 'rw' instead of 'ro' (or nothing) so that your root device is mounted rw after fsck'ing.

Offline

#7 2013-07-24 14:16:14

FarStar07
Member
Registered: 2012-04-02
Posts: 51

Re: root device not read-write warning

@falconindy: I understand better now. Thank you for the clarification smile

Offline

#8 2013-07-24 14:42:00

cm
Member
Registered: 2013-07-24
Posts: 32

Re: root device not read-write warning

falconindy wrote:

Perhaps you should post your /etc/default/grub ...

/etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet rw"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter 
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" 
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper 
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

#GRUB_SAVEDEFAULT="true"
falconindy wrote:

Yes, using the 'systemd' hook is an option. An option and not a requirement. Just fix your kernel commandline to specify 'rw' instead of 'ro' (or nothing) so that your root device is mounted rw after fsck'ing.

How do I specify 'rw' instead of 'ro' the correct way with grub?

Last edited by cm (2013-07-24 14:44:25)

Offline

#9 2013-07-24 14:48:27

cm
Member
Registered: 2013-07-24
Posts: 32

Re: root device not read-write warning

FarStar07 wrote:

So, in /etc/mkinitcpio.conf file, replace the 'base', 'usr', 'udev' and 'timestamp' hooks by systemd hook only.
For information, my hooks line is:

HOOKS="systemd keymap autodetect modconf block keyboard filesystems fsck"

Then, sudo mkinitcpio -p linux in a terminal and reboot. Here, the problem has been solved like that.

But you still have the fsck hook in there. Isn't that a problem? systemd is mandatory so I don't mind replacing
the other four hooks with 'systemd'.

before

HOOKS="base udev modconf block filesystems keyboard fsck autodetect"

after

HOOKS="systemd modconf block filesystems keyboard fsck autodetect"

Last edited by cm (2013-07-24 14:50:32)

Offline

#10 2013-07-24 14:57:57

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: root device not read-write warning

cm wrote:
FarStar07 wrote:

So, in /etc/mkinitcpio.conf file, replace the 'base', 'usr', 'udev' and 'timestamp' hooks by systemd hook only.
For information, my hooks line is:

HOOKS="systemd keymap autodetect modconf block keyboard filesystems fsck"

Then, sudo mkinitcpio -p linux in a terminal and reboot. Here, the problem has been solved like that.

But you still have the fsck hook in there. Isn't that a problem? systemd is mandatory so I don't mind replacing
the other four hooks with 'systemd'.

before

HOOKS="base udev modconf block filesystems keyboard fsck autodetect"

after

HOOKS="systemd modconf block filesystems keyboard fsck autodetect"

I think you need to re-read my post more carefully. You're wrong on several accounts. No, fsck isn't a problem. No, systemd is not mandatory.

Offline

#11 2013-07-24 16:01:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,193

Re: root device not read-write warning

Moving to testing.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2013-07-24 16:15:15

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 368

Re: root device not read-write warning

falconindy wrote:

So, if you now include the 'fsck' hook in /etc/mkinitcpio.conf and specify neither 'ro' or 'rw' on your kernel commandline, or explicitly specify 'ro', systemd will fsck your root device again. Just fix your kernel commandline to specify 'rw' instead of 'ro' (or nothing) so that your root device is mounted rw after fsck'ing.

At least for me this is not true. If I don't specify 'rw' at the command line fscking will be done twice. Looking at the grub kernel boot line by pressing e during grub boot reveals that there is a 'ro' anyway, its only overruled if you put 'rw' in, then it looks something like root=/dev/disk-by-uuid/blah ro rw other parameters blah.

So simply removing ro from the kernel commandline is not enough.

I use an encrypted disk setup through luks.  Maybe it's because of this. Just a FYI

Harvey


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#13 2013-07-24 16:19:52

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: root device not read-write warning

people gotta read more carefully... don't you know that falconindy is always right?


This silver ladybug at line 28...

Offline

#14 2013-07-24 16:21:40

cm
Member
Registered: 2013-07-24
Posts: 32

Re: root device not read-write warning

falconindy wrote:
cm wrote:
FarStar07 wrote:

So, in /etc/mkinitcpio.conf file, replace the 'base', 'usr', 'udev' and 'timestamp' hooks by systemd hook only.
For information, my hooks line is:

Then, sudo mkinitcpio -p linux in a terminal and reboot. Here, the problem has been solved like that.

But you still have the fsck hook in there. Isn't that a problem? systemd is mandatory so I don't mind replacing
the other four hooks with 'systemd'.

before

HOOKS="base udev modconf block filesystems keyboard fsck autodetect"

after

HOOKS="systemd modconf block filesystems keyboard fsck autodetect"

I think you need to re-read my post more carefully. You're wrong on several accounts. No, fsck isn't a problem. No, systemd is not mandatory.

I did read your post carefully and only consider replacing the old hooks with 'systemd' because systemd is
mandatory and so it's a good idea to change the hooks. I didn't say this would solve the problem and because
I didn't understand how that did solve the problem for FarStar07 I asked about it. You keep saying I should
configure grub correctly but I cannot find a way to suppress the automatically added 'ro' and as Harey
confirmed having 'ro' and 'rw' doesn't work.

How do I configure grub so that grub-mkconfig does not automatically add 'ro'. Is this unsolvable with grub?
I don't like grub2 myself but couldn't figure out how to install syslinux somewhere else than MBR.

Offline

#15 2013-07-24 16:35:34

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,399
Website

Re: root device not read-write warning

Harey wrote:
falconindy wrote:

So, if you now include the 'fsck' hook in /etc/mkinitcpio.conf and specify neither 'ro' or 'rw' on your kernel commandline, or explicitly specify 'ro', systemd will fsck your root device again. Just fix your kernel commandline to specify 'rw' instead of 'ro' (or nothing) so that your root device is mounted rw after fsck'ing.

At least for me this is not true. If I don't specify 'rw' at the command line fscking will be done twice.

But... that's what he said.

If you have "ro", replace it with "rw"
If you have neither, add "rw"


Again, having neither, or ro will result in your root partition being fscked twice. Having rw will prevent this.

Having both ro and rw wasn't covered, but I'd expect whichever appeared last would be used.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#16 2013-07-24 18:05:27

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: root device not read-write warning

cm wrote:

I considered using syslinux instead but couldn't figure out how I can install it somewhere else than MBR.

Don't bother I see the warning with syslinux 6.01.

Last edited by Leonid.I (2013-07-24 18:14:31)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#17 2013-07-24 18:14:00

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: root device not read-write warning

falconindy wrote:

Restated: Previously, if you included the 'fsck' hook in mkinitcpio.conf, early init would write to /run/initramfs/root-fsck after fsck'ing root. This flag file would tell systemd that root has already been checked, and there's no need to check it again. Support for reading this flag file has been removed and now the only indication that systemd should not fsck the root device is that it's mounted read-write. So, if you now include the 'fsck' hook in /etc/mkinitcpio.conf and specify neither 'ro' or 'rw' on your kernel commandline, or explicitly specify 'ro', systemd will fsck your root device again. This is why the warning exists.

Thanks for the explanation. Please note that I don't consider it to be a mkinitcpio's fault as extra warnings are always useful.

However, this systemd behavior you mentioned is rather annoying. For example, on all my machines root is mounted read-only in kernel command line and fstab, e.g.

UUID=xxx   /   ext4   ro,nodev,discard,relatime,data=ordered	0 1

Do I understand correctly that in order to make systemd happy I have to put "rw" in the boot line only to have root remounted "ro" later?


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#18 2013-07-24 18:19:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: root device not read-write warning

Leonid.I wrote:
UUID=xxx   /   ext4   ro,nodev,discard,relatime,data=ordered	0 1

Do I understand correctly that in order to make systemd happy I have to put "rw" in the boot line only to have root remounted "ro" later?

I don't understand your config -- if your root is only ever read only, why are you checking it at all? You want a passno of 0 in your fstab and you don't need the fsck hook in the initramfs.

Last edited by falconindy (2013-07-24 18:24:51)

Offline

#19 2013-07-24 18:58:21

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: root device not read-write warning

falconindy wrote:
Leonid.I wrote:
UUID=xxx   /   ext4   ro,nodev,discard,relatime,data=ordered	0 1

Do I understand correctly that in order to make systemd happy I have to put "rw" in the boot line only to have root remounted "ro" later?

I don't understand your config -- if your root is only ever read only, why are you checking it at all? You want a passno of 0 in your fstab and you don't need the fsck hook in the initramfs.

No, not ever. It is read-only most of the time, but of course is remounted rw when updating, etc... So I would very much like to check it from initramfs periodically (hence I have the fsck hook).

I simply don't understand why systemd assumes that a normal system boot = read-write mounted root. I mean dracut is fine, but it's not the only initramfs framework out there.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#20 2013-07-24 19:10:35

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: root device not read-write warning

Leonid.I wrote:

No, not ever. It is read-only most of the time, but of course is remounted rw when updating, etc... So I would very much like to check it from initramfs periodically (hence I have the fsck hook).

Then get rid of the fsck hook from the initramfs, let systemd deal with it later on.

Offline

#21 2013-07-24 19:23:04

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: root device not read-write warning

OK thanks.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#22 2013-07-24 20:18:03

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: root device not read-write warning

anyway, I have rw in /etc/fstab for all my mountables filesystems
but grub-mkconfig put automagically a ro in the grub-lines
this is a probem in grub-mkconfig? because as you say this give me the nasti problem without any modification from vanilla

may a feature request for remove (and give the user the responsability to set this as rw or ro) or change to rw in a clear grub-mkconfig ??


Well, I suppose that this is somekind of signature, no?

Offline

#23 2013-07-25 00:58:51

4javier
Member
From: Italia
Registered: 2010-12-01
Posts: 115

Re: root device not read-write warning

Maybe the "automatic ro issue" is due to line 138 of  /util/grub.d/10_linux.in?

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

I have a question: if we (fsck hook or systemd) are always fscking root partition at every boot, isn't useless set pass field to 1 for root partition in fstab?

Offline

#24 2013-07-25 01:24:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: root device not read-write warning

4javier wrote:

I have a question: if we (fsck hook or systemd) are always fscking root partition at every boot, isn't useless set pass field to 1 for root partition in fstab?

Yes. But only if it's fsck'd in early userspace.

Last edited by falconindy (2013-07-25 01:24:33)

Offline

#25 2013-07-25 11:01:31

Rog
Member
Registered: 2010-12-02
Posts: 9

Re: root device not read-write warning

if systemd 206 checks root file system integrity at boot, can i remove fsck in mkinitcpio.conf ?

Thanks!

Last edited by Rog (2013-07-25 11:01:41)

Offline

Board footer

Powered by FluxBB