Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about Openrc support [Solved]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Thu Feb 23, 2023 5:28 pm    Post subject: Question about Openrc support [Solved] Reply with quote

Hi, I have a question about Openrc. I am building actually a Linux system fully from scratch

I would like to install Openrc in my system . But I have one question. Do I need to patch always all sources to work properly with Openrc ? Or normally software providers made their code available for systemd and Openrc ?

I think I can worry about the answer

It's just I prefer Openrc than systemd
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path


Last edited by Fulgurance on Thu Jun 08, 2023 7:06 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Thu Feb 23, 2023 6:00 pm    Post subject: Reply with quote

since systemd is what's used by the 400 pound gorilla, chances are if the software is normally started at boot time, it will include the relevant service files for systemd.

If the software does not need to be started at boot time, then openrc/systemd doesn't matter.

Ideally it's fairly simple to hack up an openrc init.d so the distribution packager won't have too much of an issue. This sort of has always been a problem not only openrc but with original sysvinit and other init systems, the distribution packager usually needs to have their own due to conflicts with other potential software making assumptions about your start up sequence.

The other problem is programs that assume systemd's logind or other services. These are harder to work around but elogind gets part of the way there. Again depends on the software developer's choice... Most of the problematic software are user-experience (desktop environments) versus system/server software where the former are the ones that may be tied into systemd.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Tue Mar 21, 2023 3:07 pm    Post subject: Reply with quote

It's me again. So.

I have a question now. I am actually coding a package manager, and actually it able to install a full CLI system with Linux kernel
I compiled Openrc, but how can set properly the Linux kernel to boot with Openrc init ? Do I need a patch ?

Do I need to set few things before ?

Because actually the linux kernel boot only to the default shell with the normal user. But it didn't boot Openrc
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 925
Location: Richmond Hill, Canada

PostPosted: Tue Mar 21, 2023 3:52 pm    Post subject: Reply with quote

Fulgurance wrote:
Because actually the linux kernel boot only to the default shell with the normal user. But it didn't boot Openrc


This is not the case for Linux mainline kernel.

Linux kernel by default boot into /sbin/init. when no initrd. if there is a initrd, it will boot into /init in the initrd, It is the initrd responsible to load whatever need to go further to the system's life cycle.

One possible setup for Openrc is to link openrc-init to /sbin/init. (Symbolic link, hard link or otherwise copy over)
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Tue Mar 21, 2023 4:27 pm    Post subject: Reply with quote

Oh it work perfectly ! I tried that before, but I think I did a mistake when I made the symlink :lol:
Thanks !

Now I have new problems, openrc is hanging when:
I have at the beginning this error: checkpath: owner root:uucp not found (I guess I just need to make a group uucp)
When Local service is loading, it's hanging
If I disable it, when it show: Mounting networking file system, it's hanging again
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Tue Mar 21, 2023 10:34 pm    Post subject: Reply with quote

I have an another question as well. Openrc clear /run content ? Because all of my software data recorded into /run are erased 8O
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Tue Mar 21, 2023 10:36 pm    Post subject: Reply with quote

Fulgurance wrote:
I have an another question as well. Openrc clear /run content ? Because all of my software data recorded into /run are erased 8O

/run is mounted on a tmpfs
Code:
$ df | head -3
Filesystem                                                  1K-blocks      Used Available Use% Mounted on
/dev/root                                                   212868120 152388596  49593608  76% /
tmpfs                                                         1623304        88   1623216   1% /run

_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Wed Mar 22, 2023 9:37 am    Post subject: Reply with quote

Yeah I realized that finally at night yesterday :lol:
Maybe it's better if I record all in /var/ism ? (Ism is the name of my project)
What do you think ?

I found why local service was hanging, with this documentation:
https://wiki.gentoo.org/wiki/OpenRC/openrc-init

Thanks to the gentoo developers, it's super easy too add Openrc to a Linux system from scratch.

I just have one problem now, it's to detect network devices. In my virtual machine I have only lo, so nothing ... Maybe with openrc I need netifrc ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Wed Mar 22, 2023 9:58 am    Post subject: Reply with quote

Just to share you the result of my project :D

Screenshot: https://global.discourse-cdn.com/standard10/uploads/crystal_lang/original/2X/2/2bfda84f097d4fb98240f073b32b10c2dcfadb66.png
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Wed Mar 22, 2023 10:03 am    Post subject: Reply with quote

Fulgurance wrote:
Yeah I realized that finally at night yesterday :lol:
Maybe it's better if I record all in /var/ism ? (Ism is the name of my project)
What do you think ?

It will probably work, but be careful not to have any reapers on /var.
Fulgurance wrote:

I just have one problem now, it's to detect network devices. In my virtual machine I have only lo, so nothing ... Maybe with openrc I need netifrc ?

I only use dhcpcd, no netifrc. The only problem I found is that the network is not accessible before login, so netmount doesn't work, but that can be solved other ways.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Wed Mar 22, 2023 10:05 am    Post subject: Reply with quote

Fulgurance wrote:
Just to share you the result of my project :D

