View previous topic :: View next topic |
Author |
Message |
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Thu Feb 23, 2023 5:28 pm Post subject: Question about Openrc support [Solved] |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9678 Location: almost Mile High in the USA
|
Posted: Thu Feb 23, 2023 6:00 pm Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Tue Mar 21, 2023 3:07 pm Post subject: |
|
|
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 |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 925 Location: Richmond Hill, Canada
|
Posted: Tue Mar 21, 2023 3:52 pm Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Tue Mar 21, 2023 4:27 pm Post subject: |
|
|
Oh it work perfectly ! I tried that before, but I think I did a mistake when I made the symlink
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Tue Mar 21, 2023 10:34 pm Post subject: |
|
|
I have an another question as well. Openrc clear /run content ? Because all of my software data recorded into /run are erased _________________ 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 |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Tue Mar 21, 2023 10:36 pm Post subject: |
|
|
Fulgurance wrote: | I have an another question as well. Openrc clear /run content ? Because all of my software data recorded into /run are erased |
/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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Wed Mar 22, 2023 9:37 am Post subject: |
|
|
Yeah I realized that finally at night yesterday
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Wed Mar 22, 2023 10:03 am Post subject: |
|
|
Fulgurance wrote: | Yeah I realized that finally at night yesterday
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 |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Wed Mar 22, 2023 10:05 am Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Wed Mar 22, 2023 2:12 pm Post subject: |
|
|
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 |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Wed Mar 22, 2023 3:31 pm Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Wed Mar 22, 2023 5:44 pm Post subject: |
|
|
Cool
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Thu Mar 23, 2023 1:06 pm Post subject: |
|
|
/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 |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Thu Mar 23, 2023 2:34 pm Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Sun Mar 26, 2023 10:43 pm Post subject: |
|
|
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 |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 26, 2023 10:56 pm Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Sun Mar 26, 2023 11:06 pm Post subject: |
|
|
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 |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 26, 2023 11:31 pm Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
Posted: Mon Mar 27, 2023 9:26 am Post subject: |
|
|
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
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 |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Mon Mar 27, 2023 10:08 am Post subject: |
|
|
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
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Mon Mar 27, 2023 10:32 am Post subject: |
|
|
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 |
|
|
Fulgurance Veteran
Joined: 15 Feb 2017 Posts: 1200
|
|
Back to top |
|
|
arnvidr l33t
Joined: 19 Aug 2004 Posts: 629 Location: Oslo, Norway
|
Posted: Mon Apr 03, 2023 6:52 pm Post subject: |
|
|
My router is at 192.168.0.1 which also seems fairly normal, maybe check that as well. _________________
|
|
Back to top |
|
|
|