Creating PXE puppy (solved)

Under development: PCMCIA, wireless, etc.
Message
Author
Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

Creating PXE puppy (solved)

#1 Post by Master_wrong »

edit-18-march-2011 -solved using this link -
http://www.murga-linux.com/puppy/viewtopic.php?t=64107

Hi,

I'm figuring out howto create pxe capable puppy....
i just found this.... http://rom-o-matic.net/
can this be used ?

http://etherboot.org/wiki/syslinux


thank
Last edited by Master_wrong on Fri 18 Mar 2011, 11:01, edited 2 times in total.
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

I think you are limited to their kernels, but you can do it manually

I would recommend a stepped approach:

Start with Pup'ngo (only about 5MB)
shift internet setup into the initramfs
download the sfs into ram/disk/usb etc... or mount it directly over nfs/samba/etc...
continue as normal

Once that is working you can setup the pxe parts
Get the corresponding kernel source from http://bkhome.org/sources/ (puppy:linux as user:password)
recompile it with the initramfs (in the initrd.gz) included in the kernel image (you may need to modify a couple of settings for pxe??)

There is also a thread here that explains how to include the sfs files in the initramfs ... that way it would only be one file to load (but use lots of ram)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

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

gPXE

#3 Post by MagicZaurus »

As far as I understand gPXE is a PXE bootloader with more features compared to the usual PXE bootloaders inside the network cards. For example it allows loading over HTTP which is supposed to be faster than TFTP.

Still I think it is easier for a start to get a Puppy booting via the standard PXE.

Slitaz Linux is using gPXE for their webbooting. You can take a look there. They have gPXE on a boot CD and then the main image is loaded over the internet from a webserver.

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#4 Post by Master_wrong »

Hi

Thank guys for the explanation but i think this pxe is bit too much difficult for me...
i will learn more then....

magicsaurus, technosaurus..... is there by any chance that you two are related.... ??? :lol:
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

fred777
Posts: 4
Joined: Sat 08 Jan 2011, 21:27

#5 Post by fred777 »

Hi master,

try this: http://www.murga-linux.com/puppy/viewto ... 267#426299 with puppy 5.1, works like a charm.

regards,
fred

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#6 Post by Master_wrong »

Thank fred
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#7 Post by Aitch »


raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

thanks

#8 Post by raffy »

Thanks, Aitch, but fred777's URL (esp. its page 1) is already an excellent starting point.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#9 Post by Master_wrong »

:?: :?: :?: :?:

ok
i found few more reading material...
http://www.debian-administration.org/articles/478
http://linux-sxs.org/internet_serving/pxeboot.html

so i assume we need dhcpd-server ad tftp

but in this
http://murga-linux.com/puppy/viewtopic.php?t=23615
use pxe from cent-os i assume there is no need to supply those 2 files ?

maybe i should try hpc-pelican,

they were live-cd and pxe... just like puppy, you know maybe we can learn one thing or two
http://idea.uab.es/mcreel/PelicanHPC/
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

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

PXE

#10 Post by MagicZaurus »

You always need a DHCP server and a TFTP server on your network if you want to do pure netbooting. The network card need to request an IP address from the DHCP server and the TFTP server needs to provide the OS or at least another bootloader, which then boots the OS.

On Puppy the easiest is to use DNSMASQ as it provides both, a DHCP & TFTP sever.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

Re: PXE

#11 Post by technosaurus »

MagicZaurus wrote:You always need a DHCP server and a TFTP server on your network if you want to do pure netbooting.
If you have a linux bios you could just as easily use NFS, samba, ... There is no "pure" netbooting per se, (at least with commodity hardware) it all requires some type of bios support (not all boards support gpxe even - especially if you have your network adapter as an addon card)

In fact I can outline a path to success using only an sfs hosted on a free site like google code

1. put your main sfs in a place where you have a direct link (no temp sharing page that makes you wait and click another link)

