Re: Include a ftp client in initrd
Kushal Koolwal wrote:
> I am using Debian Lenny with the default 2.6.26-2-686 kernel and the
> default initrd image.
> My aim is to just boot the kernel and initrd image. I don't want to mount
> the "real" filesystem from the hard drive or any other storage device.
> I know how to mount an initrd and make changes in it and then zip and
> compress back again. However I need your help with the following question:
> I want to include a ftp client program in the initrd image and write a
> shell script in the initrd image that will execute the ftp program.
> What is the best way to do this?
do you need a client or server?
there are good howtos about diskless systems and also about busybox or
if you would like you could unzip your initrd and do whatever you want there
and zip it again.
mkdir test ; cd test
gunzip -c /boot/initrd-188.8.131.52eko2 | cpio -Hnewc -i
bin conf etc init lib sbin scripts usr
do whatever you want
find . ! -name *~ | cpio -H newc --create | gzip -9 > /tmp/test-initrd.gz