5-steps - Netboot a Puppy over the LAN with NO Media (PXE)

How to do things, solutions, recipes, tutorials
Message
Author
jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#46 Post by jamesbond »

I've been away for a while, so I'd just drop by for while just to address a few things.

1. There will be no dhcp conflict between netboot-server's DHCP server and your router's DHCP server. netboot-server uses code originally written by phLe http://www.murga-linux.com/puppy/viewtopic.php?t=62308 - the netboot DHCP only responds to PXE requests, not standard DHCP requests

2. The NIC is only used during PXE loading, and then released. When puppy is fully loaded, Puppy's drivers will take over the NIC. Once you see puppy's desktop, you need to configure your network as usual - the settings you get during PXE booting is temporary.

3. PXE support is done in BIOS - while web browsing in puppy is supported by Puppy's drivers. You need to check and ensure that your NIC is supported by Quickset puppy. (Puppy 4.31 is rather old, many newer hardware / NIC won't work with it).

cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

cduran1983
Posts: 1
Joined: Wed 03 Aug 2011, 00:02

hey this script worked great for me THANKS!

#47 Post by cduran1983 »

Everything running fine... :D
I have all working DHCP server, TFTP server and the PXE server.

Just need it an ISO to "pxeboot" conversion!!

thanks!! Works great

I'm running Fedora 15 - 2.6.38.8-32.fc15.x86_64

THANKS...
#!/bin/sh
#jamesbond 2011
# convert a puppy iso into netboot-compatible vmlinuz and humongous initrd.gz
# Edited by Master_wrong so can save to other media not just temp

Xdialog --title "mknetboot" --msgbox "This script will create a set of files suitable for puppy netbooting.
The input is a puppy ISO file. The output will be located in /tmp/netboot - one vmlinuz and one huge initrd.gz.
If /root/tftpboot/pxelinux.cfg exist, the output files will be symlinked to this directory as well,
so you can use netboot-server to server them straight away." 0 0

ISO=$(Xdialog --title "Choose puppy ISO" -fselect "" 0 0 2>&1 | tail -n 1)
tmp="mnt/sdc2"
tmp2="mnt/sdc2"
if [ -n "$ISO" ]; then
rm -rf /$tmp2/netboot /$tmp/netboot_iso
mkdir -p /$tmp2/netboot/x /$tmp/netboot_iso
if mount -o loop "$ISO" /$tmp/netboot_iso; then
if [ -f /$tmp/netboot_iso/vmlinuz -a -f /$tmp/netboot_iso/initrd.gz ]; then
Xdialog --title "mknetboot" --no-buttons --infobox "This will take a while. Please wait ..." 0 0 60000 &
PID=$!
cp /$tmp/netboot_iso/vmlinuz /$tmp2/netboot
cd /$tmp2/netboot/x
zcat /$tmp/netboot_iso/initrd.gz | cpio -i
cp /$tmp/netboot_iso/*.sfs .
find . | cpio -o -H newc | gzip -9 > ../initrd.gz
cd /$tmp2/netboot
rm -rf x
if [ -d /root/tftpboot/pxelinux.cfg ]; then
rm /root/tftpboot/pxelinux.cfg/vmlinuz /root/tftpboot/pxelinux.cfg/initrd.gz
ln -s /$tmp2/netboot/vmlinuz /root/tftpboot/pxelinux.cfg
ln -s /$tmp2/netboot/initrd.gz /root/tftpboot/pxelinux.cfg
fi
kill $PID
Xdialog --title "mknetboot" --infobox "Done. Output is in /$tmp/netboot." 0 0 10000
else
Xdialog --title "mknetboot" --msgbox "Invalid ISO - cannot find vmlinuz and initrd.gz" 0 0
rm -rf /$tmp2/netboot
fi
umount /$tmp/netboot_iso
rm -rf /$tmp/netboot_iso
else
Xdialog --title "mknetboot" --msgbox "Failed to mount $ISO" 0 0
fi
fi

gcmartin

Re: hey this script worked great for me THANKS!

#48 Post by gcmartin »

cduran1983 wrote:Everything running fine...
Great!

Is that script in the code window an "update" you are offering? If so, would you add a comment under "Master_Wrong" in the script you post?

Thanks in advance.

P.S. @cduran1983, Check your PMs

gcmartin

32bit PUPs are Missing DNSMASQ PET for Netbooting (PXE)

#49 Post by gcmartin »

Edited:
This problem has been fixed. You can use the document to access the needed PETs; same as before.

Problem
I have just been informed that the 32bit version of DNSMASQ has disappeared and cannot be access as described in the document.

FATDOG and LightHOUSE64 are able to obtain the correct version from their PPM, but PUP528 (and probably other 32bit PUPs) does NOT offer the correct version via their PPMs.
Last edited by gcmartin on Wed 31 Aug 2011, 16:57, edited 2 times in total.


gcmartin

#51 Post by gcmartin »

Aitch wrote:any use? ... .Aitch :)
Thanks @Aitch.

The document, is again, accurate for use by any who venture to have PCs remote boot. Current ALL links in the document are accurate.

travis
Posts: 1
Joined: Fri 02 Sep 2011, 14:07

Nicely done. Pre-existing pxe/boot server.

#52 Post by travis »

Nice guide, and even nicer scripts. They were easy to follow and reproduce what I needed to do in setting up puppy linux 5.28 in my pxe boot environment that is running on Fedora 14.

If anyone is interested I've put the vmlinuz and initrd.img files in an archive which is available http://dl.dropbox.com/u/40645459/puppy_pxe.tar.gz.

To use them simply download the file to somewhere in the /boot directory (ie /boot/puppy).

Code: Select all

tar -xvf puppy_pxe.tar.gz
Then edit the default file adding these lines

Code: Select all

LABEL Puppy 5.28
	MENU LABEL ^5) LivePuppy 5.28
	KERNEL /boot/puppy/vmlinuz
	APPEND initrd=boot/puppy/initrd.gz PDEV1=rootfs
Making sure the paths are correct and the MENU LABEL ^# match your environment and you should be good to go.

puppy_newb
Posts: 33
Joined: Wed 21 Sep 2011, 16:26

#53 Post by puppy_newb »

jamesbond wrote:Master,

That guide will work for other puppies too. The netboot-server.pet is just a bunch of shell-scripts, it will work on any puppy. You just need to get a 32-bit binary dnsmasq for other puppies. jrb has created one on other forum of this thread, or you can use the one attached here (gunzip and drop it to /usr/bin). Too lazy to make it into a pet :twisted:
Hi JamesBond,

I'm just trying to get the tftp server working from dnsmasq. Is there anything special I have to do? I'm also using lucid puppy 5.2.8 will that make a difference?

gcmartin

#54 Post by gcmartin »

puppy_newb wrote:Hi JamesBond,

I'm just trying to get the tftp server working from dnsmasq. Is there anything special I have to do? I'm also using lucid puppy 5.2.8 will that make a difference?
Hi @Puppy_Newb.

This is NOT an answer from JamesBond, but, I will try to help until he can reply. Did you happen to notice that this thread provides a complete start to finish guide?

Its been tested on Puppy 5.28. It may work for you. And, it should gives some hints. (I would urge you to rename/remove your own DNSMASQ conf file should you choose to try the steps in the manual. That manual has been tested starting with Pristine systems which do not have any TFTP or DNSMASQ previously installed....But this manual does work. Further, USE THE PETs IN THE GUIDE because they are known to work in all tests until now.. The guide simply describes the working process that JamesBond created for us.)

Should you choose to use the manual, please provide any feedback you feel this thread's community would benefit from.

Thanks in advance.

puppy_newb
Posts: 33
Joined: Wed 21 Sep 2011, 16:26

#55 Post by puppy_newb »

gcmartin wrote:
puppy_newb wrote:Hi JamesBond,

I'm just trying to get the tftp server working from dnsmasq. Is there anything special I have to do? I'm also using lucid puppy 5.2.8 will that make a difference?
Hi @Puppy_Newb.

This is NOT an answer from JamesBond, but, I will try to help until he can reply. Did you happen to notice that this thread provides a complete start to finish guide?

Its been tested on Puppy 5.28. It may work for you. And, it should gives some hints. (I would urge you to rename/remove your own DNSMASQ conf file should you choose to try the steps in the manual. That manual has been tested starting with Pristine systems which do not have any TFTP or DNSMASQ previously installed....But this manual does work. Further, USE THE PETs IN THE GUIDE because they are known to work in all tests until now.. The guide simply describes the working process that JamesBond created for us.)

Should you choose to use the manual, please provide any feedback you feel this thread's community would benefit from.

Thanks in advance.

Hi

Thanks for your help. I have been trying to get TFTP working from a remastered Puppy live CD for over three months now with no luck. I'm using ATFTPD right now and the tftp server is running and everything and it looks configured properly. The problem is that when i connect to my switch to download configs, it says Connection refused. I tried everything, turned off firewalls accepted the ip and port in iptables with no luck whatsoever. I have tried dnsmasq before as a pet and that didn't work so I'm still worried about trying this.

puppy_newb
Posts: 33
Joined: Wed 21 Sep 2011, 16:26

#56 Post by puppy_newb »

gcmartin wrote:
puppy_newb wrote:Hi JamesBond,

I'm just trying to get the tftp server working from dnsmasq. Is there anything special I have to do? I'm also using lucid puppy 5.2.8 will that make a difference?
Hi @Puppy_Newb.

This is NOT an answer from JamesBond, but, I will try to help until he can reply. Did you happen to notice that this thread provides a complete start to finish guide?

Its been tested on Puppy 5.28. It may work for you. And, it should gives some hints. (I would urge you to rename/remove your own DNSMASQ conf file should you choose to try the steps in the manual. That manual has been tested starting with Pristine systems which do not have any TFTP or DNSMASQ previously installed....But this manual does work. Further, USE THE PETs IN THE GUIDE because they are known to work in all tests until now.. The guide simply describes the working process that JamesBond created for us.)

Should you choose to use the manual, please provide any feedback you feel this thread's community would benefit from.

Thanks in advance.
Hi,

Another thing I forgot to ask. All i need is the TFTP server up and running and not refusing connections. Do i still need to follow the guide all the way?

puppy_newb
Posts: 33
Joined: Wed 21 Sep 2011, 16:26

#57 Post by puppy_newb »

gcmartin wrote:
puppy_newb wrote:Hi JamesBond,

I'm just trying to get the tftp server working from dnsmasq. Is there anything special I have to do? I'm also using lucid puppy 5.2.8 will that make a difference?
Hi @Puppy_Newb.

This is NOT an answer from JamesBond, but, I will try to help until he can reply. Did you happen to notice that this thread provides a complete start to finish guide?

Its been tested on Puppy 5.28. It may work for you. And, it should gives some hints. (I would urge you to rename/remove your own DNSMASQ conf file should you choose to try the steps in the manual. That manual has been tested starting with Pristine systems which do not have any TFTP or DNSMASQ previously installed....But this manual does work. Further, USE THE PETs IN THE GUIDE because they are known to work in all tests until now.. The guide simply describes the working process that JamesBond created for us.)

Should you choose to use the manual, please provide any feedback you feel this thread's community would benefit from.

Thanks in advance.
Hi,

Looks like I got another failure when trying to use dnsmasq tftp server. It says the following when i try to send a file to my server:

dnsmasq-tftp unsupported request from 10.10.1.1

I have no idea how to correct this.

gcmartin

Trying to help a member with remote boot.

#58 Post by gcmartin »

If you tell me which version you remastered, i will set it up in a Live media boot, and follow the guide to see if I get a failure. So far, there have not been any reports of the guide failing on the PUPs that have been tried since this became available.

I cannot help with anything beyond this guide as its the ONLY thing I am familiar enough to give comments on. I have been a user of this without failure on 6 different PUPs since preparation of the guide. It just works!

I only offered to have you, too, try the guide as other have. And just maybe, if it works for you, it will help you discover your own problem.

Its easy to test and the guide will give you a working system to compare against. Then, this may just be the thing that gets you to find that "needle in the haystack" that you're desiring.

The last 32bit distro that I tried was one of Pemasu's ISO. I just
  1. downloaded the Puppy ISO (or if you have one handy in your possession)
  2. created a multi-session Live CD (need not be a CDRW...RW NOT needed.)
  3. Booted the Live CD
  4. Followed the guide.
That's it. 10 minutes total and we are booting PCs over the LAN. (you'll spent more time downloading and creating a CD than you will setting up and booting other PCs.) Is the 10 minutes a problem for you?

If you have a problem with the guide let us know, please. Tell us which step in the guide you're getting hung up on and we'll help.

Hope this helps

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

TFTP Server Cannot Receive File

#59 Post by MagicZaurus »

Hi puppy_newb!

What are you trying to do? It sounds like you want to send/upload a file from your client to the TFTP server.
It says the following when i try to send a file to my server:
The TFTP in dnsmasq is only for providing data from the server to the client, not the other way around. This is from the man pages of dnsmasq.
--enable-tftp[=<interface>]
Enable the TFTP server function. This is deliberately limited to that needed to net-boot a client. Only reading is allowed;
So if you want to do some uploading of files to your server, it will be better to use a normal FTP server on the server. This will also be faster, as the TFTP protocol is slower than FTP protocol.

MZ

puppy_newb
Posts: 33
Joined: Wed 21 Sep 2011, 16:26

Re: TFTP Server Cannot Receive File

#60 Post by puppy_newb »

MagicZaurus wrote:Hi puppy_newb!

What are you trying to do? It sounds like you want to send/upload a file from your client to the TFTP server.
It says the following when i try to send a file to my server:
The TFTP in dnsmasq is only for providing data from the server to the client, not the other way around. This is from the man pages of dnsmasq.
--enable-tftp[=<interface>]
Enable the TFTP server function. This is deliberately limited to that needed to net-boot a client. Only reading is allowed;
So if you want to do some uploading of files to your server, it will be better to use a normal FTP server on the server. This will also be faster, as the TFTP protocol is slower than FTP protocol.

MZ
Hi Magic,

This is my problem that I realized the hard way. I want to upload text files from a client to the TFTP server which is running on my Lucid Puppy 5.2.8. Do you have any idea of any TFTP server which works in this way? I have not been able to get anything to work for this purpose for the past three months.

gcmartin

TFTP Server in DNSMASQ ONLY allows reads - no Writes!

#61 Post by gcmartin »

Retracted earlier comments.

The TFTP commands I've found to not match the tftp command in Busybox. I have no way to test this. I have noticed that the tftp command in a Puppy terminal does not seem to work when trying to use it to transfer a file to the running TFTP host that is used by this very Netboot facility. BUT, IT DOES WORK TO TRANSFER A FILE FROM THE Netboot facility.

Code: Select all

tftp -r pxelinux.0  -g localhost
To understand correct client command invocation, type "tftp" in a terminal.

Edit:
The following CANNOT be done. Its the product's version of security.

Code: Select all

It must be investigated to find the parm in DNSMASQ start to allow TFTP to allow users writing to this server. (BUT, beware as there's a very good  local security reason why you might NOT do this on a Netboot server, though)
Hope this helps
Edit: DNSMASQ DOES NOT ALLOW A CLIENT TO WRITE TO ITS TFTP service! .....the author
Last edited by gcmartin on Sun 13 Nov 2011, 04:04, edited 3 times in total.

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

Pure-FTPd

#62 Post by MagicZaurus »

Hi puppy_newb!

I'm not familiar with Lucid 5.2.8. I'm using a pupplet based on Puppy 4.3.1. There is Pure-FTPd in the network menu and that is a normal FTP server and I think it is also available in Lucid. With this you can share files, but also should be able to upload files from a client. On the client you can use gFTP or the FTP command in the terminal.

MZ

puppy_newb
Posts: 33
Joined: Wed 21 Sep 2011, 16:26

Re: Pure-FTPd

#63 Post by puppy_newb »

MagicZaurus wrote:Hi puppy_newb!

I'm not familiar with Lucid 5.2.8. I'm using a pupplet based on Puppy 4.3.1. There is Pure-FTPd in the network menu and that is a normal FTP server and I think it is also available in Lucid. With this you can share files, but also should be able to upload files from a client. On the client you can use gFTP or the FTP command in the terminal.

MZ
Hi Magic,

Thanks for the gFTP information. The problem is that I need to copy switch config files from an HP switch which only allows copying files from it by TFTP. It just doesn't support FTP. Is there anyway I can get TFTP up and running on any Puppy?

gcmartin

Re: Pure-FTPd

#64 Post by gcmartin »

puppy_newb wrote: ...The problem is that I need to copy switch config files from an HP switch which only allows copying files from it by TFTP. It just doesn't support FTP. Is there anyway I can get TFTP up and running on any Puppy?
Questions
  • Which HP Switch do you have?
  • Are you using the HP switch utilities or are you using a custom utility on your switch?
Here to help

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#65 Post by nooby »

gcmartin you write
you just drop it in and forget it
Drop it where? I have no idea what you talk about.
okay I have both computers running now. So if I "drop"
the ubuntu iso on one of my computer then I can start it
on the other ? Drop it where?
Any feedback you have, please post it there..
Where is here? This thread or the thread you linked to?

I guess you mean that after reading the txt then I know what you refer to
as just drop it. Where in the text do you tell where to drop the iso.
I am a poor reader of text. I drown in the words.

As I get it now finding the first text?
The general steps to implement a PXE server is as follows. It prepares the programs and files required for this particular setup so that it can provide all necessary items that a PXEclient requires to boot.
It sets up a server. That is not an easy thing. Nope I am out of here.
I use Google Search on Puppy Forum
not an ideal solution though

Post Reply