Cannot reboot from busybox

IraqiGeek geek at
Fri Dec 23 08:28:32 UTC 2005

On Friday, December 23, 2005 8:01 AM GMT,
Rob Landley <rob at> wrote:

> On Thursday 22 December 2005 23:57, IraqiGeek wrote:
>> I named the file testprog.c, compiled like this:
>> cc -c testprog.c
> Just go "gcc testprog.c" and it'll create a file called "a.out" (or
> feed it "-o testprog" to have that file be called testprog instead).
> I just compiled it and it compiled for me.
>> I got testprog.o, but when I try to link:
>> ld testprog.o
>> I get the following:
>> ld: warning: cannot find entry _start; defaulting to 08048094
>> testprog.o(.text+0x24): In function 'main'
>> testprog.c: undefined reference to 'reboot'
> It's not finding the c library, because you're compiling it wrong.
> If you explicitly tell it to break up the linking phase, you have to
> explicitly tell it to link with libc.
> Have you ever compiled a c program before?

Not under Linux (or any *nix OS for that matter). I am realatively new to 
Linux, and mostly learning things as I go through my little project.

Anyway, the C program worked like a charm, and the system shut down in a 
blink (I think it bypassed the rc.shutdown script as the shutdown was way 
too fast).

To quote your previous email, this means that "busybox init being horked 
again", what do you mean by that? and what should I do?

I am using busybox 1.01, glibc 2.3.6 for the mini system, and 2.3.4 on the 
LFS system, where everything is being compiled. Another thing I am doing 
(again, I dont think its the reason behind this) is stripping the built 
system with the following command:

find /{,usr/}{bin,lib,sbin} -type f -exec strip --strip-debug '{}' ';'


More information about the busybox mailing list