You are not logged in.

#1 2023-01-03 16:39:04

Cvlc
Member
Registered: 2020-03-26
Posts: 287

[SOLVED] Cleanup "rw" kernel parameter in various pages

Hi,

The Installation guide makes no mention of ever having to add the rw kernel parameter in the kernel cmdline. This parameter however can be found in many pages throughout the wiki which mention kernel parameters.

I've found that I therefore had rw in my kernel parameters for no reason, and removing it works just as well. This might be because mkinitcpio, according to the wiki, defaults to ro if no info is passed from the bootloader (did not check if that was still true). Dracut defaults to the fstab value. Grub / systemd-boot seem to use rw by default though, so wouldn't it be better to have a warning for boot loaders which don't, rather than specifying it everywhere in the wiki ?

As for fstab, the man page that ro/rw has to be specified. However, isn't the "default" parameter a better default ? (it includes rw)

Some impacted pages :

https://wiki.archlinux.org/title/System … ng_loaders
(the skeleton file does not contain rw, contrarily to the example from the wiki)
https://wiki.archlinux.org/title/Kernel_parameters
https://wiki.archlinux.org/title/Fstab#Bind_mount
https://wiki.archlinux.org/title/Btrfs# … _timed_out
https://wiki.archlinux.org/title/Dm-cry … ire_system

probably many others.

Any ideas on that ?

Last edited by Cvlc (2023-01-03 22:13:45)

Offline

#2 2023-01-03 18:30:44

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,069

Re: [SOLVED] Cleanup "rw" kernel parameter in various pages

This might be because mkinitcpio, according to the wiki, defaults to ro if no info is passed from the bootloader (did not check if that was still true)

I guess you refer to the description of the fsck hook in https://wiki.archlinux.org/title/Mkinit … mmon_hooks ?

https://wiki.archlinux.org/title/Fsck#B … e_checkinh has more details, but I think https://man.archlinux.org/man/mkinitcpi … NVIRONMENT probably has the clearest description of all :

rw
Specifies that root should be mounted with readwrite permissions. This is generally only useful if your initramfs uses the fsck hook.

Last edited by Lone_Wolf (2023-01-03 18:31:03)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-01-03 19:25:52

Cvlc
Member
Registered: 2020-03-26
Posts: 287

Re: [SOLVED] Cleanup "rw" kernel parameter in various pages

Thanks for your answer !

I guess you refer to the description of the fsck hook in https://wiki.archlinux.org/title/Mkinit … mmon_hooks ?

I was actually referring to the note at https://wiki.archlinux.org/title/Kernel … meter_list :

mkinitcpio uses ro as default value when neither rw or ro is set by the boot loader. Boot loaders may set the value to use, for example GRUB uses rw by default (see FS#36275 as a reference).

I had missed the part about fsck though. But does fsck need the kernel parameter even if rw is already set by default ? What I mean is, in which cases does rw really need to be forced in the kernel command line as it seems to be the default most of the time ?

Anyway, will read more into it, it looks more complicated than I thought (I'm using btrfs, so not using fsck)

Offline

#4 2023-01-03 20:16:31

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 762

Re: [SOLVED] Cleanup "rw" kernel parameter in various pages

The relevant quote is from mount(8):

defaults

Use the default options: rw, suid, dev, exec, auto, nouser, and async.
Note that the real set of all default mount options depends on the kernel and filesystem type. See the beginning of this section for more details.

Note that when you use an initrd, the root mounting happens twice: in the initrd and after that. The kernel cmdline applies to the initrd and the next depends on which tool creates your initramfs (or if you actually use it). mkinitcpio defaults to ro because the root filesystem does not have to be writable (unless you want to use the fsck hook).

Offline

#5 2023-01-03 22:03:30

Cvlc
Member
Registered: 2020-03-26
Posts: 287

Re: [SOLVED] Cleanup "rw" kernel parameter in various pages

Thanks, that makes sense.

So you don't think any of the pages above need any cleaning up ?

Offline

#6 2023-01-03 22:07:55

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 762

Re: [SOLVED] Cleanup "rw" kernel parameter in various pages

I did not actually check all the pages. The changes should be discussed in the talk pages of the wiki.

Offline

#7 2023-01-03 22:13:25

Cvlc
Member
Registered: 2020-03-26
Posts: 287

Re: [SOLVED] Cleanup "rw" kernel parameter in various pages

Alright, thanks

Offline

Board footer

Powered by FluxBB