Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 20 Oct 2014, 22:49
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Does anyone know of a TFTP server for Puppy? - SOLVED
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [46 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
mikeb


Joined: 23 Nov 2006
Posts: 8342

PostPosted: Mon 03 Aug 2009, 17:27    Post subject:  

Quote:
TFTP doesn't require this, as the TFTP connection is initiated by the PXE-ROM of the network card, even before the very first line of the Linux boot process is executed.


ah I see... that makes life simpler
Well perhaps nfs could be useful in some way as it is a handy tool thats why I popped in

have fun

mike
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Tue 04 Aug 2009, 07:53    Post subject:  

Definitely an idea for a feature...Im assuming if the correct "magic" were to be added to the init file, then it would be a matter of offering the initrd and vmlinuz files via a tftp server, and the pup_421.sfs files out via NFS. This would allow puppy linux to be able to boot (or install?) itself over a network. This would teach puppy another very useful trick with very little space overhead.

Ive uploaded the files you sent me MZ to

http://www.ecomoney.eu/puppy/pets/network/dnsmasq-2.46-i486.pet

and also added them as an attachment below.

MikeB, thanks for the links I will look into the techniques presented there.
dnsmasq-2.46-i486.pet
Description 
pet

 Download 
Filename  dnsmasq-2.46-i486.pet 
Filesize  100.4 KB 
Downloaded  415 Time(s) 

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Tue 04 Aug 2009, 10:36    Post subject:  

WORKING!!! Very Happy Very Happy Very Happy

What I did was boot puppy (4.2.1) in liveCD mode, and connected to the web using the connection wizard via the 4-port router I have here. I then installed the package above and copied a netboot HanSamBen initrd.gz I already had prepared, along with the vmlinuz file from the 4.2.1 CD to the /root/tftpboot folder that the package created. At a terminal (rxvt) I then ran "ppxe start" which started the tftpserver.

On one of the other computers connected via the router I went into the bios and set the first boot device to the network, and off it went!

Ive got a presentation to the Seamans Mission Management on Thursday in the Hull centre (not the Immingham centre where they are currently working). Currently they are using an XP only setup in Hull. Before then I will try and make a CD that will boot and then automatically run a tftp server, serving out the netboot files across the network there. This should afford them a smooth transition from their XP system to a puppylinux one.

MZ, I have made some changes to your .pet. It should now install with a menu entry, and display a simple readme file. The tftpboot startup script (/usr/sbin/ppxe) will now have a menu entry, and show graphical xmessages to give its status, instead of just echoing to the command line. Ive also stripped the man pages, which means this package is only 82Kb. Ive uploaded this here

http://ecomoney.eu/puppy/pets/network/dnsmasq-2.46-i486-v0.2.pet

It would be great if the init script would be able to detect if the computer was being netbooted and either then transfer the pup_421.sfs file in its entirity (if there was enough RAM) or mount it via NFS if not (as puppy currently does from the Hard Disk/CD if there is not enough RAM). I will look into this and let you know how it goes....bit it sounds difficult any tips/pointers greatly appreciated.

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
MagicZaurus

Joined: 05 Jan 2009
Posts: 88

PostPosted: Tue 04 Aug 2009, 13:22    Post subject:  

Hi Ecomoney!

Thanks for the changes to the package. I just hacked it together last time, so that there is something to try netbooting.

The idea with using NFS is great. The critical part is to get the network card running in the initial boot part with the 'original' initrd.gz. Once the network is up it's comparably simple to mount the sfs-file over NFS.

Is it possible to mount/add a sfs-file on the fly without rebooting in Puppy? I searched the forum but couldn't find something positive, but I might have overlooked it.

Good luck for your presentation on Thursday. Things are getting better step by step.

MZ
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Tue 04 Aug 2009, 14:08    Post subject:  

Hmm, Yes the network card, I hadnt thought of that. Ive had a look at the init script inside initrd.gz that controls puppy's booting....this is the part (in 4.2.1) dealing with initrd.gz starting at line 392

Code:
#a humongous initrd has pup_xxx.sfs inside it...
if [ -f /pup_${PUPPYVERSION}.sfs ];then
 #v3.91 and maybe also zdrv_xxx.sfs...
 if [ -f /zdrv_${PUPPYVERSION}.sfs ];then
  echo "rootfs rootfs /pup_${PUPPYVERSION}.sfs /zdrv_${PUPPYVERSION}.sfs" >> /tmp/PUPPYFILES
 else
  echo "rootfs rootfs /pup_${PUPPYVERSION}.sfs" >> /tmp/PUPPYFILES
 fi
 PUPPYFILES="`cat /tmp/PUPPYFILES`" #v3.91
fi



Ive attached the rest of the init script in a zip if anyone wold like to see.

I suppose the edit needed would be that if the pup_421.sfs is not available anywhere else (i.e. CD/HD/inside initrd.gz) then a new routine (possibly another function at the top) would load the drivers for the network cards, and scan the network for any Tftp/NFS Servers. It would then attach a network share at that i.p. address and mount the pup_421.sfs file that would be shared from the the host computer.

Problem is I dont know what a network driver under Linux even looks like.... Rolling Eyes

Never mind, even if I have to have a CD with an humongous initrd.gz burnt to it as well for thursday it will fit the purpose. Many thanks for your help with netbooting MZ, youve been a massive help to this project.
init.zip
Description  init script from 4.2.1
zip

 Download 
Filename  init.zip 
Filesize  16.78 KB 
Downloaded  343 Time(s) 

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
MagicZaurus

Joined: 05 Jan 2009
Posts: 88

PostPosted: Tue 04 Aug 2009, 14:17    Post subject:  

With just the normal standard Puppy this is a Chicken & Egg problem.

The network drivers are inside the sfs-file, as well as the DHCP client, which are needed to get the network card up and running to mount the sfs-file.

So the only way is that the drivers and the routine to load the correct driver (Network-Wizard) are put into the initial small initrd.gz. I never tried, but I expect it's a bit complex as they might need other libraries which then also need to be put into the initial small initrd.gz.

After a NFS is mounted it can be treated similar to a local partition and so the rest of the init code actually could remain most likely the same.

MZ
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8342

PostPosted: Tue 04 Aug 2009, 15:19    Post subject:  

Quote:
So the only way is that the drivers and the routine to load the correct driver (Network-Wizard) are put into the initial small initrd.gz. I never tried, but I expect it's a bit complex as they might need other libraries which then also need to be put into the initial small initrd.gz.

just net card modules , and dchpd binary ...at a guess an increase of ~1 MB.
Initrd.gz unpacked is just a mini linux file system. Init would need the rc.network stuff and dchp launch command including then NFS shares would be available for the unionfs.

There has been some work on dynamically adding sfs files like slax does (aufs permits this I believe). Another way is to mount at say /opt large sfs like open office...that can of course can be done after booting without any mods to the main system.

how to edit initrd for puppy 3 and 4
Quote:

To edit initrd.gz from Puppy 3.xx, first copy initrd.gz to someplace on a linux filesystem where you can work on it (I like to use /tmp/NewDir). Then open a terminal there and run this:
Code:
mkdir initrd-tree
cd initrd-tree
zcat ../initrd.gz | cpio -i -d

That will make a directory initrd-tree that contains the contents of the initrd.gz file. Go inside and edit away. When you're finished, from inside the initrd-tree/ directory, run these commands:
Code:
find . | cpio -o -H newc | gzip -9 > ../initrd.gz

That will replace the old initrd.gz file with the new one. Now just copy that into the correct place, and you're good to go.


mike
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Tue 04 Aug 2009, 17:08    Post subject:  

Ok...this sounds difficult Laughing

Onebone Puppy is around 30mb (it comes with elinks and a few command line tools which could probably be stripped...I heard somewhere puppy could be stripped to about 24mb with no Xwindows and these tools). Basically Im looking to be able to netboot computers with about 64mb of RAM.

If the DNS package could be updated to run a script that would basically "strip out the fat" (xwindows, all apps) and make a humungous initrd out of it which it then serves out via the ftp server. Once this is booted on the client machines, they could autodhcp and use nmap to discover the i.p. address of the tftp server (scan for machines with an open port 69, the default for tftp?). It could then "layer" the pup_421.sfs (with all apps/xserver etc) over the files currently held in memory (like a normal addon .sfs pack).. This way the netbooted computer would contain all of the core utils locally, and load the xserver/app files as needed from the computer that booted it....how is this for an idea?

Instead of onebone, there is also Puppy 4.1.2 barebones, which contains jwm, but no apps

http://www.puppylinux.org/?q=downloads/puplets/barebones-pup-412

This is 57mb, so it would need clients with at least 128mb of RAM. Its been my experience that computers with less ram than this generally do not have a netbooting via LAN feature in their bios anyway.

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
mikeb


Joined: 23 Nov 2006
Posts: 8342

PostPosted: Tue 04 Aug 2009, 22:15    Post subject:  

possible run time mounting of sfs files here
http://www.murga-linux.com/puppy/viewtopic.php?search_id=1112562892&t=44719

mike
Back to top
View user's profile Send private message 
MagicZaurus

Joined: 05 Jan 2009
Posts: 88

PostPosted: Wed 05 Aug 2009, 00:54    Post subject:  

Hi Mike!

That looks very promising. Seems like everything is available and 'only' needs to be assembled together. Ecomoney's idea to use a 'Barebone Puppy' and then load the other sfs-files over the network, seems like a good way to go to me. More easy to impement then to include the network drivers in the initial boot process.

Let's see where this way leads us to.

MZ
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8342

PostPosted: Wed 05 Aug 2009, 07:27    Post subject:  

Quote:
That looks very promising. Seems like everything is available and 'only' needs to be assembled together. Ecomoney's idea to use a 'Barebone Puppy' and then load the other sfs-files over the network, seems like a good way to go to me. More easy to impement then to include the network drivers in the initial boot process.

agreed......Full nfs booting for the future perhaps but main aim is to get something working.now:).

As an aside I first played with NFS using geexbox which is a 10MB media playing distribution which boots up and automatically mounts all sources including NFS shares

mike
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Wed 05 Aug 2009, 21:59    Post subject:  

Well, we did it, Ive got an iso of the cybercafe system that will boot on any pc in the network, and then boot the rest of the computers via tftp!

The two systems are essentially the same, except the "server (the one with the pup_421.sfs on the CD) contains MZ's tftpserver, offering out a "humungous" netboot initrd.gz, itself containing the same system but without the tftp server startup script in the /root/Startup folder.

Im just doing a similar iso that will netboot HanSamBen, the kids educational distro. This will turn a few heads at the presentation tommorow Very Happy

I will upload links to the iso's overnight on my server here are the links if anyone wants to play....they should be done in about 4 hours from the time of this post, check the file sizes to be sure.

Bootable Cybercafe System (without billing part)
Size:- 45864755 bytes
md5sum:- 317d9e58d01da5ec14461aec89ebfd0b
Link:- http://www.ecomoney.eu/seafarers/iso/cyberlinux.iso


Bootable HanSamBen
Size:- 45121331 bytes
md5sum:- 2838e4796dbf64611a125f485d4e5c1d
Link:- http://www.ecomoney.eu/hsb/cyberhsb.iso

It would still be good to know if I can use nmap to "discover" from the client machines which machine is the tftp server that it booted from. This way I can point the client billing system to the server billing system (for password verification etc). This way I can make a "Puppy Cybercafe on a CD" with a little more work. Is nmap even the right way to go for this?

Many thanks for all of your help to everyone that has given it.

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
rexterd

Joined: 01 Oct 2008
Posts: 12

PostPosted: Mon 24 Aug 2009, 09:00    Post subject:  

pxe puppy is possible and this method is using root filesystem
as an aufs root that you can mount sfs files on the fly and detach your
sfs files mounted if not needed like devx.sfs

-busybox should be recompiled to support udhcpc/dhcpcd so the client gets the ip from the dhcpd server

-puppy boots using pxe and taking bzImage and initrd.gz from the tftp server and make sure nfs server been started.

-init script from initrd.gz gets executed and it sees the pup_xxx.sfs on an exported nfs share and mount the squashfs file, assembles first stage booting so an aufs is created with at least one writable and read-only branch and a swith_root is excuted and passed to your rc.sysinit other rc files so real root kicks in.

- once your up and running you can mount your sfs files from the server it can be thru nfs, samba or httpfs/uloop or mount sfs file locally and merge it to your root filesystem

-recreating squashfs file out of pet packages is easy because any pet being installed gets a copy to your /aufs/rw writable branch, at boot up get a copy (txt) of what you have on your /aufs/rw so after installing your pet packages you can just exclude (txt) in generating the squashfs file.

- i highly recommend using Fatdog(32) if anyone wants to try

rxd
Back to top
View user's profile Send private message 
didik


Joined: 05 Jan 2009
Posts: 44
Location: Bandung, Indonesia

PostPosted: Sun 08 Nov 2009, 22:57    Post subject: The link is missing  

ecomoney wrote:


Bootable Cybercafe System (without billing part)
Size:- 45864755 bytes
md5sum:- 317d9e58d01da5ec14461aec89ebfd0b
Link:- http://www.ecomoney.eu/seafarers/iso/cyberlinux.iso


Bootable HanSamBen
Size:- 45121331 bytes
md5sum:- 2838e4796dbf64611a125f485d4e5c1d
Link:- http://www.ecomoney.eu/hsb/cyberhsb.iso



Ecomoney, the link is missing.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Sun 28 Mar 2010, 18:12    Post subject:  

Sorry about the server being down and those links broken. Here is version 0.2 of the tftp server as a forum attachement
dnsmasq-2.46-i486-v0.2.pet
Description 
pet

 Download 
Filename  dnsmasq-2.46-i486-v0.2.pet 
Filesize  81.83 KB 
Downloaded  374 Time(s) 

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Display posts from previous:   Sort by:   
Page 3 of 4 [46 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1013s ][ Queries: 13 (0.0053s) ][ GZIP on ]