FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-09-2009, 10:50 PM
Kushal Koolwal
 
Default Include a ftp client in initrd

Hi,

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?
 
Old 11-12-2009, 11:46 PM
Emanoil Kotsev
 
Default Include a ftp client in initrd

Kushal Koolwal wrote:

> Hi,
>
> 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
rtlinux.

if you would like you could unzip your initrd and do whatever you want there
and zip it again.

i.e
mkdir test ; cd test
gunzip -c /boot/initrd-2.6.31.6eko2 | cpio -Hnewc -i
38550 blocks
maistor:/tmp/test# ls
bin conf etc init lib sbin scripts usr

do whatever you want

find . ! -name *~ | cpio -H newc --create | gzip -9 > /tmp/test-initrd.gz

regards

regards



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-13-2009, 06:02 PM
Kushal Koolwal
 
Default Include a ftp client in initrd

I just need a client program.

Also I figured that just copying an ftp program would not be sufficient. I will need to copy the shared libraries also. I was wondering what is the best way to find out the shared libraries. Just doing:

# ldd ftp

should be sufficient?

Alternatively, I can compile the ftp program statically but I am not sure what is the best way to do that in Debian.

Thanks




Hotmail: Trusted email with Microsoft's powerful SPAM protection. Sign up now.
 
Old 11-14-2009, 08:29 PM
Tzafrir Cohen
 
Default Include a ftp client in initrd

On Fri, Nov 13, 2009 at 11:02:52AM -0800, Kushal Koolwal wrote:
>
> I just need a client program.
>
> Also I figured that just copying an ftp program would not be sufficient. I will need to copy the shared libraries also. I was wondering what is the best way to find out the shared libraries. Just doing:
>
> # ldd ftp
>
> should be sufficient?
>
> Alternatively, I can compile the ftp program statically but I am not sure what is the best way to do that in Debian.

Why not use a more complete busybox?

Anyway, why would you need an FTP client in the initrd?

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-17-2009, 07:31 AM
Tech Geek
 
Default Include a ftp client in initrd

> Why not use a more complete busybox?
I don't think busybox has ftp client in it. It has ftpget.
 
Old 11-17-2009, 10:37 AM
Tzafrir Cohen
 
Default Include a ftp client in initrd

On Tue, Nov 17, 2009 at 12:31:09AM -0800, Tech Geek wrote:
> > Why not use a more complete busybox?
> I don't think busybox has ftp client in it. It has ftpget.

And ftpput. What else do you actually need.

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-19-2009, 11:44 PM
Emanoil Kotsev
 
Default Include a ftp client in initrd

Kushal Koolwal wrote:

>
> I just need a client program.
>
> Also I figured that just copying an ftp program would not be sufficient. I
> will need to copy the shared libraries also. I was wondering what is the
> best way to find out the shared libraries. Just doing:
>
> # ldd ftp
>
> should be sufficient?

yes, exactly, not sure if it is recursive though

>
> Alternatively, I can compile the ftp program statically but I am not sure
> what is the best way to do that in Debian.

The best way is what you decide is the best.

regards


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 12:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org