#3915 NORM Never A: Provide /bin/init in root for developers.

Zarro Boogs per Child bugtracker at laptop.org
Thu Sep 27 17:09:20 EDT 2007


#3915: Provide /bin/init in root for developers.
---------------------+------------------------------------------------------
  Reporter:  cscott  |       Owner:  cscott        
      Type:  defect  |      Status:  new           
  Priority:  normal  |   Milestone:  Never Assigned
 Component:  distro  |     Version:                
Resolution:          |    Keywords:                
  Verified:  0       |  
---------------------+------------------------------------------------------

Comment(by wmb at firmworks.com):

 Here is a version that does everything but the activation check:

 {{{
 #include <unistd.h>
 main(int argc, char *argv[])
 {
     char *nullarray[] = { (char *)0 };
     chroot("/versions/boot/current");
     chdir("/");
     execve("/bin/init", nullarray, nullarray);
 }
 }}}

 You can link it statically to get an enormous (500K) executable with:

    gcc -static  -o newinit newinit.c

 Or you can install dietlibc  ( http://www.fefe.de/dietlibc/ ) and do this:

    diet  gcc -o newinit  newinit.c

 to get a 2K executable.

 I think glibc needs more than a diet; perhaps stomach-stapling might be
 more appropriate.

-- 
Ticket URL: <https://dev.laptop.org/ticket/3915#comment:1>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list