• Re: [gentoo-user] Problems with commands "reboot" and "shutdown"

    From ralfconn@21:1/5 to All on Sat Nov 9 19:00:01 2024
    Il 09/11/24 18:07, Dr Rainer Woitok ha scritto:

    In syslog I found two suspect lines:

    Failed to execute /usr/bin/reboot: No such file or directory
    Failed to execute /usr/bin/poweroff: No such file or directory

    If I'm not mistaken, these are the locations used by "systemd", but I'm running "openrc" which installs these two binaries into "/sbin/". So I

    /bin and /sbin should be symlinks to /usr/bin if you switched to profile
    23.0:

    $ ls -l /
    total 52
    lrwxrwxrwx 1 root root 7 Mar 25 2024 bin -> usr/bin
    drwxr-xr-x 4 root root 4096 Nov 9 11:45 boot
    drwxr-xr-x 16 root root 4220 Nov 9 18:27 dev
    drwxr-xr-x 87 root root 4096 Nov 9 18:02 etc
    drwxr-xr-x 8 root root 4096 Jul 8 2023 home
    lrwxrwxrwx 1 root root 7 Mar 25 2024 lib -> usr/lib
    lrwxrwxrwx 1 root root 9 Mar 25 2024 lib64 -> usr/lib64
    drwx------ 2 root root 16384 Jul 5 2023 lost+found
    drwxr-xr-x 2 root root 4096 Jul 2 2023 media
    drwxr-xr-x 11 root root 4096 Sep 15 20:49 mnt
    drwxr-xr-x 5 root root 4096 Nov 9 10:58 opt
    dr-xr-xr-x 517 root root 0 Nov 9 17:43 proc
    drwx------ 18 root root 4096 Nov 9 18:05 root
    drwxr-xr-x 23 root root 900 Nov 9 18:05 run
    lrwxrwxrwx 1 root root 7 Mar 25 2024 sbin -> usr/bin
    dr-xr-xr-x 12 root root 0 Nov 9 18:51 sys
    drwxrwxrwt 9 root root 320 Nov 9 18:42 tmp
    drwxr-xr-x 12 root root 4096 Apr 28 2024 usr
    drwxr-xr-x 12 root root 4096 Nov 9 10:22 var


    What does 'eselect profile show' return?

    raf

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Sat Nov 9 17:14:39 2024
    On Saturday 9 November 2024 17:07:16 GMT Dr Rainer Woitok wrote:
    Greetings,

    normally I just hibernate my laptop and rarely reboot or shut it down.
    But after building kernel 6.6.58-1 I did of course reboot, or rather I tried, because the laptop either stalled or went into an infinite loop.
    Long pressing the power key did bring the system down, and switching the laptop on again did bring it up, so I could at least investigate.

    In syslog I found two suspect lines:

    Failed to execute /usr/bin/reboot: No such file or directory
    Failed to execute /usr/bin/poweroff: No such file or directory

    If I'm not mistaken, these are the locations used by "systemd", but I'm running "openrc" which installs these two binaries into "/sbin/". So I created these two symbolic links in "/usr/bin/" pointing into "/sbin/". However, running "shutdown" still stalled or went into an infinite loop, though without complaining in syslog about not finding "reboot" and "po- weroff".

    What eventually helped on top of the two symbolic links was rebuilding package "sys-apps/openrc-0.54.2" with additional USE flag "+sysv-utils". However, I don't regard these additional two symbolic links (which are still required) as a real fix but rather as some sort of band-aid.

    Mind that all this is not necessarily a problem with the new kernel ver- sion. It may just have surfaced now because I wanted to boot the new kernel. So, what am I missing? Some news item? Some new USE flag for
    some package I have meanwhile installed or upgraded? Some new configu- ration variable in some configuration file? Some new kernel parameter?
    A bug? I checked the list of open bugs against "sys-apps/openrc", but
    was missing any sort of deja vu.

    Any pointers appreciated.

    Sincerely,
    Rainer

    I'm on 6.6.58-gentoo-r1 compiled from gentoo-sources. No systemd, only
    openrc. This is what I have here:

    ~ $ ls -la /usr/bin/reboot
    lrwxrwxrwx 1 root root 4 May 2 2024 /usr/bin/reboot -> halt

    ~ $ ls -la /usr/bin/poweroff
    lrwxrwxrwx 1 root root 4 May 2 2024 /usr/bin/poweroff -> halt

    ~ $ ls -la /usr/bin/halt
    -rwxr-xr-x 1 root root 22560 May 2 2024 /usr/bin/halt

    I also have:

    ~ $ ls -la /usr/bin/halt.sh
    -rwxr-xr-x 1 root root 101 May 2 2024 /usr/bin/halt.sh

    ~ $ cat /usr/bin/halt.sh
    #!/bin/sh
    if [ "${INIT_HALT}" = HALT ]; then
    exec /sbin/halt -dhn
    else
    exec /sbin/poweroff -dhn
    fi

    Hope this helps.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmcvmH8ACgkQseqq9sKV Zxlnig/9FrUvKb6MAN5WtyTEzRvxPfV1Ql/Qm7cRshSOlZ/OKaTamX5GDtA4utNz Qrd/xg53kumoCiQoPHlXxkF5RNzqBhA09JM3yxZAteVdcHo/Y3t+swzainCcV455 xzkmxD2dtk/ngT5q0F9SE0RAG8SB301cBxK/HeMlh382U1pCln/QMRQFKZN2mv/l nHS2jUMDROVhE77Y8RYenNUxwOhRMPjzHViUwIzXFJ6v/v8kTdv90xwVU5sBYLuX ppXi0mCp3XNuVEJqcVw4+JdLy113Dl5iO2qeedrmXNSb5T5F/OYk02GKlh1PxJ1a nspOnVbwEBlegeEB/4lVsfaB+97OZ8j70GhTKVMS+7CIwc3x6F9f9+ydHieaG4oa zrVDyx/fqFv9oMT/N2zm8TLqCuB+5nhWkvQHy221nw1ATHpUa6TA8cCJQwOR4Y5X i1ggMA9+8/01j0nVlGdgigXWiGxYh/9WL+LjIH5DWVLt1fCSjAr/6jVKyNwhp1xe 32RwPVo6EZ9+Cykn42A8WRqFBsBMD20XD1mptZUrYkgOxWTPSfjSDZSAUxgvSOYV 4NGYlQ2kVk4xyrDFSWq1jM17qpt7Y8Ax6yeTmEZY6mo6rFMkhipZbTEUnlqOuNfp aoObEeI6tbzYjD7yUb29vbUTYE84Wmbz31S13mTRZ5mX5MgCONU=
    =ikIk
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Sat Nov 9 23:55:43 2024
    On Saturday 9 November 2024 19:38:32 GMT Dale wrote:
    Dr Rainer Woitok wrote:
    Michael,

    On Sat, 09 Nov 2024 17:14:39 +0000 you wrote:
    ...
    I'm on 6.6.58-gentoo-r1 compiled from gentoo-sources. No systemd, only
    openrc. This is what I have here:

    ~ $ ls -la /usr/bin/reboot
    lrwxrwxrwx 1 root root 4 May 2 2024 /usr/bin/reboot -> halt

    Hm, interesting. What package does

    equery belongs /usr/bin/halt

    return on your system and what USE flags do you use for that package?

    Sincerely,

    Rainer

    I'm openrc here with a merged /usr setup. Old rig is still split user.
    I could boot it up and get info if needed. This is what I got on new
    rig. As you can see, I had to dig a little. It's not where yours is
    which may be a clue.


    root@Gentoo-1 / # equery belongs /usr/bin/halt
    * Searching for /usr/bin/halt ...
    root@Gentoo-1 / # which halt
    /sbin/halt
    root@Gentoo-1 / # equery belongs /sbin/halt
    * Searching for /sbin/halt ...
    sys-apps/sysvinit-3.09 (/sbin/halt)
    root@Gentoo-1 / #


    That help?

    Dale

    :-) :-)

    ~ # eselect profile show
    Current /etc/portage/make.profile symlink:
    default/linux/amd64/23.0/desktop/plasma

    ~ $ qfile /usr/bin/halt
    ~ $
    ~ $ qfile halt
    sys-apps/sysvinit: /sbin/halt
    ~ $ ls -l /sbin
    lrwxrwxrwx 1 root root 7 Mar 24 2024 /sbin -> usr/bin


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmcv9n8ACgkQseqq9sKV Zxk7ShAAo+UGb9k5+lqaB/Whz8xiDHw0Cl7KkOCfPyo3oluTsyimu9Wx6InJSnud v/HcCmp7VI7GWhf2G2tr4Y/LJyG6GbdqMoJkDH+eB7Lk4ceqMa775EEyMdr0rPeo GXKJy7AwfPimdJdQM/UM90emnS/10Kn07aNnv/D8bJX5h10c5LRf1oomePc0IIBQ /7xl7gQtnFUJa7bTP7tYXEaQq9O+H+pThL6JaBHTzOIGvKrIsBZ0Tlm/Y+9uSYN0 +NaHcodc8rLcjnyusmmESZWMthfcRcncRJC5+wNuuRFqa/CJXZkM7LdrFAeUnefE TTsaDYipBZE354k48IHYDRNjGzNx1J030xK1TTF28oT/rDMWf06/+2wmlf0Te2A/ 3q0cHm7Wi8+JeyG9OX9dfC+87KjgvJ3H1wtYDKEBWLQPnEcd88/lv5ie/eiG/Rq7 LYreOewpLVH+uGGrIuDtjmGWZlyWE9t4/BkZ0VTlViblLjhn8SDoZ+DB1KJ/Vt3d RsBQmHgHOwAXVP5RQMmsbnCOlYOowoomQdotu1GApDU5IALet/qlue5cAN8OisrB oSOtfbd5hsNtXRANUr+d7JULdd66qVOwASeI4mcLQd02n5NIkz/Owv4J7iWaI1zJ Ok4EvSgqwBRqX5PKUyjbiPsOVxehzXd/1lc8vMEkKzVl5x91EcI=
    =vOkx
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Evans@21:1/5 to ralfconn on Sun Nov 10 16:50:01 2024
    On Sat, 9 Nov 2024 18:58:53 +0100
    ralfconn <mentadent47@yahoo.com> wrote:

    Il 09/11/24 18:07, Dr Rainer Woitok ha scritto:

    In syslog I found two suspect lines:

    Failed to execute /usr/bin/reboot: No such file or directory
    Failed to execute /usr/bin/poweroff: No such file or directory

    If I'm not mistaken, these are the locations used by "systemd",
    but I'm running "openrc" which installs these two binaries into
    "/sbin/". So I

    /bin and /sbin should be symlinks to /usr/bin if you switched to
    profile 23.0:


    But not if they switched to 23.0/split-usr like me. I get:

    ls -l /
    total 132

    drwxr-xr-x 2 root root 4096 Oct 6 08:25 bin
    drwxr-xr-x 2 root root 4096 Dec 12 2015 boot
    drwxr-xr-x 19 root root 4660 Nov 5 16:58 dev
    drwxr-xr-x 146 root root 12288 Nov 10 13:33 etc
    drwxrwxr-x 3 root root 4096 Aug 23 2023 exports
    drwxr-xr-x 13 root root 4096 Sep 9 10:50 home
    drwxr-xr-x 13 root root 4096 Nov 3 09:02 lib
    drwxr-xr-x 6 root root 12288 Nov 3 09:02 lib64
    drwx------ 2 root root 16384 Feb 18 2012 lost+found
    drwxr-xr-x 5 root root 4096 Nov 5 16:58 media
    drwxr-xr-x 15 root root 4096 Aug 23 2023 mnt
    drwxr-xr-x 2 root root 0 Nov 10 13:24 net
    drwxr-xr-x 14 root root 4096 Nov 10 13:30 opt
    dr-xr-xr-x 361 root root 0 Oct 31 20:19 proc
    drwx------ 38 root root 12288 Nov 10 13:25 root
    drwxr-xr-x 37 root root 1440 Nov 10 12:04 run
    drwxr-xr-x 2 root root 12288 Nov 3 09:02 sbin
    dr-xr-xr-x 12 root root 0 Nov 9 19:21 sys
    drwxrwxrwt 32 root root 11140 Nov 10 15:39 tmp
    drwxr-xr-x 13 root root 4096 Nov 6 2021 usr
    drwxr-xr-x 15 root root 4096 Nov 5 12:20 var

    and:

    ls -l /sbin/reboot
    lrwxrwxrwx 1 root root 4 Apr 30 2024 /sbin/reboot -> halt

    Steve
    --
    ____________________________________________________________________
    Steve Evans E-mail: mailto:stevee@gorbag.com
    Registered Linux user #217906: http://counter.li.org
    Public Encryption Key: http://www.gorbag.com/public-key.html ____________________________________________________________________

    6.6.58-gentoo-r1 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz GNU/Linux

    15:37:21 up 9 days, 19:17, 7 users, load average: 0.55, 0.70, 0.37

    manic-depressive, adj.:
    Easy glum, easy glow.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Nov 14 19:15:08 2024
    On Thursday 14 November 2024 17:35:42 GMT Dr Rainer Woitok wrote:
    Steve,

    On Sun, 10 Nov 2024 15:42:40 +0000 you wrote:
    On Sat, 9 Nov 2024 18:58:53 +0100

    ralfconn <mentadent47@yahoo.com> wrote:
    ...
    /bin and /sbin should be symlinks to /usr/bin if you switched to

    profile 23.0:
    But not if they switched to 23.0/split-usr like me. I get:
    ...
    ls -l /sbin/reboot
    lrwxrwxrwx 1 root root 4 Apr 30 2024 /sbin/reboot -> halt

    Same on my laptop:

    $ eselect profile show
    Current /etc/portage/make.profile symlink:
    default/linux/amd64/23.0/split-usr/desktop
    $ ls -l /sbin/reboot
    -rwxr-xr-x 1 root root 526 2024-11-08 10:14 /sbin/reboot
    $

    Obviously the problem is somewhere else. Meanwhile I found that running "shutdown" directly from a shell works without the additional symbolic links in directory "/usr/bin/". But selecting "shutdown" or "reboot" in Xfce's "Action Button" popup menu fails when these symbolic links are missing.

    And I found that in syslog the message

    (3) reboo[14713]: Failed to execute /usr/bin/reboot: No such file or directory

    is always immediately preceded (with exactly the same time stamp) by the message

    (5) kernel: elogind-daemon[1877]: System is rebooting.

    But the last update of "sys-auth/elogind" to version 252.9-r2 was end of September and thus _before_ my last successful reboot via Xfce's action buttons and without the symbolic links. So "elogind" seems out.

    As is kernel 6.6.58-r1, because booting an older kernel (6.6.52) without
    the symbolic links didn't work either.

    So currently I'm a bit out of ideas, apart from leaving these symbolic links in "usr/bin/" :-(

    Sincerely,
    Rainer

    I have no split-usr system here to compare notes, but did you try rebuilding the sys-auth/elogind package just in case?

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmc2TDwACgkQseqq9sKV Zxl5/Q//cS0eoff94eQGybLrvpd091BPW1OKyE2Vs//ynpKRSOkWeFOgWeZxgGCH RcwluyoLxki0Nxg7hSWMmXyr8cKFPh4FaI85yU/3kritd2xFsOdi8dJbh1I6GO6F pM5xV7yknKO84Wa4StKrNRiroOAPjWKD6TGePkOdqxFH1pVenijQGaXN53k1XN0C CJAk1Qxf+NU/n6QbRZQaToVWCEWXR4y01XZ4A3+7pOqbwsvJOzoRwnduI8tpSWkC /LDOSZZSU0QjbsylfpfzhovsCw0fXk0VCctr4iPNndsleLCDOYOcCgofyH6cmuYg vJhERdeHZOxrwFoVxzkVGf4rMCBcrzNtLK6qztdto0vUUGDVhLMTrBGORqnl3+1H TtvU/1p2gWaY6+/N+9A4c0lhp/yGAV5Kas+Uf5EBdAlzKirdAycmy9v7qXbM0E+o LZhz09IY3+5pnbRRO374yrmo263AMw/z8X8jYC2J41EUBozzStgo4b66qa9IvCHt vBXbKCSQfg5OtvcpPSyJtHjdl8sBod87sMYYG2XY565ngAhgEiW6Njge6r4lbNEl q6ojA6eWtC4RNggwZDkh2T5Bess3KyUQu8UPFMS9gSyTg/y+J4Lbp+UHwAzu8J8g hQzRJpeMbYZArWWxySoz+FZmwaGO4sjvl0wQg5iVWgu3GPXC530=
    =Y403
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)