[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: where do initramfs-tools come from?



hello genadz,

[ please keep malinglist on cc, this is not private communication  ;) ]

On Sun, 22 Apr 2007, Genadz Batsyan wrote:

> Thank you very much for the information!!!
> 
> I do have both klibc and busybox inside the initramfs, I've tried to 
> study in depth what is inside initramfs and where does it come from. 
> Very interesting.

yup that is the default, you can tune that with BUSYBOX=n
 
> Sorry to waste your time, maybe it's the wrong place to ask, but,
> what I don't get is how is the trick done, when you are inside initramfs 
> shell there are only klibc binaries and a few more in the /bin dir.
> executing busybox gives the list of it's commands.
> But it's not necessary to write
> busybox <command> ...
> just <command> ... is enough.

you don't waste my time at all, i'm happy if others are interested
in the solutions around and bring up new "trouble" or whatever?

well in the BUSYBOX=y mode, busybox shell is used so it knows
of all the busybox cmd's just look into mkinitramfs from line 236 down.
the trick is the symlink.

 
> How is this done? How does the shell "know" that for instance tftp is a 
> command from the busybox.
> and If I write tftp it looks for it in busybox and executes ist. Is this 
> some kind of shell patch?
> Comparing sizes of /bin/sh with anything inside the filesystem where 
> initramfs was created, I find no match, where does it come from?

with BUSYBOX=n you have dash available which is nicer than the
bb ash.
 

keep me posted on your advances :)

sunny greetings

--
maks



Reply to: