Is antiX going to get s6 init manager?

Forum Forums antiX-development Development Is antiX going to get s6 init manager?

  • This topic has 291 replies, 23 voices, and was last updated Feb 26-1:17 am by ProwlerGr.
Viewing 15 posts - 256 through 270 (of 292 total)
  • Author
    Posts
  • #130024
    Member
    aitor

      For example I want dhclient to run and dbus not to run.

      As for dbus, you can try to use an environment variable ENABLE_DBUS as follows (not tested):

      #!/bin/execlineb -P
      envfile /etc/s6-rc/config/dbus.conf
      importas -sCuD "yes" ENABLE_DBUS ENABLE_DBUS
      foreground { install -m755 -g 81 -o 81 -d /run/dbus }
      foreground { dbus-uuidgen --ensure }
      fdmove -c 2 1
      if [ "$ENABLE_DBUS" = "yes" ]; then
        echo "[dbus] starting service"
        exec /usr/bin/dbus-daemon --system --nofork --nopidfile --print-pid=3
      else
        echo "[dbus] dbus service disabled to enable it set ENABLE_DBUS=yes environment variable"
        exec s6-svc -Od .
      fi

      Further info: Best practice to disable a service at image run time

      #130027
      Member
      ProwlerGr

        Here is an all inclusive (sysvinit – s6-66 – s6-rc) respin of antix.
        antix-23_i386_sysvinit+s6-66+s6-rc_20240120.iso md5 b3159e9cb4e50463cca74d33a9092127
        antix-23_amd64_sysvinit+s6-66+s6-rc_20240124.iso md5 f440a68ffe5aeb569a027bdac92c81a9

        Just install to a disk or VM and you’ll see “switcher” shortcuts on the Desktop, which allow you to switch between s6-rc s6-66 & sysvinit for next boot

        I have packaged all of @eric tools (66, 66-tools, oblibs, boot-66serv) & I have reconfigured a few of @aitor deb’s to install & compile in “predictable” location’s (s6-linux-init, s6-rc-services) & created a few of my own (s6-rc-init – s6-66-init – s6-66-services).

        My experimental repo’s as follows:

        deb http://deb-s6-rc-66-init-experimental.duckdns.org:8080 experimental-s6 antix-s6
        deb-src http://deb-s6-rc-66-init-experimental.duckdns.org:8080 experimental-s6 antix-s6

        The image above has all the development files installed to be able to compile my sources using apt source xxx --allow-unauthenticated

        @anticapitalista @aitor Please feel free to fork & make them suit your own distro’s & tastes.
        @eric if it suits maybe have a look of how 66 performs on this, I generally experienced a few random quirks, but I really love how 66 handles the services. You have got a winner here.

        • This reply was modified 4 months ago by ProwlerGr. Reason: typos
        • This reply was modified 4 months ago by ProwlerGr.
        • This reply was modified 4 months ago by ProwlerGr. Reason: Replaced amd64 iso
        Attachments:
        #130034
        Member
        ProwlerGr

          The following script is confirmed to work for both amd64 & i386 (edit: amd64 debs updated), if you use a fresh antiX-23_386-full.iso or antiX-23_amd64-full.iso image.

          #!/bin/sh
          echo "disabling backports" 
          echo "# Debian Bookworm backports. Use with caution.
          # deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/bookworm-backports.list
          echo "disabling debian-unstable" 
          echo "# deb http://deb.debian.org/debian sid main contrib non-free non-free-firmware
          # deb-src http://deb.debian.org/debian sid main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/debian-unstable.list
          echo "updating package list"
          apt update
          echo "installing nala"
          apt install -y nala
          echo "installing compile tools to build s6 fron sources"
          nala install -y git git-man lowdown xterm build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder sbuild sbuild-debian-developer-setup crossbuild-essential-amd64 crossbuild-essential-i386 crossbuild-essential-arm64
          echo "enabling debian-unstable" 
          echo " deb http://deb.debian.org/debian sid main contrib non-free non-free-firmware
           deb-src http://deb.debian.org/debian sid main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/debian-unstable.list
          echo "update package list"
          nala update
          echo "Installing official debian s6 sid packages"
          nala install -y s6 execline libexecline-dev libexecline2.9 skalibs-dev libskarnet2.14 libs6-dev
          nala autoremove -y
          echo "disabling debian-unstable" 
          echo "# deb http://deb.debian.org/debian sid main contrib non-free non-free-firmware
          # deb-src http://deb.debian.org/debian sid main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/debian-unstable.list
          echo "update package list"
          nala update
          echo "adding sample packages to test with s6"
          nala install -y samba smbclient nmap xrdp dhcpcd xorgxrdp
          echo "adding firewall rules for samba & xrdp"
          ufw allow samba; ufw allow 3389/tcp; ufw allow 3350/tcp
          echo "adding Prowler's s6-rc/s6-66 experimental repo"
          wget http://deb-s6-rc-66-init-experimental.duckdns.org:8080/--gpg-key/s6-rc-66-experimental-repo.gpg -O /etc/apt/trusted.gpg.d/s6-rc-66-experimental-repo.gpg
          echo "deb http://deb-s6-rc-66-init-experimental.duckdns.org:8080/ experimental-s6 antix-s6
          deb-src http://deb-s6-rc-66-init-experimental.duckdns.org:8080/ experimental-s6 antix-s6" > /etc/apt/sources.list.d/experimental-s6.list
          echo "update package list"
          nala update
          nala install -y s6-rc s6-linux-init s6-portable-utils s6-linux-utils oblibs 66 66-tools boot-66serv libs6-linux-init-1.1 s6-rc-services libs6-linux-init-dev
          echo "you can run 'sudo apt install s6-66-services' to enable s6-66 as init"
          echo "You can run 'sudo rm /etc/apt/sources.list.d/experimental-s6.list.gpg' if you wish to remove the experimental s6-rc/s6-66 repo from your trusted sources"
          echo "script finished"
          

          To switch to s6-66 just install:

          sudo apt install s6-66-services s6-66-init --allow-unauthenticated

          • This reply was modified 4 months ago by ProwlerGr. Reason: Same script works for both i386 & amd64
          • This reply was modified 4 months ago by ProwlerGr. Reason: optimised
          #130035
          Moderator
          Brian Masinick

            @ProwlerGr Thank you very much for the work you’ve already done to provide us these excellent proof of concept versions of s6. I’ve been happily using your previous prototype and it has been working quite well for me. The only notable difference in my typically ways of running various things (with the earlier image) was that I had to run sudo modprobe fuse prior to running my personally downloaded version of Ungoogled Chromium, but then it, and everything else has worked fine.

            Now I look forward to checking out your latest build of antiX 23 ; I see it indicates i386; I’m using an amd64 configuration – AMD Ryzen 5 5500U with Radeon Graphics, so I’m hopeful that I can still test it out; I should know soon because the download just completed.

            Since I already have a nice version installed, I may try this one out first in a VM and see how it goes; anyway, thanks to you, @eric, @aitor, and @anticapitalista for each of your excellent work, your interests in collaborating, and the wonderful software that we are experiencing, even some of the upcoming work; it’s gratifying to see this kind of cross team collaboration!

            --
            Brian Masinick

            #130043
            Member
            ProwlerGr

              I am planning to release a similar amd64 release, i386 got my focus because I was looking to resolve a few problems when I played with it.
              I might need to recompile the missing dependency versions (or use some from @aitor ‘s gnuinos repo) for am64, I’ll see how I go when I get some time.

              #130053
              Member
              aitor

                Here is an all inclusive (sysvinit – s6-66 – s6-rc) respin of antix.
                antix-23_i386_sysvinit+s6-66+s6-rc_20240120.iso

                Thanks a lot for your hard work ProwlerGr, this is very interesting! Downloading the iso image and the packages…

                #130075
                Moderator
                Brian Masinick

                  @calciumsodium Beware that some processes and services were not active on your second ps_mem.py output (pipewire and dependencies, links2, nmbd, dhcpcd and xrdp).

                  aitor wrote:

                  5) Create the following symlinks:

                  ln -s /etc/s6-linux-init/current/bin/init /sbin
                  ln -s /etc/s6-linux-init/current/bin/halt /sbin
                  ln -s /etc/s6-linux-init/current/bin/reboot /sbin
                  ln -s /etc/s6-linux-init/current/bin/shutdown /sbin
                  ln -s /etc/s6-linux-init/current/bin/poweroff /sbin
                  ln -s /etc/s6-linux-init/current/bin/telinit /sbin

                  This should be done either with a .links config file or with a postinst script (see how anticapitalista did it for runit).

                  Step 4 should be done before step 3.

                  This could be part of a meta-package (or script only package)
                  You could could have s6-rc, s6-66, runit & sysvinit infrastructure fully installed on the same system (excluding executable files /init /halt /reboot /shutdown) & switching init systems by installing the relevant metapackage (eg s6-rc-init, s6-66-init, runit-init, sysvinit-init, which handle the symlinks or touch files & control dependencies).
                  It would also enable an apple for apple performance/speed comparison on the same system.

                  Does any of this change with the s6-66 configuration?
                  I’m guessing that the answer is yes, but I am not yet familiar with all of the details.

                  Any guidance or links to where that specific information is available?

                  --
                  Brian Masinick

                  #130132
                  Member
                  ProwlerGr

                    Does any of this change with the s6-66 configuration?

                    My s6-rc-init & s6-66-init packages basically create the symlinks to enable the init system.
                    Typically they would conflict with each other (installing s6-66-init would uninstall s6-rc-init & vice-versa), but at the moment I haven’t introduced conflicting dependencies so they can be concurrently installed (obviously the last installed would be prevailing).
                    The shortcuts on the desktop are just simple manual script shortcuts that swap files init-halt-reboot-shutdown depending on init you want to use on next boot.

                    #130151
                    Member
                    ProwlerGr

                      Here is an all inclusive (sysvinit – s6-66 – s6-rc) respin of antix.
                      antix-23_i386_sysvinit+s6-66+s6-rc_20240120.iso

                      Thanks a lot for your hard work ProwlerGr, this is very interesting! Downloading the iso image and the packages…

                      Bumping this to let all know that original post #post-130027 has been updated to include the amd64 iso link.

                      I hope the community enjoys this even more than the original refracta respin I put out a couple of weeks ago.

                      • This reply was modified 4 months ago by ProwlerGr.
                      #130176
                      Moderator
                      Brian Masinick

                        @prowlergr
                        Thank you for the update.
                        I rebooted my antiX 23 s6 image, which I had updated with the s6-66 code.

                        Immediately after the changes I had difficulty shutting down so I ran sync commands multiple times and then powered off my holding down the power button.

                        Today when I started up everything was great and the shutdown commands were associated with the usual controls so the instructions and the installation works very well.

                        I’m looking forward to an official antiX version with s6. In the meantime this is actually very good as it is. Thanks to the s6 enthusiasts and experts I have every reason to expect an excellent addition to antiX and anticapitalista has already indicated that he was able to install s6 side by side with runit so that’s also encouraging news.

                        --
                        Brian Masinick

                        #130199
                        Member
                        oops

                          @prowlergr
                          Thank you for the update.
                          I rebooted my antiX 23 s6 image, which I had updated with the s6-66 code.

                          Immediately after the changes I had difficulty shutting down so I ran sync commands multiple times and then powered off my holding down the power button.

                          Today when I started up everything was great and the shutdown commands were associated with the usual controls so the instructions and the installation works very well.

                          I’m looking forward to an official antiX version with s6. In the meantime this is actually very good as it is. Thanks to the s6 enthusiasts and experts I have every reason to expect an excellent addition to antiX and anticapitalista has already indicated that he was able to install s6 side by side with runit so that’s also encouraging news.

                          +1 … s6-66 will be a nice alternative too.

                          #130210
                          Moderator
                          Brian Masinick

                            @oops yes s6-66 is what I have installed now and with the 66 additions the basics are working great and even the antiX controls to manage the session, login, logout, reboot, shutdown, poweroff work.

                            --
                            Brian Masinick

                            #130211
                            Member
                            calciumsodium

                              antix-23_amd64_sysvinit+s6-66+s6-rc_20240122.iso

                              Hello @ProwlerGr and all.

                              I downloaded the antiX23 amd64 sysvinit/s6-66/s6-rc combo iso. There was no md5 to check, so I just have to take the download as is.

                              I booted up live OK on an uefi system. I updated the efibootmgr and efivar and installed. It finished installing without error, but when I tried to boot, it did not boot from the installed partition. I had to use another antiX system on another partition as the grub controller in order to boot into this test init partition. This is an issue with the installer, not your iso.

                              When I boot into the installed system of your iso, it was using the s6-rc init. Everything works good. Sound from pipewire works good using firefox-esr.

                              Then I clicked to switch to s6-66 init. I tried the sudo 66 reboot -f command to reboot but it would not reboot. Then I rebooted using sudo reboot. The system froze during reboot. So I did a hard shutdown using the power button. And then power button again to boot up. When it booted up, there was an error that it could not connect to CMST. There was no internet. So I went to Control Center > Network > Select wifi application then chose connman. Then I was able to get wifi using connman.

                              Then I rebooted, but this time, it rebooted, but no graphical X interface. There was only antiX login message via terminal. So I logged in and typed in terminal sudo slimski. Then I was able to get to X. Again the CMST error came up. Then I used the init switch program to get back to S6-rc and rebooted. The computer froze during reboot. I had to use the power button to hard power down and power button to reboot. When I rebooted, I got back to the desktop and everything was fine.

                              Then I used the init switch program to switch to sysvinit. I tried the reboot command that was provided but it would not reboot. And I rebooted using sudo reboot. It froze during reboot. So I used the power button to power down and power button to reboot. This time, there was a kernel panic error and my system is now broken.

                              That is about it. I think I will stop testing this system.

                              • This reply was modified 4 months ago by calciumsodium.
                              Attachments:
                              #130217
                              Member
                              eric

                                I generally experienced a few random quirks[quote]
                                This is strongly interesting for me, can you give me a little more explanation of what you experimented?

                                [quote quote=130075]Does any of this change with the s6-66 configuration?
                                I’m guessing that the answer is yes, but I am not yet familiar with all of the details.
                                Any guidance or links to where that specific information is available?

                                ln -s /etc/s6-linux-init/current/bin/telinit /sbin

                                not needed with 66.

                                Halt, reboot, poweroff, shutdown need wrapper around it if you want to use it calling e.g. halt. 66 provide the

                                66 halt

                                66 reboot

                                and

                                66 poweroff.

                                So, the wrapper script need to call the corresponding command. Personally, i used consolekit on Obarun. Making change at /usr/lib/Consolekit/scripts/ck-system-xxx scripts do the tricks.
                                Anyway, the ProwlerGr script do the necessary about this file.

                                Immediately after the changes I had difficulty shutting down so I ran sync commands multiple times and then powered off my holding down the power button.

                                Doing

                                sudo 66 reboot -f

                                worked perfectly for me right after an fresh installation and switching to 66 through the provided desktop script. As long as 66 is installed, the 66 reboot/poweroff with -f option should works in any case even if the machine was not booted with 66.

                                @eric if it suits maybe have a look of how 66 performs on this

                                So, i found some glitches.

                                The /etc/66/service/boot@system have a user directory inside which is not normal.
                                Doing

                                66 reconfigure boot@system

                                cleaned it up. I don’t known how this directory appear but it has nothing to do at /etc/66/service/boot@system.

                                The runtime service net-lo should not be present and broke the tty when it launched. The configuration of the loopback interface is already done by the boot@system service.
                                Also, the following runtime services need to be removed as long as the corresponding program doesn’t exist

                                ubus, elogind, dhcpcd, NetworkManager, xrdp-sesman.

                                To remove them66 i simply did

                                66 remove ubus elogind dhcpcd NetworManager xrdp-sesman net-lo

                                Some services need a little modifications. Generally speaking, you can safely remove any @build=auto entry and also @options=(log env). By default, the @build key is set to auto.
                                Providing the log for a service is the default and the env options is automatically set if a [environment] section is declared.

                                The wpa-supplicant need to be rectified a little bit. The field @depends=boot@system is not necessary. You already are ensured that the boot@system is up. Let me explain. The boot@system is associated to the tree boot and wpa-supplicant is associated to the tree global, as long as the tree global start AFTER the tree boot, all services from boot tree is already up when the tree global start. So, no need to specify again the dependencies for a service coming from the tree boot.

                                but I really love how 66 handles the services. You have got a winner here.

                                Many thanks ProwlerGr for your works about 66 and your kind words, this is really appreciated and encourages me to continue the works.
                                And thanks to all the contributors to the thread for their interest in 66.

                                @anticapitalista
                                Calling a rc.local script is easy on 66. Simply do

                                
                                # 66 configure boot@system
                                

                                change the LOCAL=!yes, then

                                
                                # 66 reconfigure boot@system
                                

                                Now, the /etc/66/rc.local script will be executed at the next reboot. Don’t forget to define a correct shebang at /etc/66/rc.local script.

                                • This reply was modified 4 months ago by eric.
                                • This reply was modified 4 months ago by eric.
                                #130223
                                Member
                                ProwlerGr

                                  Thanks for the feedback @eric & @calciumsodium. Obviously still experimental but I’m convinced we’re on the right path.
                                  The errors are mostly due to my fresh s6-66-services package, which I will fix incorporating @eric ‘s comments

                                  Generally I found the image as it currently stands rarely doesn’t fully boot correctly with all services enabled.

                                  Then I rebooted, but this time, it rebooted, but no graphical X interface. There was only antiX login message via termin

                                  When this happens I have found if I run commands :

                                  sudo 66 tree init global
                                  sudo 66 tree start global

                                  It would fully boot succesfully.

                                  I will try and update with @eric’s fixes when I get some time.

                                Viewing 15 posts - 256 through 270 (of 292 total)
                                • You must be logged in to reply to this topic.