public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Problems with commands "reboot" and "shutdown"
@ 2024-11-09 17:07 Dr Rainer Woitok
  2024-11-09 17:14 ` Michael
  2024-11-09 17:58 ` ralfconn
  0 siblings, 2 replies; 8+ messages in thread
From: Dr Rainer Woitok @ 2024-11-09 17:07 UTC (permalink / raw
  To: Gentoo-User

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 17:07 [gentoo-user] Problems with commands "reboot" and "shutdown" Dr Rainer Woitok
@ 2024-11-09 17:14 ` Michael
  2024-11-09 18:05   ` Dr Rainer Woitok
  2024-11-09 17:58 ` ralfconn
  1 sibling, 1 reply; 8+ messages in thread
From: Michael @ 2024-11-09 17:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 17:07 [gentoo-user] Problems with commands "reboot" and "shutdown" Dr Rainer Woitok
  2024-11-09 17:14 ` Michael
@ 2024-11-09 17:58 ` ralfconn
  2024-11-10 15:42   ` Steve Evans
  1 sibling, 1 reply; 8+ messages in thread
From: ralfconn @ 2024-11-09 17:58 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 17:14 ` Michael
@ 2024-11-09 18:05   ` Dr Rainer Woitok
  2024-11-09 19:38     ` Dale
  0 siblings, 1 reply; 8+ messages in thread
From: Dr Rainer Woitok @ 2024-11-09 18:05 UTC (permalink / raw
  To: gentoo-user, confabulate

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 18:05   ` Dr Rainer Woitok
@ 2024-11-09 19:38     ` Dale
  2024-11-09 23:55       ` Michael
  0 siblings, 1 reply; 8+ messages in thread
From: Dale @ 2024-11-09 19:38 UTC (permalink / raw
  To: gentoo-user

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

:-)  :-) 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 19:38     ` Dale
@ 2024-11-09 23:55       ` Michael
  2024-11-10  4:08         ` Dale
  0 siblings, 1 reply; 8+ messages in thread
From: Michael @ 2024-11-09 23:55 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

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


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 23:55       ` Michael
@ 2024-11-10  4:08         ` Dale
  0 siblings, 0 replies; 8+ messages in thread
From: Dale @ 2024-11-10  4:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]

Michael wrote:
> 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
>


I'm on the same profile.  Wonder why Rainer shows something else??? 

I booted my old system, it has the same ruby issue I posted about
earlier so it needs fixing too.  This is what I get from my old system,
still on split usr.  I'm including reboot and shutdown as well.


root@fireball / # eselect profile show
Current /etc/make.profile symlink:
  default/linux/amd64/23.0/split-usr/desktop/plasma
root@fireball / # qfile halt
sys-apps/sysvinit: /sbin/halt
root@fireball / # qfile reboot
sys-apps/sysvinit: /sbin/reboot
root@fireball / # qfile shutdown
sys-apps/sysvinit: /sbin/shutdown
root@fireball / #


So, same package and location it seems.  Makes one wonder.  o_O 

Dale

:-)  :-) 

[-- Attachment #2: Type: text/html, Size: 3406 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Problems with commands "reboot" and "shutdown"
  2024-11-09 17:58 ` ralfconn
@ 2024-11-10 15:42   ` Steve Evans
  0 siblings, 0 replies; 8+ messages in thread
From: Steve Evans @ 2024-11-10 15:42 UTC (permalink / raw
  To: gentoo-user

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-10 15:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09 17:07 [gentoo-user] Problems with commands "reboot" and "shutdown" Dr Rainer Woitok
2024-11-09 17:14 ` Michael
2024-11-09 18:05   ` Dr Rainer Woitok
2024-11-09 19:38     ` Dale
2024-11-09 23:55       ` Michael
2024-11-10  4:08         ` Dale
2024-11-09 17:58 ` ralfconn
2024-11-10 15:42   ` Steve Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox