[1.16.2] "reboot" -> "No such file or directory"?

Ralf Friedl Ralf.Friedl at online.de
Fri Jul 1 09:10:59 UTC 2011


Ed W wrote:
> On 30/06/2011 16:19, Gilles wrote:
>   
>> However when I run /bin/reboot, I get this:
>> ================
>> root:/bin> ./reboot
>> reboot: No such file or directory
>> ================
>>     
>
> I might be on the wrong track, but just a heads up:
>
> You get this error message when you run some script which a shebang that
> points to (say) bash (#!/bin/bash).
In general, this is good to consider, but it is not the cause for this 
problem.
Calling a script with a missing interpreter gives a different message 
that comes from the shell:

$ cat /tmp/test.sh
#!/bin/xxx
$ /tmp/test.sh
-sh: /tmp/test.sh: not found

In this case it was possible to call "busybox", but "busybox reboot" 
gave the same message, so it must come from the reboot applet itself, 
therefor reboot is executed.

I get this message if /sbin/telinit is missing:

execve("/sbin/telinit", ["/sbin/telinit", "6"], [/* 65 vars */]) = -1 
ENOENT (No such file or directory)
brk(0)                                  = 0x63c000
brk(0x65d000)                           = 0x65d000
write(2, "reboot: No such file or directory\n", 34) = 34
exit_group(1)                           = ?

Ralf


More information about the busybox mailing list