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 Sat 20 Dec 2014, 08:33
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 4 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Sat 19 Feb 2011, 11:51    Post subject:  

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


Joined: 14 Oct 2005
Posts: 4506
Location: Earth

PostPosted: Sat 19 Feb 2011, 13:40    Post subject:  

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

_________________
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 
mhanifpriatama

Joined: 22 Jan 2011
Posts: 60

PostPosted: Sat 19 Feb 2011, 19:46    Post subject:  

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

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

PostPosted: Sat 19 Feb 2011, 21:40    Post subject:  

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:
mount -t nfs server_ip_address:/sharename /mnt/mountpoint

followed by
Code:
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 Smile

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

Joined: 19 Mar 2008
Posts: 456

PostPosted: Sat 19 Feb 2011, 22:04    Post subject:  

Quote:
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/viewtopic.php?p=496996#496996

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

_________________
Cluster-Pup v.2-Puppy Beowulf Cluster
http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199
Back to top
View user's profile Send private message 
jamesbond

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

PostPosted: Sun 20 Feb 2011, 00:38    Post subject:  

Thank you master. Indeed, I got the reference to unfs3 from your original post. Now I forgot something - one also need to have portmapper running to be able to use it. If you could compile it for other puppies it would be very helpful.

As for loading pupsave after boot - this depends on exactly "when". if one has a customised settings in pupsave (e.g. for Xorg), then one definitely wants to load pupsave before Xorg starts ...

Actually, mounting samba shares and nfs shares is equally easy, and since samba pets and instructions are readily available, it may be worthwhile to consider it.

My point no 3 still applies whichever share technology you use ....

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

Joined: 19 Mar 2008
Posts: 456

PostPosted: Sun 20 Feb 2011, 00:45    Post subject:  

Quote:
one also need to have portmapper running to be able to use it. If you could compile it for other puppies it would be very helpful.


sorry, but no
my startup script did not use the portmapper because it use -p option

Quote:

Quote:
-p
Do not register with the portmapper. This will prevent other hosts from finding out the port numbers used for the MOUNT and NFS services by querying the portmap daemon. Clients will need to manually specify the port numbers to use (on Linux clients, use the mountport and port mount options).


if you see the script you will understand.

_________________
Cluster-Pup v.2-Puppy Beowulf Cluster
http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199
Back to top
View user's profile Send private message 
jamesbond

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

PostPosted: Sun 20 Feb 2011, 06:55    Post subject:  

Thanks Master, I know that. It happens to work fine in puppy, but newer versions of nfs-utils (e.g. like the one I have in Fatdog) won't mount if you don't use portmap or if you don't specify non-standard ports. But nevermind - for the purpose of this thread, it works.

Here's a teaser screenshot Very Happy
puppy_over_nfs.png
 Description   
 Filesize   139.79 KB
 Viewed   780 Time(s)

puppy_over_nfs.png


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

Joined: 22 Jan 2011
Posts: 60

PostPosted: Mon 21 Feb 2011, 06:22    Post subject:  

I did an experiment.

I tried master_wrong's unfs script. Client can see server's root.

But, I placed unfs script at init script, under section "module loading".

Code:

##############END MODULE LOADING TO ACCESS DRIVES####################
mkdir /mnt/try
mount -o port=4711,mountport=4711,mountvers=3,nfsvers=3,nolock,tcp 169.254.33.219:/root /mnt/try
#######################FINDING PUPPY FILES###########################



There is nothing in /mnt/try

I tried again .... with manually typing after warning that pup sfs not found :
Code:

#mount -o port=4711,mountport=4711,mountvers=3,nfsvers=3,nolock,tcp 169.254.33.219:/root /mnt/try

mount: mounting 169.254.33.219:root on /mnt/try failed


Something I don't know....
Back to top
View user's profile Send private message 
jamesbond

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

PostPosted: Mon 21 Feb 2011, 10:53    Post subject:  

Another teaser (running on 512MB machine).

See my step 3 above.
- Can you ping your nfs server?
- Do you have any IP configured for your network card?
- Is your network card working?
fatdog_over_nfs.png
 Description   
 Filesize   131.46 KB
 Viewed   750 Time(s)

fatdog_over_nfs.png


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

Joined: 19 Mar 2008
Posts: 456

PostPosted: Mon 21 Feb 2011, 11:49    Post subject:  

@mhanifpriatama

did you try to boot pxe and nfs ?

did you change setting in tftpboot ?

I never try it myself but i already think about it and do some research
from...
http://www.digitalpeer.com/id/linuxnfs
/tftpboot/pxelinux.cfg/default
must be something like this
Quote:

prompt 1
default linux
timeout 100

label linux
kernel bzImage
append init=/sbin/init root=/dev/nfs rw nfsroot=192.168.0.1:/nfsroot ip=192.168.0.254:192.168.0.1:192.168.0.1:255.255.255.0:llama0::off noapic acpi=off


also

http://www.devcollective.org/wordpress/2008/12/25/diskless-slackware-installation-using-nfs-and-pxe

@jamesbond

is that teaser means you can boot with pxe and nfs already ?
thats awesome...

_________________
Cluster-Pup v.2-Puppy Beowulf Cluster
http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199
Back to top
View user's profile Send private message 
jamesbond

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

PostPosted: Tue 22 Feb 2011, 00:21    Post subject:  

Master_wrong wrote:
@jamesbond

