You are not logged in.

#1 2015-09-14 19:42:07

zerophase
Member
Registered: 2015-09-03
Posts: 229

[SOLVED]Readonly root partition

I'm setting my root partition up as readonly to hopefully speed up boot times a bit.  I just want to double check that I've moved the options over correctly.

In fstab:

UUID=ea0238be-78af-42b6-aff9-a5c82d5716c9    /             ext4          rw,noatime,data=ordered    0 1

refind_linux.conf:

"ro root=UUID=ea0238be-78af-42b6-aff9-a5c82d5716c9 quiet ipv6.disable=1 rootflags=noatime,data=ordered initrd=intel-ucode.img initrd=initramfs-linux.img elevator=noop video:vesa=off vga=normal"

Are all of the root options from fstab required? Any other options that could speed up boot without compromising stability?  Where would I place the "0 2" for dump and pass in refind_linux.conf, I can't seem to see the equivalent option for bootparam?

Last edited by zerophase (2015-10-27 16:35:19)

Offline

#2 2015-09-14 21:50:42

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED]Readonly root partition

First of all, I don't think mounting any partition as read-only would really improve boot times at all. Depending on the partition it would probably only slow down your boot time as the partition would have to be remounted as read-writable.

The 'ro' and 'rootflags' on your bootloaders configuration are for root partition, not /boot. Here you've set your root to mount as 'ro' and it would have to be remounted as read-write later on slowing down your boot process.

Then there's nothing on your fstab that would mount your /boot as read-only so I'm not sure what you actually tried to do..

You can't put the '0 2' from fstab anywhere on your bootloader config. They are fstab specific options. You should read

man bootparam
man fstab

If you want to prevent your /boot partition from being mounted until it's actually needed you could use the x-systemd.automount option.

There are more ideas on how to improve your boot time on wiki: https://wiki.archlinux.org/index.php/Im … erformance

Offline

#3 2015-09-14 22:23:25

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: [SOLVED]Readonly root partition

From improve boot performance under Filesystem mounts, I'm trying to configure my root partition so it only mounts as readonly and doesn't remount a second time as read write. I misread that section as boot and not root.  So, if I'm going to congifure /root as readonly I need to break off all of the other files on there as seperate partitions? Since I wouldn't have an fstab entry for root is there an equivalent bootparam for dump and pass? (I don't see a particular option for it in man)

Here's what my updated boot arguments would look like:

"ro root=UUID=ea0238be-78af-42b6-aff9-a5c82d5716c9 quiet ipv6.disable=1 rootflags=noatime,data=ordered initrd=intel-ucode.img initrd=initramfs-linux.img elevator=noop video:vesa=off vga=normal"

Last edited by zerophase (2015-09-14 22:28:47)

Offline

#4 2015-09-14 23:07:05

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED]Readonly root partition

With all due respect, you don't seem to understand that segment on the wiki page. It doesn't talk about mounting any partition as read-only anywhere.
Furthermore mounting your root partition as read-only wouldn't be a smart idea as it would most likely prevent some of your system applications from working, you couldn't install/update any packages etc. (unless you had some very complicated partition scheme).

The wiki segment talks about mounting root as read-write right from the beginning of boot process, thus preventing remount later.
I'm quite certain you don't use dump, so you don't need to care about it. If your root is mounted as read-write, it won't get fscked, so fstab's pass doesn't apply here either.

If you really don't understand what you're doing (although linux's boot process should be well documented if you're prepared to do some research), you'd probably be better off leaving this tweak undone.

Apart from "video:vesa=off" which I don't believe could be correct, and that they don't achieve what the wiki section is talking about, your boot arguments look ok to me.

Offline

#5 2015-09-14 23:12:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,564
Website

Re: [SOLVED]Readonly root partition

wiki wrote:

you can avoid a possibly costly remount of the root partition by changing ro to rw on the kernel

The wiki clearly advises to change from readonly to read-write to acheive this benefit (which I suspect is trivial if even detectable).   Why are you trying to do the opposite change at a different time?  Changing the remount from readwrite to readonly would provide no benefit at all, and would lead to all sorts of problems: journals and logs would all fail to be written, updates would fail to download or apply ...


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2015-09-14 23:29:47

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: [SOLVED]Readonly root partition

Yeah, I only need dump if I'm debugging something. I flipped the rw and ro around in that section. I'm turning vesa off since the Nvidia graphics cards give a warning message about it during boot, when I run their drivers. And it sounds like dump would be set to 0 by default if I don't provide a parameter in the boot line.

Is the kernel parameters documentation up to date?  Is there any other documentation I should be reading on this. I mainly come to forums on things like this first, since I tend to find all of those options aren't very well documented or spread out over multiple small blogs. (At least that's what my experience with boost has been like so far)

Offline

Board footer

Powered by FluxBB