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 Tue 02 Sep 2014, 18:46
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Creating PXE puppy (solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
jrb


Joined: 11 Dec 2007
Posts: 1034
Location: Smithers, BC, Canada

PostPosted: Tue 11 Jan 2011, 20:43    Post subject:  

Here is the same machine booting qrky130 from the harddrive and from pxe.
Hardddrive:
Code:
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:
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.
ip_pxe_boot.jpg
 Description   pxe boot
 Filesize   19.08 KB
 Viewed   2151 Time(s)

ip_pxe_boot.jpg

ip_hd_boot.jpg
 Description   harddrive boot
 Filesize   19.78 KB
 Viewed   2151 Time(s)

ip_hd_boot.jpg

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

Joined: 05 Jan 2009
Posts: 88

PostPosted: Tue 11 Jan 2011, 20:47    Post subject: 2 DHCP Servers  

@ 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.
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 4238
Location: Earth

PostPosted: Tue 11 Jan 2011, 22:24    Post subject: Re: 2 DHCP Servers  

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

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile

Last edited by gcmartin on Tue 11 Jan 2011, 23:20; edited 1 time in total
Back to top
View user's profile Send private message 
MagicZaurus

Joined: 05 Jan 2009
Posts: 88

PostPosted: Tue 11 Jan 2011, 22:55    Post subject: DNSMASQ start  

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

Code:
#!/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.
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 4238
Location: Earth

PostPosted: Tue 11 Jan 2011, 23:44    Post subject: On a roll  

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.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Wed 12 Jan 2011, 02:19    Post subject:  

Thanks MagicZaurus for the script and PhLe for the instruction.

I tested the script (after compiling dnsmasq for fatdog64) and it works beautifully! I'm impressed ... the other instructions I've found so far to setup boot servers are overly complicated. (Install DHCP server, install TFTP server, configure DHCP server, configure TFTP server, configure pxelinux and other stuff - scary Shocked )

This is extremely simply - get dnsmasq, copy and paste the script, and voila! Working boot server !!! I'm really impressed.

cheers!

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 4238
Location: Earth

PostPosted: Wed 12 Jan 2011, 04:10    Post subject: DNSmasq for FATDOG - 511  

@JamesBond great report.
Did you, perhaps, make a PET of your DNSMASQ compiled for FATDOG64?
Could you share a URL for download, or is your PET available via PPM?
jamesbond wrote:
Thanks ...I tested the script (after compiling dnsmasq for fatdog64) and it works beautifully! ...
Does your PET put an entry in the desktop's Menu (say under Networking/somewhere)?
Could your PET have included the script and installed it when PET was run?
Which folder did you place the script in?

Thanks in advance.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Wed 12 Jan 2011, 08:56    Post subject:  

No worries gcmartin, it will take sometime though.

I can't upload it to PPM yet - as you can see from Barry's blog, ibiblio.org is currently undergoing a migration. Thus we can't upload anything there. I can post you the dnsmasq pet to the Fatdog64 thread for the time being.

The script, however, is another matter. It's mean to be run from terminal, and there's some implicit assumptions inside (which is meant to be edited if the script is to be re-used by someone else). It takes a while to convert it to a general purpose script. I'll do that but that will take time.

cheers!

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Thu 13 Jan 2011, 06:25    Post subject:  

The script, packaged in a pet, with gui wrapper (for start/stop control), with desktop menu, suitable for permanent inclusion with any puppy (tested with Fatdog64 - on other puppies the menu may not appear). The executable is netboot-server-jb.sh.

the tftpboot directory is assumed to be at /root/tftpboot (symlink will work if another location is preferable).

Requires dnsmasq (assumed to be available somewhere in the path).
netboot-server-1.0.pet
Description 
pet

 Download 
Filename  netboot-server-1.0.pet 
Filesize  1.79 KB 
Downloaded  402 Time(s) 

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 4238
Location: Earth

PostPosted: Thu 13 Jan 2011, 12:51    Post subject: wOW  

This is an incredible contribution.Thanks everyone.

So, if I understand; on my FATDOG, I should:
  1. install your dnsmasq.pet
  2. install the netboot-server.pet
  3. create my files necessary for PXE boot in the TFTP download folder
  4. boot a PXE capable PC on the LAN
That's IT! Did I miss anything?

This is going to be great!

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile

Last edited by gcmartin on Mon 17 Jan 2011, 15:15; edited 3 times in total
Back to top
View user's profile Send private message 
phLe

Joined: 25 Nov 2010
Posts: 13

PostPosted: Thu 13 Jan 2011, 13:28    Post subject: About the MagicZaurus Ecomoney Ph. Lelédy script  

I am Ph. Lelédy who wrote http://www.murga-linux.com/puppy/viewtopic.php?t=62308, and enhanced the script from MagicZaurus and Ecomoney for not serving non PXE clients.

I wonder if the script in netboot-server-1.0.pet is this one I speak about ?

If it the case I warn against a little bug:
Code:
grep "inet addr"
doesn't work on a french localized server (in french one says "adresse" for the english word "address"). So I had to replace by
Code:
grep "inet ad"
which works on both englis and french servers.

Furthermore, I like using my script with -d option because it gives very clear debugging information. Hox does-it fit in a GUI ?

PhLe.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Thu 13 Jan 2011, 20:05    Post subject: Re: wOW  

gcmartin wrote:
This is an incredible contribution.Thanks everyone.

So, if I understand; on my FATDOG, I should:
  1. install your dnsmasq.pet
  2. install the netboot-server-1.0.pet
  3. create my files necessary for PXE boot in the TFTP download folder
  4. boot a PXE capable PC on the LAN
That's IT! Did I miss anything?

This is going to be great!


Yes, that's all you need to do. For other puppies, I believe there is dnsmasq pet floating around also.

EDIT: The server will continue to run after you activate it. Click the menu (or run netboot-server-jb.sh) again to terminate the server. If you want a single-use version, use the debug version in the next two posts instead.

Running server doesn't survive reboot - you need to run it again if you reboot the machine.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread

Last edited by jamesbond on Thu 13 Jan 2011, 22:37; edited 1 time in total
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Thu 13 Jan 2011, 20:16    Post subject: Re: About the MagicZaurus Ecomoney Ph. Lelédy script  

phLe wrote:
I am Ph. Lelédy who wrote http://www.murga-linux.com/puppy/viewtopic.php?t=62308, and enhanced the script from MagicZaurus and Ecomoney for not serving non PXE clients.

I wonder if the script in netboot-server-1.0.pet is this one I speak about ?
Thanks PhLe, yes, it's your script that I modified a little, and put into the pet.

Quote:
If it the case I warn against a little bug:
Code:
grep "inet addr"
doesn't work on a french localized server (in french one says "adresse" for the english word "address"). So I had to replace by
Code:
grep "inet ad"
which works on both englis and french servers.
I changed the way the PXE_IP is determined (because sometimes I get the IP address from eth0, sometimes from wlan0, and I don't want to keep changing the script) - I get it from "ip address" command now instead of ifconfig, so this fix no longer apply for above. I don't have any localised French server though, so I can't say whether it will work there.

Quote:

Furthermore, I like using my script with -d option because it gives very clear debugging information. Hox does-it fit in a GUI ?

You can't Very Happy You can still run it from the terminal and pass the -d option and see all the debugging info on the terminal. It's possible to pipe that debugging output to a GUI window as well, but I'm not very inclined to do that now (because it's much easier just to open terminal and run the script from there) Wink

All in all, thanks for your contribution (and MagicZaurus and Econmoney) which makes this possible in the first place.

cheers!

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Thu 13 Jan 2011, 22:34    Post subject: Re: About the MagicZaurus Ecomoney Ph. Lelédy script  

jamesbond wrote:

Quote:

Furthermore, I like using my script with -d option because it gives very clear debugging information. Hox does-it fit in a GUI ?

You can't Very Happy You can still run it from the terminal and pass the -d option and see all the debugging info on the terminal. It's possible to pipe that debugging output to a GUI window as well, but I'm not very inclined to do that now (because it's much easier just to open terminal and run the script from there) Wink

