(bug ?) the kernel symlinks don't update

Forum Forums antiX-development antiX Respins (bug ?) the kernel symlinks don't update

  • This topic has 13 replies, 6 voices, and was last updated Mar 26-9:58 pm by anticapitalista.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #28743
    Member
    melodie

      Hello,

      I can’t see how to get the /initrd.img and /vmlinuz to point automatically to new installed kernels. However, what I have noticed, while doing a serious STFW about this issue, is that “update-grub” calls grub-mkconfig, and invoking it fails because the PATH does not include /usr/sbin !

      $ cd /usr/sbin/
      $ cat update-grub
      #!/bin/sh
      set -e
      exec grub-mkconfig -o /boot/grub/grub.cfg “$@”
      $

      $ echo $PATH
      /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
      $

      # echo $PATH
      /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
      #

      I have changed the update-grub script from
      exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

      to

      exec /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg "$@"

      which has allowed me to invoke grub-update successfully (using /usr/sbin/grub-update directly to invoke it), so at reboot Grub offered to boot on the last kernel installed.

      However this does not solve it all, and is not perhaps the best way to deal with this issue.

      What can be done ?

      thanks.

      #28750
      Forum Admin
      anticapitalista
        Helpful
        Up
        0
        ::

        antiX does include /usr/sbin!

        echo $PATH
        /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/usr/local/bin:/usr/local/games:/usr/games

        Don’t know what you did to your respin not to invoke it.

        • This reply was modified 3 years, 6 months ago by anticapitalista.

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

        antiX with runit - leaner and meaner.

        #28756
        Anonymous
          Helpful
          Up
          0
          ::

          my guess toward what is at play:

          debian10 merged /usr/sbin (and /usr/bin) (ref: https://wiki.debian.org/UsrMerge and https://lwn.net/Articles/773342/ )

          …and melodie has installed usrmerge -affected packages from debian10 repository.

          #28759
          Member
          melodie
            Helpful
            Up
            0
            ::

            @anticapitalista and @skidoo, thanks. I’ll add the missing paths to /etc/environment then ( https://unix.stackexchange.com/questions/324969/can-i-set-add-something-to-path-system-wide-for-all-users-which-has-lowest-pre ) . This is correct, right?

            #28760
            Member
            melodie
              Helpful
              Up
              0
              ::

              antiX does include /usr/sbin!

              echo $PATH
              /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/usr/local/bin:/usr/local/games:/usr/games

              Hello anticapitalista,

              how come you get two times ‘/usr/local/bin’ in the output of your “echo” ? And no ‘/usr/local/sbin’ ?

              • This reply was modified 3 years, 6 months ago by melodie.
              #28770
              Anonymous
                Helpful
                Up
                0
                ::

                melodie, after reading the usrmerge (perl script) I see that it doesn’t mess with the path definitions.
                The content of /usr/sbin/update-grub (identical to shown in post#1) is same in antiX 17 and 19.
                $ dpkg-query -S /usr/sbin/update-grub
                FWIW, I didn’t find any usermerge -related patches for its buster package https://sources.debian.org/patches/grub2/2.02+dfsg1-20/

                on antiX19 I haven’t been able to reproduce the “echo $PATH” results reported in post #1.
                For sudo and root, the /games directories are not (and definitely should not be) listed in the path.
                Tracking down how that happened (how games wound up listed) might lead you to discover how the /usr/sbin declaration got chopped from your path definition.

                #79770
                Member
                stevesr0
                  Helpful
                  Up
                  0
                  ::

                  Running Sid installed at time of antiX-19.

                  Today,an update of dpkg produced the following warning:

                  Preparing to unpack …/archives/dpkg_1.21.3_amd64.deb …
                  Unpacking dpkg (1.21.3) over (1.21.2) …
                  Setting up dpkg (1.21.3) …
                  [1mdpkg[0m: [1;33mwarning[0m: This system uses merged-usr-via-aliased-dirs, going behind dpkg’s
                  [1mdpkg[0m: [1;33mwarning[0m: back, breaking its core assumptions. This can cause silent file
                  [1mdpkg[0m: [1;33mwarning[0m: overwrites and disappearances, and its general tools misbehavior.
                  [1mdpkg[0m: [1;33mwarning[0m: See <https://wiki.debian.org/Teams/Dpkg/FAQ#broken-usrmerge&gt;.

                  I don’t have usrmerge installed.

                  But, my path (and sudo path) include /usr/sbin and both /usr/games and /usr/local/games.

                  update-grub runs without error message.

                  So, I am perplexed. Is there a reason to install usrmerge if things seem to be working, or wait and install if I actually have a problem that seems to relate to aliased directories?

                  Is there a standard list of aliased directories?

                  Is usrmerge installed by default on base and full installs of antiX now?

                  Appreciate any comments.

                  Thanks.

                  stevesr0

                  #79786
                  Member
                  sybok
                    Helpful
                    Up
                    0
                    ::

                    I know there was a discussion on the forum about finding list of installed packages in antiX (ISOs?) but I could not find it.

                    Off-topic comment:
                    I tested usrmerge on my antiX-19* (testing) and it failed to run/set-up correctly; there is a known bug I saw in mentioned in Ubuntu.
                    Since I was unable/unaware-of-how to fix it, it eventually messed up my system and I decided to reinstall.

                    #79850
                    Member
                    stevesr0
                      Helpful
                      Up
                      0
                      ::

                      Hi sybok,

                      Thanks for comment.

                      I understand that the usrmerge package is to be run once by using one apt command to install it and purge it.

                      I don’t plan to install it at this time.

                      I think the warning is because the usrmerge package is available in the repositories. Apparently, usrmerge is supposesed to symlink /bin, /lib and /sbin to /usr/bin, /usr/lib and /usr/sbin.

                      In my system without usrmerge (unless it was automatically used and purged as noted above), these symlinks exist.

                      So, I have to question if usrmerge is needed or if the current installs of antiX automagically make these symlinks correctly.

                      Hopefully, someone who knows will respond.

                      stevesr0

                      (Note to moderator – my posts are questioning whether usrmerge is actually doing sometehing useful, what that is and how it is supposed to be used. Maybe these posts could be split into a posting with the title “Is usrmerge needed?”.)

                      #79851
                      Forum Admin
                      anticapitalista
                        Helpful
                        Up
                        0
                        ::

                        My sid upgrade showed no issues and dpkg is version 1.21.4 (not 1.21.3).

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

                        antiX with runit - leaner and meaner.

                        #79856
                        Forum Admin
                        anticapitalista
                          Helpful
                          Up
                          0
                          ::

                          BTW a fresh antiX-21 iso (full, base, core and net), uses the *new* way – no need for usrmerge.
                          Same with the antiX-21 sid isos.

                          If upgrading from antiX-19 (or earlier) to antiX-21, DO NOT use usrmerge. It will break your install.

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

                          antiX with runit - leaner and meaner.

                          #79870
                          Moderator
                          Brian Masinick
                            Helpful
                            Up
                            0
                            ::

                            BTW a fresh antiX-21 iso (full, base, core and net), uses the *new* way – no need for usrmerge.
                            Same with the antiX-21 sid isos.

                            If upgrading from antiX-19 (or earlier) to antiX-21, DO NOT use usrmerge. It will break your install.

                            GOOD tip!

                            I was running antiX 21 on a system that is probably more than ten years old, but the software is something I’ve installed in the past couple of months. I dusted off the system that was in the corner, plugged it in, booted it up, updated the software and it ran well – maybe not as FAST as this current generation laptop, which is currently using EndeavourOS, but once logged in and actually doing stuff on the Web, you’d barely notice the difference; only time I could tell was when I’d invoke a new image; yeah, then the old computer was slower, but not at all unusable on antiX 21; it was a pleasant experience!

                            --
                            Brian Masinick

                            #79875
                            Member
                            stevesr0
                              Helpful
                              Up
                              0
                              ::

                              Thanks anticapitalista.

                              I had a dpkg update yesterday to version 1.21.3 and ANOTHER one today to 1.21.4.

                              I will certainly NOT install usrmerge on this system.

                              Is there any need to use usrmerge if one is going to do a fresh install of antiX-19 at this time?

                              stevesr0

                              P.S. Might it be worthwhile to post a warning about usrmerge for people running antiX-19, antiX-21 and the testing and Sid versions, since that package is still in the debian repos.

                              #79877
                              Forum Admin
                              anticapitalista
                                Helpful
                                Up
                                0
                                ::

                                Users of antiX (any version or flavour) should just forget about usrmerge.
                                It is not installed by default on any version.

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

                                antiX with runit - leaner and meaner.

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