2. modify the initrd.gz to:
a) autoconnect to the internet (you can get grub cmdline params from: cat /proc/cmdlin for wep keys etc)
b) wget the sfs
c) modify the sfs mounting code for the sfs' location in /tmp or wherever

--------working with 2 local files only now -------------
3. rebuild the kernel with the initramfs included (make menuconfig)

--------working with only 1 local file at this point ----------
you may even be able to get this down to floppy size ...
if you want to rely on only using ram for the sfs you can pull all of the drive code out of init and move it to the sfs

-----------------Linux Bios kernel+bios combo------------------
uncharted territory here - proceed at your own risk to coreboot.org


if you want to pursue this, let me know if you get stuck on any coding issues and I'll try to help out where I can
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#12 Post by Master_wrong »

On Puppy the easiest is to use DNSMASQ as it provides both, a DHCP & TFTP sever.
thank you for the straight answer. i did curious why there is dnsmasq-2.46-i486.pet but there is no dhcp.pet and tftp.pet.
now i understand ok
thank you

if you want to pursue this, let me know if you get stuck on any coding issues and I'll try to help out where I can
cloud puppy ?
thank you techno, i will learn more about the simple network first...

livecd netboot
https://wiki.ubuntu.com/LiveCDNetboot
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#13 Post by Master_wrong »

Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#14 Post by jrb »

I have been pxe booting various puppies with MagicZaurus and ecomoney's dnsmasq-2.46-i486-v0.2.pet installed on my pupserver-435.iso. On the whole it is working very well but has required some special accomodations.

First I changed /root/tftpboot/Start-Netboot.sh to:

Code: Select all

#!/bin/sh
#9jan2011-jrb-added creation of /var/lib/misc as it diappears on reboot
mkdir /var/lib/misc 2>/dev/null
ppxe start
Second internet connection doesn't work until I reset the Gateway back to my syslinux router as it takes the ip address of my fileserver as the Gateway. I can do this by running the classic network connection wizard and setting up a new static ip address or by running

Code: Select all

route add default gw 192.168.1.1 eth0
at the command line where 192.168.1.1 is the address of my router.

So far I've booted 4 different computers and three different puppies this way successfully. I don't know if there are hazards associated with running two different dhcpcd servers on the same network. If there are please let me know. :?:

Incidentally, this has allowed me to easily dual boot my wifes win7 machine. I had tried easybcd but only ended up borking the mbr. Now its as simple as pressing F12 at bootup and selecting pxeboot. :D

Cheers, J

gcmartin

#15 Post by gcmartin »

@jrb Good information.
jrb wrote:I have been pxe booting various puppies ... Second internet connection doesn't work until I reset the Gateway back to my syslinux router as it takes the ip address of my fileserver as the Gateway. I can do this by running the classic network connection wizard and setting up a new static ip address or by running

Code: Select all

route add default gw 192.168.1.1 eth0
at the command line where 192.168.1.1 is the address of my router. ... I don't know if there are hazards associated with running two different dhcpcd servers on the same network. ...
Does this mean that the TFTP server AND your router are, both, providing DHCP services on the LAN? What is the IP address and subnet mask used by your router? And, what addresses is it issuing to your LAN machines? Further, what is the subnet mask your TFTP server using?
Thanks in advance for this

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#16 Post by jrb »

Here is the same machine booting qrky130 from the harddrive and from pxe.
Hardddrive:

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:17:A4:1F:AD:3A  
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:191 errors:0 dropped:0 overruns:0 frame:0
          TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:60397 (58.9 KiB)  TX bytes:20475 (19.9 KiB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
PXE:

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:17:A4:1F:AD:3A  
          inet addr:192.168.1.121  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:252 errors:0 dropped:0 overruns:0 frame:0
          TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:19759 (19.2 KiB)  TX bytes:7076 (6.9 KiB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
My settings had held in the save file after setting static ip, so I had to create a new save file to duplicate the pxe behavior.
Attachments
ip_pxe_boot.jpg
pxe boot
(19.08 KiB) Downloaded 2450 times
ip_hd_boot.jpg
harddrive boot
(19.78 KiB) Downloaded 2461 times

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

2 DHCP Servers

#17 Post by MagicZaurus »

@ jrb & gcmartin

If you use the startup script from this How-To http://www.murga-linux.com/puppy/viewtopic.php?t=62308 from phLe then your DHCP server from dnsmasq only replies to the request of the network card during PXE boot and not to the normal DHCP request when trying to connect to the internet.

It's usually not advised to have 2 DHCP servers running, but it should work fine with the right configuration. During PXE boot the network card ignores the original DHCP server, as there is no link to a TFTP server in the reply.

gcmartin

Re: 2 DHCP Servers

#18 Post by gcmartin »

Thanks @JRB and @MagicZaurus
MagicZaurus wrote:@ jrb & gcmartin...If you use the startup script from this How-To http://www.murga-linux.com/puppy/viewtopic.php?t=62308 ...
When you refer to "startup" do you mean:
  • the Puppy server startup?
  • the DHCP server startup?
  • the manual setup of that additional IP address?
Thanks in advance
Last edited by gcmartin on Wed 12 Jan 2011, 03:20, edited 1 time in total.

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

DNSMASQ start

#19 Post by MagicZaurus »

I mean the startup of the 'Puppy server', which is starting of DNSMASQ (DHCP & TFTP server). The following script.

Code: Select all

#!/bin/sh
# MagicZaurus January 2009 for Puppy Linux GPL.
# Based on script from SLAX.
# Enhanced by Ecomoney August 2009
# Customized by Ph. Lelédy

PXE_IP=$(ifconfig "$(ls -1 /sys/class/net | grep eth | head -n 1)" | grep "inet addr" | cut -d : -f 2 | cut -d " " -f 1)
IP_BASE=$(echo $PXE_IP | cut -d "." -f 1-3)

if [ "$PXE_IP" != "" ]; then
killall dnsmasq 2>/dev/null
mkdir -p /var/lib/misc/
./dnsmasq  \
 --port=0 \
 --dhcp-vendorclass=set:PXE,PXEClient \
 --tag-if=set:notPXE,tag:!PXE \
 --dhcp-ignore=tag:notPXE \
 --dhcp-range=tag:PXE,$IP_BASE.110,$IP_BASE.200 \
 --no-ping \
 --dhcp-boot=pxelinux.0 \
 --dhcp-option-force=tag:PXE,208,F1:00:74:7E \
 --dhcp-option-force=tag:PXE,209,"default" \
 --dhcp-option-force=tag:PXE,210,"pxelinux.cfg/" \
 --dhcp-option-force=tag:PXE,211,30 \
 --enable-tftp \
 --tftp-root=$(pwd)/tftpboot \
 $*
 # --test
 # -k, --keep-in-foreground
 # -d, --no-daemon
 else
   echo "No IP assigned to network interface. Cannot start DHCP and TFTP server."
   gxmessage "No IP assigned to network interface. Cannot start DHCP and TFTP server. Please use the network connection wizard to connect to via Ethernet/LAN"
fi
This configuration makes that the DHCP server inside DNSMASQ only replies to request from PXE clients, which is the network card of the client during PXE boot.

gcmartin

On a roll

#20 Post by gcmartin »

Could someone make a PET that does 2 things:
  • 1. add DNSMASQ (dnsmasq-2.55) support for Lucid
    2. Add "Start PXE Server" in the Network section of the PUP Desktop Menu
Should this make all of our lives easier in PXE world? If I know how, I would.

I offer that if someone makes a PET, I will make instructions for"Operating a LiveCD PXE server for booting Puppy clients on the LAN"

hope this helps.

Post Reply