Actually here's the script for those who needs it - copy this over /usr/sbin/netboot-server-jb.sh to have it replace the one installed by the pet. It will run dnsmasq with "-d" option, capture and display it on a window ... when you're done, click cancel and dnsmasq will terminate.
netboot-server-debug.sh.gz
Description 
gz

 Download 
Filename  netboot-server-debug.sh.gz 
Filesize  1.35 KB 
Downloaded  374 Time(s) 

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2134
Location: The Blue Marble

PostPosted: Fri 14 Jan 2011, 21:48    Post subject:  

Ok updated the script ... combined the "normal" and "debug" mode (you can choose when you start up the server). I've created the /root/tftpboot directory structure and throw in gpxelinux.0 (from syslinux-4.03) and the "default" files. All that is needed is to symlink the proper vmlinuz and initrd.gz to /root/tftpboot/pxelinux.cfg directory.

Even this can now be automated - I've also included a script "mknetboot.sh" (no menu entry, must be accessed through terminal or through "Gexec run command") to convert a standard puppy iso into a netboot-compatible files in /tmp/netboot, and symlink it right to /root/tftpboot/pxelinux.cfg ready for booting!

A separate dnsmasq pet is still required - I purposely leave out the dnsmasq so that this pet is puppy-dependent and can be used in all puppies.

EDIT - the latest puppies as of today (Wary 5.0, Lupu 5.2), have a bug in their init script, making netboot failed during booting. While it's being fixed, the workaround is to edit the "default" file and add "PDEV1=rootfs" to the line that contains "append".

cheers!
netboot-server-2.pet
Description 
pet

 Download 
Filename  netboot-server-2.pet 
Filesize  89.36 KB 
Downloaded  379 Time(s) 

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.1115s ][ Queries: 13 (0.0050s) ][ GZIP on ]