is that teaser means you can boot with pxe and nfs already ?
thats awesome...
Yes, I booted Fatdog over nfs. There are two ways of doing it:
a) running puppy modified to load its pup.sfs from nfs [my first screenshot] - this is like running frugal install but the "harddisk" where the pup.sfs is stored is nfs
b) running puppy modified to mount its rootfs directly from nfs [my second screenshot] - this is like running full-install but the harddisk is nfs.
Your links all refer to the second method. This is also another good link to get started (also the second method) https://wiki.archlinux.org/index.php/Diskless_network_boot_NFS_root.
Either way, I did it manually, just want to show what's possible.

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

Joined: 22 Jan 2011
Posts: 60

PostPosted: Tue 22 Feb 2011, 03:56    Post subject:  

hmmm .... to configure network manually is hard to do, for me of course.
hmmm .... to compile a kernel?? I never did that before.
hmmm .... many linux commands that simplify network setup does not exist in initrd.gz (because I'm not linux master, just a curious user)

I will try this (if I have enough time):

After load a complete desktop :
- copy almost all files (and folder) to nfs-mount folder (exp. /mnt/try)
- change almost all files (and folder) to symlinks to /mnt/try
- remaster it.
So, I have small pup sfs with a lot symlinks.
One thing, what files that must be left? I'll look at standard pet packages list.

I'll report it ....

Btw, to jamesbond :
Quote:
a) running puppy modified to load its pup.sfs from nfs [my first screenshot] - this is like running frugal install but the "harddisk" where the pup.sfs is stored is nfs


Can I get your "puppy modified"? That just init script?
Back to top
View user's profile Send private message 
jamesbond

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

PostPosted: Wed 23 Feb 2011, 01:39    Post subject:  

Here's the manual steps behind it - I don't have any script or anything.

Method one - Load pup.sfs from nfs
1. re-compiled kernel to include network card driver (this isn't strictly necessary - there are other ways of doing it, but I'm lazy)
2. put a full version of busybox (which has udhcpc) to initrd (this isn't necessary if you're willing to use static ip for testing) - there is one in here http://www.murga-linux.com/puppy/viewtopic.php?t=59496&start=30 thanks to technosaurus
3. run the nfs server, making sure that pup.sfs is available somewhere
4. boot the new kernel with the new initrd - it will fail because "cannot find pup.sfs" and drops you to ramdisk (or instead you can go straight to shell by putting rdinit=/bin/ash in the boot command line, but then you'll have to do more things ...)
5. get ip address for the network card - either use busybox udhcpc as above, or just do "ifconfig eth0 your-ip-address netmask your-netmask"
6. mount the nfs shared directory, let's say at /mnt/dev_save (use the mount -t nfs command as above)
7. mount the pup.sfs file ("mount -o loop /mnt/dev_save/pup.sfs /pup_ro2")
8. make the tmpfs for pup_rw ("mount -t tmpfs tmpfs /pup_rw")
9. join them together in aufs dance ("mount -t aufs -o br:/pup_rw=rw:/pup_ro2=ro unionfs /pup_new")
10. delete rc.network from /pup_new/etc/rc.d (if you don't do this, boot will fail because rc.network will try to reconfigure the network card, thus cutting off the nfs connection Wink )
11. switch root - "exec switch_root /pup_new /sbin/init"
12. Watch in awe that your puppy boots over nfs Smile
Step 7-11 - we're doing manually what the puppy init script usually does it automatically for us. In fact, we only need to modify initscript to do step 5,6,7, and the we can continue where we left off in init ...
13. In step 1, I recompiled the kernel but this isn't necessary. As an alternative, instead of recompiling the kernel, you can copy the network driver to the initrd, and do a "depmod -a" and "modprobe your-card-driver" before starting step 5.

Method two - Load rootfs from nfs
1. re-compiled kernel to include:
a) network card driver
b) include nfs client as part of kernel
c) using nfs as root
d) enable kernel ip autoconfiguration
2. make sure nfs server uses portmap
3. make the contents of pup.sfs available for exports, and make sure it's shared as writable (you can unsquashfs pup.sfs and export the resulting squashfs-root directory)
4. delete rc.network from this shared directory
5. boot the new kernel with this parameter:
kernel bzImage root=/dev/nfs ip=dhcp loglevel=7 nfsroot=ip-of-your-nfsserver:/your-unsquashed-root,v3
(If you don't use dhcp, you can change ip=xxx.xxx.xxx.xxx to use static ip)
6. Watch in awe that your puppy boots over nfs Smile
7. Note: no initrd is necessary with this method. But you definitely need to re-compile the kernel.

Note: those steps above are working but aren't clean, they're used for proof-of-concept only that it works. They won't shutdown cleanly, I think there's some shutdown code which mucks with the network. I did the test with Fatdog, but it should work with all puppies.

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

Joined: 19 Mar 2008
Posts: 456

PostPosted: Wed 23 Feb 2011, 06:25    Post subject:  

Quote:

Note: those steps above are working but aren't clean, they're used for proof-of-concept only that it works. They won't shutdown cleanly, I think there's some shutdown code which mucks with the network. I did the test with Fatdog, but it should work with all puppies.


maybe nfs need to be unmounted first... ?
sometimes i experience hung during shutdown if using nfs too ?

clean or not clean they are working concept.
thank you jamesbond...

btw would you create script to automate-pxe-nfs ?
like the one you posted with normal pxe ?
the 1.st step sounds difficult you know Very Happy
thank again for the tutorial...

_________________
Cluster-Pup v.2-Puppy Beowulf Cluster
http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 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.1179s ][ Queries: 12 (0.0057s) ][ GZIP on ]