You are not logged in.
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
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
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
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
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
@falconindy: I understand better now. Thank you for the clarification
Offline
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"
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
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
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
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
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
people gotta read more carefully... don't you know that falconindy is always right?
This silver ladybug at line 28...
Offline
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
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
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
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
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
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
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
OK thanks.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
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
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
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
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