Artix Linux Forum

Init systems => dinit => Topic started by: n00b on 10 January 2025, 01:13:41

Title: root-ro
Post by: n00b on 10 January 2025, 01:13:41
Code: [Select]
sudo dinitctl list
[[+]     ] boot
<snip>
[{+}     ] early-prepare.target
[     {X}] root-ro
[{+}     ] pseudofs
<snip>
[{+}     ] tty6 (pid: 749)


root-ro?
Code: [Select]
cat /lib/dinit.d/root-ro
type    = scripted
command = /bin/mount -o remount,ro,rshared /
restart = false

search root-ro dinit

https://forum.artixlinux.org/index.php/topic,7409.msg44615.html#msg44615

should the package add..
Code: [Select]
options = starts-on-console
?

Should I?
Title: Re: root-ro
Post by: kiblaster on 10 January 2025, 17:44:50
Yes if you want to see the log, or try other methods explained there.
I had to remove ro from
Code: [Select]
command = /bin/mount -o remount,ro,rshared /
to be able to boot in ARMtix.
Title: Re: root-ro
Post by: n00b on 11 January 2025, 00:59:42
edited
Code: (root-ro) [Select]
type    = scripted
command = /bin/mount -o remount,ro,rshared /
options = starts-on-console
restart = false
$: sudo dinitctl restart root-ro
 cannot restart service; service not started.
$: sudo dinitctl start root-ro
Service 'root-ro' failed to start.
Reason: service process terminated before ready: exited - status 32
$: sudo dinitcheck root-ro
[sudo] password for e:
Checking service: root-ro...
Performing secondary checks...
Secondary checks complete.
No problems found.

I got nothing.
Title: Re: root-ro
Post by: kiblaster on 11 January 2025, 08:56:48
I used the logfile option in my case.
I had error 32 too, this is the log:
Code: [Select]
mount: /: mount point is busy.
       dmesg(1) may have more information after failed mount system call.
Title: Re: root-ro
Post by: n00b on 11 January 2025, 15:10:47
@davmac  thought options = starts-on-console should fix the 32 error, yes?
Title: Re: root-ro
Post by: kiblaster on 12 January 2025, 08:49:00
That is to show the log in the console.
Because root-ro will prevent things to work.
Title: Re: root-ro
Post by: davmac on 09 February 2025, 09:57:54
@davmac  thought options = starts-on-console should fix the 32 error, yes?

That's unlikely to fix anything, it may help with debugging the issue though if you don't have any other logging for the service.
Title: Re: root-ro
Post by: Wirlaburla on 11 June 2025, 01:51:04
Is there an official solution to this? I am facing this exact problem and it is getting annoying. Same log output. My workaround is to go into the recovery, umount /, and then exit it and restart the boot sequence.
Title: Re: root-ro
Post by: kiblaster on 12 June 2025, 19:10:06
Is there an official solution to this? I am facing this exact problem and it is getting annoying. Same log output. My workaround is to go into the recovery, umount /, and then exit it and restart the boot sequence.

Yes I wrote it here:
Yes if you want to see the log, or try other methods explained there.
I had to remove ro from
Code: [Select]
command = /bin/mount -o remount,ro,rshared /
to be able to boot in ARMtix.

You can copy the service in /etc/dinit.d folder that has more priority that the original, man dinit:
Quote
/etc/dinit.d, /run/dinit.d, /usr/local/lib/dinit.d, /lib/dinit.d
              Default locations for service description files. The directories
              are searched in the order listed.
Title: Re: root-ro
Post by: Wirlaburla on 12 June 2025, 19:21:42
Is there an official solution to this? I am facing this exact problem and it is getting annoying. Same log output. My workaround is to go into the recovery, umount /, and then exit it and restart the boot sequence.

Yes I wrote it here:
Yes if you want to see the log, or try other methods explained there.
I had to remove ro from
Code: [Select]
command = /bin/mount -o remount,ro,rshared /
to be able to boot in ARMtix.

You can copy the service in /etc/dinit.d folder that has more priority that the original, man dinit:
Quote
/etc/dinit.d, /run/dinit.d, /usr/local/lib/dinit.d, /lib/dinit.d
              Default locations for service description files. The directories
              are searched in the order listed.

This seems more like a hack than a solution. The service is called "root-ro", so making it no longer mount as "ro" when there must be a good reason why it is depended on seems risky.
Title: Re: root-ro
Post by: konimex on 13 June 2025, 03:49:54
This seems more like a hack than a solution. The service is called "root-ro", so making it no longer mount as "ro" when there must be a good reason why it is depended on seems risky.
This might be a holdover from Arch (e.g. those who actually migrated their repos instead of fresh install), but sometimes the kernel parameter will mount root as rw, preventing proper fsck (which needs the filesystems to be either unmounted or mounted ro).

Note that I didn't reply to this thread at all since I can't reproduce this at all whether on my daily system or a fresh installation of x86_64 Artix.
Title: Re: root-ro
Post by: Wirlaburla on 14 June 2025, 06:34:53
This might be a holdover from Arch (e.g. those who actually migrated their repos instead of fresh install), but sometimes the kernel parameter will mount root as rw, preventing proper fsck (which needs the filesystems to be either unmounted or mounted ro).
Oh my god. I didn't even realize but I did have 'rw' in my kernel parameters in my EFISTUB. Removing that solved it.
Title: Re: root-ro
Post by: kiblaster on 16 June 2025, 21:40:51
This seems more like a hack than a solution. The service is called "root-ro", so making it no longer mount as "ro" when there must be a good reason why it is depended on seems risky.
This might be a holdover from Arch (e.g. those who actually migrated their repos instead of fresh install), but sometimes the kernel parameter will mount root as rw, preventing proper fsck (which needs the filesystems to be either unmounted or mounted ro).

Note that I didn't reply to this thread at all since I can't reproduce this at all whether on my daily system or a fresh installation of x86_64 Artix.

In ARMtix I was using kernel and some files from Arch cause that machine needs not mainlined driver and quirks, thanks.

After removing "ro" I used that machine for long time without problems, now I do not have that device anymore.