Running s6 on antiX

Forum Forums antiX-development Development Running s6 on antiX

  • This topic has 18 replies, 4 voices, and was last updated Feb 12-10:46 am by ProwlerGr.
Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #130022
    Forum Admin
    anticapitalista

      This is my pstree

      pstree
      s6-svscan─┬─bash─┬─bash─┬─bash─┬─awk
                │      │      │      └─sleep
                │      │      └─herbstclient
                │      ├─bash
                │      └─dzen2
                ├─dbus-daemon
                ├─dbus-launch
                ├─dhclient
                ├─2*[s6-supervise───s6-ipcserverd]
                ├─6*[s6-supervise───agetty]
                ├─s6-supervise───s6-linux-init-s
                ├─9*[s6-supervise───s6-log]
                ├─23*[s6-supervise]
                ├─s6-supervise───sshd
                ├─s6-supervise───s6-fdholderd
                ├─s6-supervise───foreground───udevd
                ├─s6-supervise───dbus-daemon
                ├─s6-supervise───foreground───seatd
                ├─s6-supervise───haveged
                ├─s6-supervise───acpid
                └─s6-supervise───slimski─┬─Xorg───{Xorg}
                                         └─desktop-session───herbstluftwm───urxvt─┬─bash───pstree
                                                                                  └─urxvt

      Looks and works ok, but in runit I don’t have the following services running

      sshd, dbus-daemon, haveged, acpid, slimski.

      Tips on safely removing them?

      Philosophers have interpreted the world in many ways; the point is to change it.

      antiX with runit - leaner and meaner.

      #130046
      Forum Admin
      anticapitalista

        New pstree with sshd, dbus-daemon, haveged and acpid disabled

        pstree
        s6-svscan─┬─bash─┬─bash─┬─bash─┬─awk
                  │      │      │      └─sleep
                  │      │      └─herbstclient
                  │      ├─bash
                  │      └─dzen2
                  ├─dbus-daemon
                  ├─dbus-launch
                  ├─dconf-service───2*[{dconf-service}]
                  ├─dhclient
                  ├─s6-rc───s6-svlisten1───s6-ftrigrd
                  ├─2*[s6-supervise───s6-ipcserverd]
                  ├─6*[s6-supervise───agetty]
                  ├─s6-supervise───s6-linux-init-s
                  ├─9*[s6-supervise───s6-log]
                  ├─27*[s6-supervise]
                  ├─s6-supervise───s6-fdholderd
                  ├─s6-supervise───foreground───udevd
                  ├─s6-supervise───foreground───seatd
                  └─s6-supervise───slimski─┬─Xorg───{Xorg}
                                           └─desktop-session───herbstluftwm─┬─sudo───urxvt─┬─bash
                                                                            │              └─urxvt
                                                                            ├─urxvt─┬─bash───pstree
                                                                            │       └─urxvt
                                                                            └─urxvt─┬─bash
                                                                                    └─urxvt
        

        Philosophers have interpreted the world in many ways; the point is to change it.

        antiX with runit - leaner and meaner.

        #130047
        Member
        Robin

          Tips on safely removing them?

          Maybe this helps, from
          http://skarnet.org/software/s6/servicedir.html:

          „A service directory foo may contain the following elements:

          An optional, empty, regular file named down. If such a file exists, the default state of the service is considered down, not up: s6-supervise will not automatically start it until it receives a s6-svc -u command. If no down file exists, the default state of the service is up.”

          Windows is like a submarine. Open a window and serious problems will start.

          #130048
          Member
          ProwlerGr

            It makes sense to go through the service bundles & get them organised.
            The bundle that rules the machine is the “default” bundle.
            Every service that is active on boot is included in “default”: either directly, or part of a bundle that is included in “default”, or a dependency to a another service linked to “default”.

            #130057
            Forum Admin
            anticapitalista

              Thanks to both of you.
              Basically I would like a minimum number of service running (let’s say core services as we termed them in our runit edition).
              This ensures any iso (net, core, base and full) will boot.
              Presently on antiX this is basically seatd and udev.
              All others such as dbus, connman, slimski etc should be up to the user to enable or disable.

              Using down is similar to how runit works and that is what I have been experimenting with today through editing the run.user scripts in the services package.

              Philosophers have interpreted the world in many ways; the point is to change it.

              antiX with runit - leaner and meaner.

              #130129
              Member
              ProwlerGr

                Basically as a distro it makes sense to plan and implement some s6-rc service bundles (or 66 trees) somelike as follows – or something similar:

                1) boot – this bundle should contain all essential services to boot a system. This should be static & common on all antiX/MX flavors & should never be modified by users or packages.
                2) net – this should also be common across all antiX/MX flavours & essentially only controlled by the distro to get basic network functionality
                3) core – this should contain all services on the “core” flavor, strictly controlled by the distro.
                4) antix – this should contain all the remaining OOTB services (for antix full), and the last bundle that the distro needs to control
                5) misc – this is where the distro needs to encourage package(r)s to place their service scripts by default to get the default behviour. Users should be encouraged to not modify this manually (the package tools should enable or disable things on install)
                6) custom – this is the bundle that the sysadmins use o tailor their system to suit their indvidual needs
                7) user – this is where users & power users are encouraged to make modifications.

                So when releasing a distro, you would target something like:
                antix net: the “default” bundle should contain bundles 1 & 2 (boot & net) (5, 6 & 7 to be also included but empty of contents OOTB)
                antix core: the “default” bundle should contain bundles 1,2 & 3 – (5, 6 & 7 to be also included but empty of contents OOTB)
                antix full: the “default” bundle should contain bundles 1,2 & 4 – (5, 6 & 7 to be also included but empty of contents OOTB)

                Respins & custom versions would basically be expected to come with custom contents in bundles 5,6 & 7.

                • This reply was modified 1 month, 1 week ago by ProwlerGr.
                #131199
                Forum Admin
                anticapitalista

                  I have been booting into s6 regularly for testing on this laptop. (66 tests are done in VBox).
                  It seems very solid – no crashes etc and as I posted earlier, it boots about 0.8 secs faster than runit, but uses more RAM.

                  I found how to temporary disable running services.

                  sudo s6-rc -d change sshd dbus haveged acpid

                  However, on reboot they appear as running

                  Philosophers have interpreted the world in many ways; the point is to change it.

                  antiX with runit - leaner and meaner.

                  #131553
                  Member
                  ProwlerGr

                    However, on reboot they appear as running

                    I guess the best suggestion I have is grab my latest antix-23.1_amd64_init-diversity-edition_UNOFFICIAL_20240201.iso.
                    A LOT of optimisation & refinement has gone into this.

                    Once you have it installed & booted to s6-rc you should run:

                    sudo rm /etc/s6-rc/sv/default/contents.d/haveged
                    sudo rm /etc/s6-rc/sv/default/contents.d/acpid
                    sudo rm /etc/s6-rc/sv/antix/contents.d/sshd
                    sudo s6-db-reload

                    The first 2 commands remove ‘haveged’ & ‘acpid’ directly from the ‘default” bundle, the 3rd removes ‘sshd’ from the “antix” bundle which is linked to “default”.
                    The last command is a shell script I wrote & packaged to safely recompile the database with the new service & bundle states (not available or policy compatible with previous respin versions).
                    If you cast your eye through it you’ll get a good understanding of how it works.

                    • This reply was modified 3 weeks, 6 days ago by ProwlerGr. Reason: sudo s6-db-reload
                    #131679
                    Member
                    ProwlerGr

                      Just realised a typo, the actual command to recompile the database is
                      sudo s6-db-reload
                      (not s6-db-update that I had typed originally).

                      Did you manage to test it for disabling startup services?

                      #132419
                      Forum Admin
                      anticapitalista

                        Just realised a typo, the actual command to recompile the database is
                        sudo s6-db-reload
                        (not s6-db-update that I had typed originally).

                        Did you manage to test it for disabling startup services?

                        I did, but I’m using a frankenstein s6 set up on this laptop so it didn’t work.

                        Having said that, I’m really happy at how s6 is working. I have been booting to it for the last 2 weeks.
                        Very minor issues.

                        Philosophers have interpreted the world in many ways; the point is to change it.

                        antiX with runit - leaner and meaner.

                        #132425
                        Forum Admin
                        anticapitalista

                          I managed to get autologin to desktop working, so no more slimski.

                          Boot to desktop has dropped to under 6 seconds! (It was almost 8 with slimski).
                          sth is my alias for start-t herbstluftwm

                          sth
                                  5.92
                          

                          pstree

                          s6-svscan─┬─bash─┬─bash─┬─bash─┬─awk
                                    │      │      │      └─sleep
                                    │      │      └─herbstclient
                                    │      ├─bash
                                    │      └─dzen2
                                    ├─dhclient
                                    ├─2*[s6-supervise───s6-ipcserverd]
                                    ├─s6-supervise───login───startx───xinit─┬─Xorg───{Xorg}
                                    │                                       └─desktop-session───herbstluftwm─┬─sudo───urxvt─┬─bash
                                    │                                                                        │              └─urxvt
                                    │                                                                        └─urxvt─┬─bash───pstree
                                    │                                                                                └─urxvt
                                    ├─s6-supervise───s6-linux-init-s
                                    ├─2*[s6-supervise───s6-log]
                                    ├─2*[s6-supervise───agetty]
                                    ├─s6-supervise───s6-fdholderd
                                    ├─s6-supervise───foreground───udevd
                                    └─s6-supervise───foreground───seatd 
                          

                          sudo ps_mem.py

                          
                           Private  +   Shared  =  RAM used	Program
                          144.0 KiB +  51.5 KiB = 195.5 KiB	s6-linux-init-shutdownd
                          164.0 KiB +  47.5 KiB = 211.5 KiB	seatd
                          176.0 KiB +  43.5 KiB = 219.5 KiB	s6-svscan
                          152.0 KiB +  70.5 KiB = 222.5 KiB	sleep
                          244.0 KiB +  39.5 KiB = 283.5 KiB	startx
                          224.0 KiB +  85.0 KiB = 309.0 KiB	s6-ipcserverd (2)
                          276.0 KiB +  65.5 KiB = 341.5 KiB	s6-fdholderd
                          240.0 KiB + 105.0 KiB = 345.0 KiB	s6-log (2)
                          240.0 KiB + 113.0 KiB = 353.0 KiB	foreground (2)
                          264.0 KiB + 185.5 KiB = 449.5 KiB	xinit
                          316.0 KiB + 222.5 KiB = 538.5 KiB	herbstclient
                          296.0 KiB + 294.0 KiB = 590.0 KiB	agetty (2)
                          592.0 KiB + 241.5 KiB = 833.5 KiB	login
                          860.0 KiB + 249.5 KiB =   1.1 MiB	desktop-session
                            1.3 MiB + 284.5 KiB =   1.6 MiB	sudo
                            1.6 MiB + 147.5 KiB =   1.7 MiB	awk
                            1.3 MiB + 476.5 KiB =   1.8 MiB	s6-supervise (11)
                            2.0 MiB +  55.5 KiB =   2.0 MiB	dhclient
                            1.2 MiB + 998.5 KiB =   2.1 MiB	dzen2
                            3.6 MiB + 191.5 KiB =   3.7 MiB	udevd
                            3.0 MiB +   1.7 MiB =   4.7 MiB	herbstluftwm
                            4.3 MiB +   1.6 MiB =   5.9 MiB	bash (6)
                           11.0 MiB +   9.0 MiB =  20.1 MiB	urxvt (4)
                           85.4 MiB +   1.5 MiB =  86.9 MiB	Xorg
                          ---------------------------------
                                                  136.4 MiB
                          =================================
                          

                          Philosophers have interpreted the world in many ways; the point is to change it.

                          antiX with runit - leaner and meaner.

                          #132431
                          Moderator
                          Brian Masinick

                            I haven’t shared any pstree information in my s6 instances yet; I’ll try to remember to include it in my next report. 86% through the s6 configuration on my decade + system; otherwise it’d be long since completed.

                            • This reply was modified 3 weeks ago by Brian Masinick.

                            --
                            Brian Masinick

                            #132458
                            Member
                            ProwlerGr

                              My boot times have become much slower.
                              With s6-66 now running reliably, I can’t decide what to boot, lol

                              #132470
                              Member
                              ProwlerGr

                                I wonder if the following is possible…

                                Create an s6 service that monitors systemd procecess & kills them every time they try to go up.

                                The end goal would be to boot a fully-blown debian using s6 without the need for software modifications, and having no systemd processes in pstree (or htop)…

                                #132481
                                Moderator
                                Brian Masinick

                                  I’m putting my pstree and other information about my latest script-built init-diversity system in our big thread devoted to that stuff; got it working, so @ProwlerGr the script DOES work when you have a CLEAN system and it DOES NOT work when you build from an already customized system (as you correctly stated previously).

                                  I have two nicely working init-diversity systems!

                                  --
                                  Brian Masinick

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