Blog Forum Wiki Links Contact Us NetbookUser

You are not logged in.

#1 2007-11-28 9:20:39 am

vang
Member
Registered: 2007-11-28
Posts: 11

sources for fastinit

i'm trying to decipher the boot process in order to make my eeepc full multiuser (with icewm, not kde).
are the sources for fastinit available somewhere?

Offline

 

#2 2007-11-28 9:26:16 am

Kibobo
Senior Member
From: France
Registered: 2007-10-21
Posts: 295
Website

Re: sources for fastinit

no.

But you can "crack" the last launched command ("sudo -l user x...." or something).

Last edited by Kibobo (2007-11-28 9:30:56 am)

Offline

 

#3 2007-11-28 11:51:05 am

jricher
Member
Registered: 2007-11-06
Posts: 89

Re: sources for fastinit

Well....
I don't know what the forum stand is on reverse engineering, but in your boat I would run something like "strings /sbin/fastinit". It looks like fastinit spends most of the boot process fork/exec'ing various things, and those strings are quite enlightening.

Jacques

Offline

 

#4 2007-11-28 12:02:05 pm

Kibobo
Senior Member
From: France
Registered: 2007-10-21
Posts: 295
Website

Re: sources for fastinit

IDA is more powerfull tongue

Offline

 

#5 2007-11-28 2:39:45 pm

jricher
Member
Registered: 2007-11-06
Posts: 89

Re: sources for fastinit

Strings is cheaper.... smile

Realistically, If I was in the OP's position, I'd probably start with something like busybox's init, and work my way forward or reconfigure the box to run sysvinit. You could RE it easily enough with GDB, but there's not a whole lot of point. Init has been done several times - there's sysvinit, initng, busybox init, and a few others on other free *nix operating systems that could be ported easily enough.

Offline

 

#6 2007-12-15 1:41:31 pm

patatester
Member
Registered: 2007-11-21
Posts: 16

Re: sources for fastinit

why are the sources not available ?  Arent they obliged to make them available?

Offline

 

#7 2007-12-15 1:57:20 pm

Kibobo
Senior Member
From: France
Registered: 2007-10-21
Posts: 295
Website

Re: sources for fastinit

Absolutely not.

Offline

 

#8 2007-12-15 1:57:52 pm

tuxpocket
Senior Member
Registered: 2007-11-28
Posts: 496

Re: sources for fastinit

fastinit is presumably their own program.  As long as it doesn't include components with freedom-preserving open source licenses, they are under no obligation to distribute the source.  Would be nice if they did though.

For example, at work I am developing a product that runs linux.  So we make the linux kernel source available.  It runs busybox, so we make the busybox source available.  It has a couple of custom kernel modules that I wrote as adaptations of existing ones, so we make the source for those available. 

It also has a main program that makes the product work.  I wrote that from scratch, so we do not make the source available.  We could, but we are under no obligation to.  A future version of the program may link against an lgpl-licensed library that would require us to make the object (.o) files available so that the user could re-link it against another version of the library, but we would still not have to make the source available. 

I do think a community effort to create a fastinit replacement would be a good idea.  We could approach it either by documenting what fastinit does and duplicating that, or by taking a normal linux init sequence and tailoring it to the Eee. 

One of the other things I'd like to get  is to get binary packages for all the installed files - Asus is not providing as current versions of some things in .debs as they are in the disk image.  So we could either compile the out of date packages from source, or we could try to repackage them from the installed versions.

Taken together, these would all be keys to being able to recustomize the stock installation - not start over with ubuntu (which is a worthwhile but seperate project), but take the basic idea asus had, which seems a good one, and add and subtract components until we get something even better.

Last edited by tuxpocket (2007-12-15 1:59:08 pm)

Offline

 

#9 2007-12-15 5:28:29 pm

gfoot
Senior Member
From: Brighton, UK
Registered: 2007-12-09
Posts: 368

Re: sources for fastinit

Rather than messing about with strings, it might be better to just bite the bullet and use strace.  fastinit probably does the same thing every time it runs, by its nature, so aside from obscure error handling, strace will almost write your code for you (at a rather low level, granted).

Offline

 

#10 2007-12-15 5:39:01 pm

Kibobo
Senior Member
From: France
Registered: 2007-10-21
Posts: 295
Website

Re: sources for fastinit

strace for the first executed process ?

Offline

 

#11 2007-12-16 8:22:50 pm

gfoot
Senior Member
From: Brighton, UK
Registered: 2007-12-09
Posts: 368

Re: sources for fastinit

I guess it depends to what extent fastinit relies on being PID 1.  I doesn't seem to be a traditional init process anyway.  By setting INIT on the command line I think you could run something else and chain to fastinit via strace if you want to spy on it.

e.g. XANDROSBOOTDEBUG=1 INIT=/bin/sh, perhaps, then ctrl-d out of the initial shell to get to the second one with unionfs mounted and switch_rooted, based on the standard script.

I doubt it does anything particularly advanced though - using a more traditional setup you could probably work out a cut-down list of services to start - it's probably what 'they' did anyway.

Offline

 

#12 2007-12-16 8:26:30 pm

tuxpocket
Senior Member
Registered: 2007-11-28
Posts: 496

Re: sources for fastinit

Kibobo wrote:

strace for the first executed process ?

I was thinking maybe we boot in a vm with gdb remote debugging (common embedded systems trick, except for the vm part)

Or maybe we set strace up to dump to a log file and make stract fastinit be the init.

I keep trying to launch bash as my init program but so far that isn't working.

Incidentally fastinit is not the original first process.  However it is exec'd by the first process so it inherits that PID 1.

Last edited by tuxpocket (2007-12-16 8:27:33 pm)

Offline

 

#13 2008-01-06 7:59:27 am

Sarazar
Senior Member
From: Canberra, Australia
Registered: 2007-12-23
Posts: 100

Re: sources for fastinit

For what its worth I just registered my Eeepc and put in a Tech inquiry statinf the following:

Hi

I am trying to secure my EeePC better by setting up sudo to require a password. To do this I need to modify the startup scripts to remove sudo from them. Looking into this I realised that some of the processes in the startup could possibly be done prior to the startx command started by the fastinit process.

To do this I was hoping you would be willing to release the source for fastinit allowing members of the linux community to add more functionality to it.

Would it be possible to get fastinit source code covered by the GPL and released to the public?

Thanks in advance.

Randall Crook.

I am not overly optimistic, but you never know.


Randall.

Last edited by Sarazar (2008-01-06 7:59:52 am)


Randall.
1993: SLS Linux on a white box 386 SX 16 Mhz 1MB RAM 20MB WD HDD.
2008: EeePC Xandros Linux on a ASUS EeePC Intel Celeron M 900MHz 512GB RAM 4GB SSD
Less than an 1/8th the size and magnitudes more powerful... Yet su -c "rm -rf /" still f**ks it all up....

Offline

 

#14 2008-01-21 3:00:42 pm

godzilla8nj
Member
Registered: 2007-12-26
Posts: 11

Re: sources for fastinit

vang wrote:

are the sources for fastinit available somewhere?

Came across this, hope it helps: http://helllabs.org/blog/20071231/asus- … n/#more-68

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson