Does anyone know of a TFTP server for Puppy? - SOLVED

Booting, installing, newbie
Message
Author
User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#16 Post by ecomoney »

I found this tftp server, compiled by memeyou

http://www.murga-linux.com/puppy/viewtopic.php?p=272027

Is this the same package? Will it work in the same way?
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#17 Post by MagicZaurus »

Hi Ecomoney!

I just emailed you my package. Sorry for not answering faster here.

My package includes the conf files modified for netbooting. The rest is most likely the same, but I didn't check.

Are you netbooting all the clients at 'The Mission'?

MZ

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#18 Post by ecomoney »

Ahh thank you, the settings in the other package were proving very difficult for me to understand.


Yes all of the clients at the "mission" are netbooted from a smoothwall box, but I would like to produce a version that would netboot from a CD based puppy, thus eliminating all hard disks in the system.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#19 Post by MagicZaurus »

You can run the DHCP server on the Smoothwall box and the TFTP on a Puppy box. It shouldn't be a problem to burn the initrd.gz and vmlinuz onto the same CD as the Puppy and serve them for the netbooting clients.

How is the performance when you boot up many clients at the same time?

MZ

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#20 Post by ecomoney »

Performance can be "slow" (by puppy standards) when it comes to booting. At the moment they take 1 min 30 seconds when a single computer is booting, and more when booting 2 or more simultaneously. The computers are always turned off one by one so not a problem really.

It would be nice if a puppy computer could also have a dhcp server as well as the tftp for netbooting...with one ethernet port being "internet in" and the other ehternet out(attached to the netbooted cybercafe P.C.'s) that way I could create a cd that would simply boot a cybercafe (or a HanSamBen childrens distro!) from one CD.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#21 Post by MagicZaurus »

That's no issue at all to do all with a Puppy box. I thought you prefered to have the Smoothwall to connect to the outside world.

With my package the DHCP and the TFTP are both running on Puppy. Then you only need to find a way to share the internet from 'outside' to the 'inside'. I think that is explained somewhere here in the forum. I even think you were involved in that thread if I'm not wrong.

The DHCP server must run on the 'inside card', but if there are 2 cards it is pretty difficult to automatically detect which is 'inside' and which is 'outside'. Unless you go by convention that eth0 is 'outside' and eth1 is 'inside'.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#22 Post by ecomoney »

The smoothwall I put in place simply because it has a great deal of features that can be added to it...none of which seem to be needed so far. :oops: An all-puppy solution would be simpler, and would mean that the cybercafe could run totally hard disk free, eliminating another moving part and increasing reliability.

I also work on the HanSamBen project, a childrens educational puppy derivative allowing really old computers to be used. Today with some experimentation I got it to netboot on the cybercafe system....this brings possible opportunities.

I am reliably informed by a great number of young ones that their school computers here in the U.K. often fail during their lessons...perhaps something to do with the fact that our Government prescribe all of our schools must have a Windows licience for each computer...even if it is Linux (or Mac). Having a netbooting capability would be a great emergency measure that could be used by teachers in failed Micro$oft classrooms (and teach kids not to fear the Penguin!).

Being able to Network Boot from a standard Puppy disk would be a great feature, especially if it were possible to install puppy linux onto the the newly-netbooted computer (this would make "processing" large volumes of what would otherwise be "computer waste" with Puppy Linux extremely quick and easy). Puppy is a distro that is supposed to be "easy to install" after all. :wink:

MZ, may I trouble you to post a little information about how to configure this package to allow puppy to start itself over a network (in simple terms). Following the convention of eth0-in/eth1 out, what would be the procedure for enabling internet connection sharing also?
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#23 Post by MagicZaurus »

Booting itself over the network is not possible for a standard Puppy CD as far as I know. It would still required that you make a humongous initrd.gz for netbooting. Similar like what you are doing on the Smoothwall. I think you can burn that humongous initrd.gz also onto the CD.

It might actually be possible that you also boot from the CD with that humongous initrd.gz. I never tried that.

About internet sharing have a look here.

http://murga-linux.com/puppy/viewtopic. ... 2&start=20

That's a post from ecomoney. Another one here. Also from ecomoney, providing a .pup to do internet sharing.

http://murga-linux.com/puppy/viewtopic. ... 02&t=37161[/url]

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#24 Post by ecomoney »

Hi MZ, networking is not my best subject, you will have to excuse me, I am learning. Those posts were there only to feed back the observation that internet connection sharing is something that Ive seen is a much required feature that could be added to puppy without much space overhead. The actual theory of it Im not at all familiar with.

I know it is possible to boot an initrd.gz image from a hard drive (with the pup_412.sfs contained within it). Im actually using this method while Im posting this. I will create an ISO with the initrd.gz in this format and see how it works.

The next stage after this works would be to include your tftp server package you mailed me in the initrd.gz/pup_421.sfs file, with a symlink to the initrd.gz and vmlinuz on the CD. This should, when booted, "broadcast" a tftp server over whatever network the computer booted with this CD...allowing other computers to boot from it (am I correct). I assume the symlink would need to be in the /root/tftpboot/pxelinux.cfg/ folder once the package was installed. I would also have to call the script /usr/sbin/ppxe to start the tftp server.

Many thanks for your help
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#25 Post by mikeb »

Erm sorry to drop in to a thread I never read :oops: but having recently got NFS running happily on puppy would this be a good option perhaps for the future if not now.....NFS shares are mounted as easily and transparently as say dev_save is and I believe was a traditional way of running over a network

mike

this message may self destuct in the future

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#26 Post by ecomoney »

You are welcome MikeB, thanks

What you are saying is....it may be possible to tftpboot a special initrd with no pup_412.sfs inside, but instead it gets its pup_412.sfs by NFS mounting back to the "servers" CD? This way programs from inside the .sfs would load transparently over the network? The network traffice would automatically be "compressed" as it would be read from the .sfs, so if say abiword were to be loaded then the user would only need to wait for about 3mb of data to transfer via ethernet. This would be similar to a low-ram frugal install loads its programs from a hard disk....and would mean essentially the clients would only need say 64mb as only the kernel/xwindows/jwm would need to be loaded, plus perhaps a browser or whatever programs the user was using. Could a swap partition also be mounted via NFS (not ideal I know but better than no swap).
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#27 Post by mikeb »

Not sure about the swap but nfs shares can be mounted just like partitions ... and the modules can be loaded just like ide.usb etc....at boot so open to various posibilities.
From what I have read running over a network is one of its purposes....some research needed but I am fairly familiar with server/client setup in puppy now.
Best idea would be to have a play
http://www.murga-linux.com/puppy/viewtopic.php?t=45090

mike

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#28 Post by MagicZaurus »

A few months ago I met a guy on IRC who managed to boot Puppy with NFS. I think his nick was vxrt, but I'm not very sure.

It's a bit more difficult as just loading the NFS drivers. It requires that the network card gets configured during the initial boot. They guy knew which card his PC had and so just loaded the correct driver and assigned a fixed IP. For a generic solution it actually requires that some kind of 'Network-Wizard' is in the initial boot and also the DHCP client must be in the initial boot. I had a short try at it some months back, but realized it requires major changes in the init process and decided that humongous initrd.gz is the easier way. If there is more than 256MB RAM then the boot time will be similar, as the whole sfs-file will anyway be loaded into RAM.

Surely an interesting project.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#29 Post by mikeb »

Perhaps the network card answer
http://www.murga-linux.com/puppy/viewtopic.php?t=45074
surely ftp would need this too?
mike

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#30 Post by MagicZaurus »

Hi mikeb!

Thanks for the great info. Sounds like the right direction. Maybe ecomoney can make use of it and try that out.

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.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#31 Post by mikeb »

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

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#32 Post by ecomoney »

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/netwo ... 6-i486.pet

and also added them as an attachment below.

MikeB, thanks for the links I will look into the techniques presented there.
Attachments
dnsmasq-2.46-i486.pet
(100.4 KiB) Downloaded 685 times
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#33 Post by ecomoney »

WORKING!!! :D :D :D

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/d ... 6-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 [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

MagicZaurus
Posts: 107
Joined: Mon 05 Jan 2009, 17:35

#34 Post by MagicZaurus »

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

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#35 Post by ecomoney »

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: Select all

#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.... :roll:

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.
Attachments
init.zip
init script from 4.2.1
(16.78 KiB) Downloaded 576 times
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Post Reply