Page 2 of 4

PXE package

Posted: Sat 15 Jan 2011, 09:47
by MagicZaurus
Thanks a lot jamesbond for packaging this all so nicely together. I didn't have time to test it, but with all your efforts netbooting Puppy has become so much easier.

Posted: Thu 20 Jan 2011, 11:13
by jamesbond
Thanks for your kind words, MagicZaurus.

gcmartin found a bug in mknetboot.sh (this is due to Xdialog/GTK bug). Here's a fix - it's not perfect, but at least it works.

cheers!

Posted: Mon 24 Jan 2011, 09:58
by mhanifpriatama
Maybe helps some one.
I use another way. I used for my small internet cafe.
My server uses lupu511, my client uses lupu503.

On server :
1. Install dnsmasq
2. create /etc/dnsmasq.conf
3. write code inside dnsmasq.conf :

Code: Select all

 

# Configuration file for dnsmasq
dhcp-range=169.254.33.219,169.254.33.223,12h
# give IP address to match machine address : 
dhcp-host=00:30:67:31:69:02,169.254.33.220
dhcp-host=00:30:67:1E:F4:7E,169.254.33.221
dhcp-host=00:30:67:6E:B0:1B,169.254.33.222
dhcp-host=00:30:67:1E:FA:8C,169.254.33.223
# Set the boot filename for netboot/PXE
dhcp-boot=pxelinux.0
# Enable dnsmasq's built-in TFTP server
enable-tftp
# Set the root directory for files available via FTP.
# I use /initrd/mnt/dev_ro2 because use fresh frugal install on hd
tftp-root=/initrd/mnt/dev_ro2/tftp
# Debugging
log-queries
log-dhcp
# somewhere other that /etc/resolv.conf
resolv-file=/etc/ppp/resolv.conf
4. prepare pxelinux and humongous initrd.gz (with lupu-503 inside)
5. Place at a script in Startup this command : /usr/local/sbin/dnsmasq -d
(gbilling-server also)
6. Set client with lan booting.
Done ...

I never use pupsave. Just remastering with dougal's script.
But i forget something important, how to make client connect to server and auto IP assign! Just run network wizard, place manual IP and gateway, then remastering. Can any one explain how-to this thing? I don't know how rc.network work.
I want upgrade client to lupu520.
SOrry on my english.

Posted: Thu 03 Feb 2011, 09:41
by mhanifpriatama
I did this on my lupu 520 thin-client :
put my script on rc.local

Code: Select all

a=`dhcpcd -T | grep new_ip_address` #pick ip address from dhcp server
dhcpcd -s ${a:15:15}  #from line, just pick the ip number : 169.254.33.223 then run dhcpcd with -s option
route add default gw 169.254.33.219 
echo nameserver 169.254.33.219 >> /etc/resolv.conf
after that, thin-client can connect to internet at first bootup.
My problem above is solved.

Posted: Fri 04 Feb 2011, 10:02
by Master_wrong
Thank you for the script.

so you put the script on rc.local, the remaster, the the remastered iso is used to boot the client via pxe ?

correct ?

Posted: Fri 04 Feb 2011, 14:14
by Aitch
Hi all

For anyone still struggling with PXE booting, I've just come home from a Linux/Cloud Show at Barbican, UK, and saw this demo'd, at the show

http://ipxe.org/

I don't know if it's any use/can be incorporated into puppy, but it seemed impressive with a wide range of network cards supported, and range of implementation formats
with additional features such as:

*
boot from a web server via HTTP

*
boot from an iSCSI SAN

*
boot from a Fibre Channel SAN via FCoE

*
boot from an AoE SAN

*
boot from a wireless network

*
boot from a wide-area network

*
boot from an Infiniband network
Aitch :)

Posted: Fri 04 Feb 2011, 21:27
by gcmartin
Thanks @Aitch

This is a client-side application. Thus, it ONLY applies to the client one is trying to have starting over the LAN.

This is something that one can use if his PC's PXE motherboard support is problematic (doesn't work) or if the PC someone is trying to use doesn't have a PXE LAN function on the motherboard so this might allow him to find the PXE server on the LAN (although I haven't tried it yet) and boot their machine using the ISA/PCI LAN card in their PC.

The PXE server should could care less. It will serve whomever makes the request for service. iPXE running on a LAN machine will allow the requesting PC to make that request if his machine cannot do it under its own power.

Hope this helps

Posted: Thu 10 Feb 2011, 08:57
by mhanifpriatama
Master_wrong wrote:Thank you for the script.

so you put the script on rc.local, the remaster, the the remastered iso is used to boot the client via pxe ?

correct ?
Yes, correct. Sorry so long to answer. But one thing I had problem and I solved it : you must put delay time!!!!
so ....
the script is like ...

Code: Select all

a=`dhcpcd -T | grep new_ip_address` #pick ip address from dhcp server
dhcpcd -s ${a:15:15}  #from line, just pick the ip number : 169.254.33.223 then run dhcpcd with -s option
sleep 10
route add default gw 169.254.33.219
echo nameserver 169.254.33.219 >> /etc/resolv.conf 

Posted: Thu 10 Feb 2011, 09:20
by mhanifpriatama
Just report, may be useful.

If I want to customize thin-client lupu-520.sfs, I remaster it.
But, this thing eat time a lot.
So, I just customize initrd.gz :
1. extract initrd.gz
2. put a script, exp : aa.sh
3. little hack the init script : copy aa.sh to initrd/mnt/data

How to run that script?
Do remaster, or edit the lupu-520.sfs.
Then add these line to rc.local :

Code: Select all

chmod a+x /initrd/mnt/data/aa.sh
/initrd/mnt/data/aa.sh
This script will run before xwin.

If we want to put a script at Startup, just add these code to aa.sh :

Code: Select all

echo "#!/bin/bash
firefox 
" > /root/Startup/ss.sh

So, I can make user run openoffice.sfs with this method :

Code: Select all

mkdir /root/dir_oo
curlftpfs ftp://169.254.33.219 /root/dir_oo
cd /root/dir_oo
filemnt ./go-oo-3.2-sfs4.sfs

Posted: Thu 10 Feb 2011, 10:29
by Master_wrong
hi mhanifpriatama,


thank you...

oh another sfs loading hack :lol:

that can be useful... 8)
Code:

mkdir /root/dir_oo
curlftpfs ftp://169.254.33.219 /root/dir_oo
cd /root/dir_oo
filemnt ./go-oo-3.2-sfs4.sfs


so the sfs located... at /root/dir_oo /
and the filename is go-oo-3.2-sfs4.sfs

thank you very much for sharing

Posted: Thu 17 Feb 2011, 09:31
by mhanifpriatama
anyone knows, how to make nfs client run at initrd.gz, so can look at pup.sfs on virtual drive?

Missing PXE fucntions?

Posted: Thu 17 Feb 2011, 18:27
by gcmartin
Hi @Mhanifpriatama
mhanifpriatama wrote:anyone knows, how to make nfs client run at initrd.gz, so can look at pup.sfs on virtual drive?
I'm not sure if I understand your question> Are you using the PXE approach mentioned here and finding that it is inadequate for your needs?
Is it missing something critical for PXE?

Let's see if this might help.
  • LightHouse PUP recently completed a major change in Puppy boots such that a booting LIghtHouse PC user can select, at boot time, which SFSs he wants included when he gets to desktop of his LiveCD/PXE. This is a major step forward as I believe we will come to see in Puppyland.
  • Another idea that may help is you may want to create your "PUP.SFS" and make an ISO out of it. If this is done, you could, then, use the DNSMASQ+NETBOOT PETs to setup your PXE environment to let your LAN PCs boot
.would either of these provide an approach that would meet your needs, easily?

Thanks in advance for helping me understand.

Posted: Fri 18 Feb 2011, 22:43
by vezuve
Hello,
Online translation-traduction en ligne
I would like to know if there is the possibility of having the pupsave on the server, so that the customer (slave) puppy could have access by network.
Originale
Je voudrais savoir si il y a la possibilité d'avoir le pupsave sur le serveur, afin que le puppy client (esclave) puisse avoir accès par le réseau.
@+

Posted: Sat 19 Feb 2011, 08:28
by mhanifpriatama
thanks gc.martin,
I want my server run nfs server. I think that kernel module.
So, my server can offer drive-sharing (like virtual hard drive).
I want my client run nfs-client. I think that kernel module too.
So, my client can see the virtual drive.

If nfs-client can run before loading my lupu_520.sfs, I can place it at virtual drive, then the init script can mount it.

I think this will solve the old computer client with very low ram.

Sorry. My native is not english.

Posted: Sat 19 Feb 2011, 10:22
by mhanifpriatama
@vezuve, I think we have same Idea but differ purpose.
upload of pupsave file is init script job. I think, I must do some experiment. I'll report it if I success.
Of course, if any one have known a lot of init's work, and also nfs work, may be this is an easy things.
And ... I am not a bash programmer.

Posted: Sat 19 Feb 2011, 15:51
by Aitch
maybe these can help with NFS share?

http://www.murga-linux.com/puppy/viewtopic.php?t=12523

http://www.murga-linux.com/puppy/viewtopic.php?t=27109

http://www.murga-linux.com/puppy/viewtopic.php?t=45090

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

Note:
sunburnt wrote:I think Barry has added PXE booting of Puppy-2.16.
In our discussion he mentioned NFS, so maybe it's part of Puppy-2.16.
Otherwise.. I think that there's a DotPup or something for installing NFS.

Note: NFS doesn't seem to be used so much anymore.
Samba is much more popular & is easier to setup (I've read & my personal experiance).
Samba is about as fast as NFS & much more secure, it's size is a little larger.

Puppy already has good Samba client tools, it just needs Samba server.
There's a Samba server DotPup at MU's site: http://puppyfiles.org
I suggested to Barry that he might include it so Puppy would be just like Win.
So maybe samba is better?
gcmartin tutorial
http://murga-linux.com/puppy/viewtopic.php?p=459206

HTH,

Aitch :)

Posted: Sat 19 Feb 2011, 17:40
by gcmartin
mhanifpriatama wrote:thanks gc.martin,
I want my server run nfs server. I think that kernel module.
So, my server can offer drive-sharing (like virtual hard drive).
I want my client run nfs-client. I think that kernel module too.
So, my client can see the virtual drive.

If nfs-client can run before loading my lupu_520.sfs, I can place it at virtual drive, then the init script can mount it.

I think this will solve the old computer client with very low ram. ....
Good, now I have a better understanding. I CANNOT solve either the NFS issue you raise NOR the changing boot structure that a LiveCD (or PXE) gives you. But, I will try to help by showing you 2 things.

Assumption: you have a 300+MB PC which is PXE capable and has a HDD. (PXE is NOT going to solve any RAM issue with any PCs. If will get you to a desktop in the same manner as if you were using a LiveCD)

Thought#1: PXE boot and do a PUPSAVE to your HDD.
Thought#2: Take Implementation #2 in the Document you see referenced here, then use F2 to stop and enter any boot-time changes you desire.

@Aitch also references that the SAMBA client in your PUP allows you to read and write to another location on your LAN. I use this all the time. My PXE server is also my NAS. I run SAMBA 3.5.6 provided by the PUP Distro makers. My PXE clients, after booting to desktop of course, can read and write to that SAMBA server using either the GUI tools provide in the PXE's PUP or using the "mount" feature of the system. If you need a reference on how to set server up, either Post/PM and I will respond. (Oh, if you have a Microsoft machine on your LAN, then it has the ability to do what the SAMBA server does without installing anything on the Microsoft machine. ALSO, If you have a "major" Linux distro running, they all, except Puppy, have SAMBA server 3.5.6 already without installing anything.)

Hope this helps

Posted: Sat 19 Feb 2011, 23:46
by mhanifpriatama
thanks,
This not actually my problem. Just an alternative that may be helps some one, and of course of my curious. My client hardware have no hdd, all new modern PC with 1G RAM.
But any way, I want this thing clear for me. ( Hey, I'm so glad to be member of this forum, and solve some problem ... just like a hobby)

gc.martin said :
My PXE clients, after booting to desktop of course, can read and write to that SAMBA server using either the GUI tools provide in the PXE's PUP or using the "mount" feature of the system.
So ... after booting to desktop.. hmmm ...
if only I could hack init script, so can mount before sfs file.

@aitch : Thanks for links.
but it will another big problem, how to mount the virtual drive and looking for the pup sfs.

I think, I will end up this discussion. I'll look for another information of this. Thanks for all.

Posted: Sun 20 Feb 2011, 01:40
by jamesbond
Just to give it an idea of what it takes:
1. NFS server - relatively easy - if your puppy version doesn't support in-kernel nfs server, you can always get this http://unfs3.sourceforge.net/ and compile yourself a server.
2. NFS client - to mount SFS from the nfs - this is also relatively easy, I believe most puppies support it:

Code: Select all

mount -t nfs server_ip_address:/sharename /mnt/mountpoint
followed by

Code: Select all

mount -o loop /mnt/mountpoint/pup.sfs /initrd/pup_ro2
3. Now the hard part. To be able to do the mounting as above, all the plumbing must be ready. That is:
- you must have an IP address
- oh, that means you need to configure static IP address or have dhcp running on your network adapter
- oh, that means you have must have a configured network adapter
- oh, that means you must detect the correct network adapter
- and oh, the driver for that network adapter must be in initrd

All these plumbing are stuff which is usually done in rc.sysinit in pup.sfs, so you'll have to move all these to initrd.

NB: Alternatively to 2 & 3, you can compile yourself a kernel capable of using NFS as root filesystem.

Good luck, and share with us if you've got yourself a working solution :)

Posted: Sun 20 Feb 2011, 02:04
by Master_wrong
1. NFS server - relatively easy - if your puppy version doesn't support in-kernel nfs server, you can always get this http://unfs3.sourceforge.net/ and compile yourself a server.
i already compile them
http://www.murga-linux.com/puppy/viewtopic.php?t=64491

otherwise you can use mike's kernel -nfs
http://www.murga-linux.com/puppy/viewto ... 996#496996

btw about pupsave... couldnt we load them after we boot ?