Screenshot: https://global.discourse-cdn.com/standard10/uploads/crystal_lang/original/2X/2/2bfda84f097d4fb98240f073b32b10c2dcfadb66.png

Looks nice. Good luck with your project.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Wed Mar 22, 2023 2:12 pm    Post subject: Reply with quote

Thanks !

So do you think of any better alternative than /var ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Wed Mar 22, 2023 3:31 pm    Post subject: Reply with quote

Fulgurance wrote:
So do you think of any better alternative than /var ?

/var/lib/lsm would be the FHS-compliant location.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Wed Mar 22, 2023 5:44 pm    Post subject: Reply with quote

Cool 8)

Just one question. Normally the gentoo documentation recommend to create the links in /etc/init.d and add them to the default run level for the agetty process.

But in my installation for example (I am running Gentoo), it doesn't use that.

I feel like it's an old recommendation.

How is it now ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Thu Mar 23, 2023 1:06 pm    Post subject: Reply with quote

/var/lib ? But it's not lib files, it's data files, in json format. (To record software database)
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Thu Mar 23, 2023 2:34 pm    Post subject: Reply with quote

Fulgurance wrote:
Just one question. Normally the gentoo documentation recommend to create the links in /etc/init.d and add them to the default run level for the agetty process.

You mean this? If you are using openrc-init as process 1 instead of OpenRC combined with sysvinit, then yes. You won't be able to log in without those services running.

Fulgurance wrote:
/var/lib ? But it's not lib files, it's data files, in json format. (To record software database)

Yes, /var/lib, that is what it is for.
Quote:
5.8. /var/lib : Variable state information
5.8.1. Purpose

This hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host.

You are confused by the similarly named /lib and /usr/lib.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Sun Mar 26, 2023 10:43 pm    Post subject: Reply with quote

Thanks a lot for your advices !

Now I just need a bit of help about network.

I enabled all required kernel features to connect to a network (under VirtualBox).

So basically what I need ?

I installed yet dhcpcd.

I guess I need something like eudev or udev.

But do I need something else to make sure my system from scratch recognize properly network devices ?
Actually my system use eudev. Do I need to write rules ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sun Mar 26, 2023 10:56 pm    Post subject: Reply with quote

Fulgurance wrote:

I guess I need something like eudev or udev.

But do I need something else to make sure my system from scratch recognize properly network devices ?
Actually my system use eudev. Do I need to write rules ?

You don't need udev
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Sun Mar 26, 2023 11:06 pm    Post subject: Reply with quote

Okay.

Just to show you, this is what I have when I try to connect to ethernet (screenshot of my VM)

https://www.zupimages.net/up/23/13/nj3a.png

I am not very good with network :(

It's my only weakness :?

And why my network device use the old naming convention eth0 ?
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sun Mar 26, 2023 11:31 pm    Post subject: Reply with quote

Fulgurance wrote:
Okay.

Just to show you, this is what I have when I try to connect to ethernet (screenshot of my VM)

https://www.zupimages.net/up/23/13/nj3a.png

I am not very good with network :(

It's my only weakness :?

And why my network device use the old naming convention eth0 ?

Can you ping localhost on 127.0.0.1?
Can you ping local ip's?
Can you ping external ip's?
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Mon Mar 27, 2023 9:26 am    Post subject: Reply with quote

So when I ping 127.0.0.1, I have network.

You will see how much I am not good for network, I don't know what is local and external ip :o

I did a ping test on localhost (I guess it's the local ip ?), I have network as well
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Mon Mar 27, 2023 10:08 am    Post subject: Reply with quote

Fulgurance wrote:
So when I ping 127.0.0.1, I have network.

You will see how much I am not good for network, I don't know what is local and external ip :o

I did a ping test on localhost (I guess it's the local ip ?), I have network as well

Try pinging your router. It's probably 192.168.1.1.
Try also pinging 8.8.8.8 and 1.1.1.1.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon Mar 27, 2023 10:32 am    Post subject: Reply with quote

Fulgurance,

127.0.0.0/8 is hard wired into the kernel. That's the lo interface. localhost is normally 127.0.0.1/8

See private Address Ranges for a list of the private IPv4 address ranges.
That they are considered private is only a convention. You are not supposed to try to route them over the big bad internet. Your ISP will drop them.
If you clutter their logs they will tell you about it too.

Then there is the link local address range.

There are a few IPv4 Address Blocks Reserved for Documentation too.

That pretty much covers IPv4.
The IPv4 address range is full. Anything not listed above is public.

IPv6 has a similar set of reserved blocks.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Mon Mar 27, 2023 11:10 am    Post subject: Reply with quote

So this is the result I have:

https://www.zupimages.net/up/23/13/5aef.png
_________________
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Back to top
View user's profile Send private message
arnvidr
l33t
l33t


Joined: 19 Aug 2004
Posts: 629
Location: Oslo, Norway

PostPosted: Mon Apr 03, 2023 6:52 pm    Post subject: Reply with quote

My router is at 192.168.0.1 which also seems fairly normal, maybe check that as well.
_________________
Noone wrote:
anything
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum