PupServer SFS - Testing... Samba & PXE boot.

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

PupServer SFS - Testing... Samba & PXE boot.

#1 Post by sunburnt »

I made an SFS file of PupServer for Puppy-2.x.x versions ONLY.
Puppy-2.x.x versions should load it automatically at boot.
Or you can mount it manually of course.

Once it's loaded, then start the server daemons... type into Xterm:
/.sfs/install.sh add

To remove the SFS file... type into Xterm:
/.sfs/install.sh remove

Then if you want you can unmount the SFS file.
I may have forgotten something here, so post any Qs...

There's TarGzip files of PupServer & LanPuppy on the site.
The SFS server file is the bottom one.

http://www.eejagger.com/LanPuppy/

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2 Post by sunburnt »

If this SFS file can be verified to work, I'll add the LanManager GUI, & I'll add
options for DHCP & TFTP (on/off) to make it a more flexable server setup.

This server addon for Puppy 2 versions can be just a Samba server,
or just a DHCP server or just a PXE boot server, or any combination of the 3.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#3 Post by BarryK »

Could I post a question here that is kind related, to Puppy booting as a client anyway.

I'm redoing the initial-ramdisk, and I've upgraded Busybox to the latest,
version 1.4.1. I'm thinking that it may be a good idea to recompile Busybox, as the 'mount' applet has been compiled as follows:

Code: Select all

CONFIG_MOUNT=y
# CONFIG_FEATURE_MOUNT_NFS is not set
CONFIG_FEATURE_MOUNT_CIFS=y
CONFIG_FEATURE_MOUNT_FLAGS=y
# CONFIG_FEATURE_MOUNT_FSTAB is not set
Detailed help on these options:

Code: Select all

config FEATURE_MOUNT_NFS
	bool "Support mounting NFS file systems"
	default n
	depends on MOUNT
	depends on FEATURE_HAVE_RPC
	select FEATURE_SYSLOG
	help
	  Enable mounting of NFS file systems.

config FEATURE_MOUNT_CIFS
	bool "Support mounting CIFS/SMB file systems"
	default n
	depends on MOUNT
	help
	  Enable support for samba mounts.

config FEATURE_MOUNT_FLAGS
	depends on MOUNT
	bool "Support lots of -o flags in mount"
	default y
	help
	  Without this, mount only supports ro/rw/remount.  With this, it
	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
	  private, unbindable, rshared, rslave, rprivate, and runbindable.
It looked like a good option to enable mounting SMB filesystems, as well as the extended '-o' options. But, I did not enable the NFS option
-- would this be good to do also? This would mean that the 'init'
script in the initial ramdisk would be able to mount NFS volumes.

Also, would it be good for the initial-ramdisk to support any more applets for SMB/NFS mounting? Currently this is what is supported:

Code: Select all

Currently defined functions:
        [, [[, ash, basename, cat, chgrp, chmod, chown, chroot,
        clear, cut, dd, df, dirname, dmesg, du, echo, egrep, eject,
        expr, false, fdisk, fgrep, free, grep, gunzip, head, hwclock,
        init, kill, killall, klogd, ln, login, logread, losetup,
        ls, mkdir, mkswap, mount, mv, passwd, pidof, pivot_root,
        ps, pwd, readlink, renice, rm, sed, sh, sleep, stat, swapoff,
        swapon, sync, syslogd, tail, tee, test, touch, tr, true,
        umount, uname, wc, zcat
I've attached the current config file so you can see all possibilities.
Attachments
DOTconfig-BB1.4.1-10MAR07.gz
(3.92 KiB) Downloaded 617 times

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#4 Post by sunburnt »

Barry; I added: smbmnt, smbmount, & smbumount to: /root0/sbin
So they're available at boot, Total = 638KB.
This may be easier to do than anything else...

These 3 files & a new sysinit (init in puppy2) is all the changes
that're needed to make a Puppy into a LanPuppy.

Adding NFS would increase Puppy's flexability out-of-the-box.
But it seems that NFS is being used less & less as time goes on.
CIFS is the future for both Win. & Linux... just the one protocol may be enough.
If it adds no extra size to initrd.gz then sure, why not?

Improvements to BusyBox may save space in the initrd.gz file.
I know very little about it, but it may be better than other options.

Ask any Qs you have... Terry B.

User avatar
netjess
Posts: 29
Joined: Fri 17 Feb 2006, 14:24
Location: Oklahoma, USA
Contact:

#5 Post by netjess »

Barry,
----------------
>Also, would it be good for the initial-ramdisk to support any more applets
>for SMB/NFS mounting? Currently this is what is supported:
----------------

From a client perspective could you include tftp? As far as network booting I think it would be better to pull all the necessary files via tftp and then give user choice of save options later. Network/USB/HDD.
I say this because it helps keep the size down.

If you want to make a single initrd for the distro, not need a special INITRD for network can you have it so that it checks for APPEND lines in the boot cfg file?
(maybe I don't know what I am talking about here.....)
---------------------------------------------------
APPEND acpi=off pfix=ram root=/dev/ram0 loglevel=3 initrd=\puppy\image.GZ network
---------------------------------------------------
Have it load the bare network dhcp and tftp then pull the SFS files into RAM and then proceed to load.
Also is the append line the only preboot configuration that can be done? To modify anything other than the INITRD I am guessing you need to boot a system save changes and then transport the sfs files containing your changes. Is that right?
Can you also change the way that Puppy default the name of the PC to puppypc so that it uses some kind of random variable to avoid duplicate names on the network? suggest puppy+ipaddress or puppy+MAC

let me know if I am all wet on this. I am pretty good in networking, it's my job, I admin dhcp and dns on linux and have no problem getting DOS to do what I want but I am new to manipulating the guts of linux.

I posted here because of the link from http://www.puppyos.net/blog/comments.ph ... 310-093453

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#6 Post by sunburnt »

netjess; Tftp is required to LANboot anything, it only gets the kernel & image file to the client PC.
Other files (SFS) could be loaded that way, but it's a pain in the arse.
And tftp would ONLY allow loading the files to ram... BAD for low ram client PCs.

Again... A client PC almost always needs HOME storage space... network share.
And I've stated that Puppy should have Samba server in it, so Puppy can share files like Win. does.
A netclient PC doesn't need to share files, but regular Puppy sure does need it.
The share also allows the loading of SFS files & other needed config. files.

LanPuppy names client PCs: pup-(last number of IP address) & dhcpd.conf uses it.
Last edited by sunburnt on Thu 22 Mar 2007, 03:25, edited 1 time in total.

User avatar
netjess
Posts: 29
Joined: Fri 17 Feb 2006, 14:24
Location: Oklahoma, USA
Contact:

#7 Post by netjess »

Sunbrnt,

I am glad to hear that LANPuppy changes the rename convention.

I know that tftp is required for booting but the client dumps it once the NBL is done. I have not been able to get LANPuppy to load from a pure PXE without the floppy you provide.

I don't understand why you say tftp is a pain. I use it all the time. If you mean the DHCP set up where you specify unique boot for each client that setup is not necessary and a simple menu selection is available from syslinux/PXElinux.

I understand your view on low mem legacy equipment but just how old and low should be a concern? I would think anyone who could boot to a network could have 128 or more of memory or usb or choose a network save location.
I have a network load of puppy-barebones-1.0.4 that I can PXE, until it gets to the part where it looks for the usr_cram.fs, it still loads but I have to manually start DHCP. If it had TFTP in the /sbin and if I could pass some kind of parameter to tell it to start DHCP and pull the usr_cram.fs I would have a complete load and get my xserver but that would all need to be scripted into the INITRD.

<sigh>
I just wish there was a way to pass a script to initrd w/o recompile.
I guess I could just use my bart's bootdisk load everything into a ramdisk and then run the boot from there.... Seems kinda round robin. Having linux stand on DOS shoulders.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#8 Post by sunburnt »

netjess; I'm not sure what you mean by: "but the client dumps it once the NBL is done".
The only thing dumped is the IP address, & dhcpcd is needed to get a permanent one.

Which LanPuppy version do you have? The original install files, or the alpha release?
My problem was the PC BIOS's say NetworkBoot but it's NOT PXE, or an old PXE.
Not getting the PC to do dhcp & tftp is a good sign of this, look at /var/logs/messages

I didn't have luck doing tftp of files after the inital dhcp & tftp boot.
But Samba was easy to get working & it auto. mounts user's HOME space & does login.
These two items & Win. support were enough for me to decide to use it for LanPuppy.

LanPuppy should be able to run in 64MB & maybe 32MB or 48MB.
A diskless client has no swap space, so ram is critical, & a USB won't do!
To tftp usr_cram.fs means the client PC has enough ram to hold it (+70MB).

To tftp usr_cram.fs should be easy, but I had no luck at all doing it.
User's could be responsable for their own HOME storage with a USB drive.
But USBs or other personal storage is a security risk as user apps. can be run.

Tftp commands are simple, if you get them working, they'd be easy to integrate.
I'm not sure how dhcp is suppost to get the Squash file, dhcp ONLY gets an IP add.
Tftp usually controlled by "inet" or "xinet" copies the kernel & image to the client.
Tftp is independant of dhcp, nether one needs the other, both can work separately.

A modification of the script /sbin/init is all that's needed to change booting.
You have to gunzip the file initrd.gz to see it, as it's replaced with a link at boot.

User avatar
netjess
Posts: 29
Joined: Fri 17 Feb 2006, 14:24
Location: Oklahoma, USA
Contact:

#9 Post by netjess »

Yo Burnie,

we seem to have a com failure. I must not be clear on what I am saying.
--------
I'm not sure what you mean by: "but the client dumps it once the NBL is
done".
The only thing dumped is the IP address, & dhcpcd is needed to get a permanent one.
--------------------
Just to be clear, not trying to teach you something you know.

PXE: Preboot Execution Environment, is bulit into the NIC. Makes a special DHCP request and is directed to a tftp server and retrieves boot files that are loaded into RAM.
everything that is needed must be passed at that time, once booting starts the machine will olny be able to work with what it's got.
NBL: I mistyped. It is NBP. "Network Bootstrap Program"
http://en.wikipedia.org/wiki/Preboot_Ex ... ap_Program
once the OS takes over PXE dhcp and tftp are dumped and have to be loaded from the files you downloaded at boot.

-------------------
To tftp usr_cram.fs should be easy, but I had no luck at all doing it.
User's could be responsable for their own HOME storage with a USB drive.
But USBs or other personal storage is a security risk as user apps. can be run.
-------------------
users on puppy can pretty much do what they want anyway. if something gets corrupt just reboot. If they want a application they could just download it so no better security than USB unless you restrict downloading at the network level. Kinda defeats the purpose in most situ.

---------------
I didn't have luck doing tftp of files after the inital dhcp & tftp boot.
---------------

That is what I am getting at. You couldn't do it because DHCP was not automatically called and the tftp client was not available.
in the puppy-barebones-1.0.4 version I was working with because it get further in booting once I reach a #prompt I have to manually start DHCPCD, TFTPCD is not available, if it was and was scripted to start early and then pull the remaining required files you could get a complete boot.
TFTP [-i] host [GET | PUT] source [destination]
of course the problem here is that if this is scripted inside the initrd it would have to be a set hostname (i.e. boottftp, could be anything and admin could put a CNAME entry to it in DNS)
so cmd would be "tftp boottftp GET puppy/usr_cram.fs /usr_cram.fs"


To be continued..... I have to get to work. :(

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#10 Post by sunburnt »

The tftp tests I made were with a fully booted Puppy, so everything was there.
It wasn't a boot attempt to tftp... Just a pretest to see if I could get tftp to work.

As I stated, dhcp isn't needed to tftp files, dhcp is the server to issue IP adds.
Dhcpcd is the client that requests an IP add. from a dhcpd server.
Inet & Xinet give the tftp daemon a level of security which it doesn't have itself.
Tftp can run without either of the inet super daemons, but it's VERY insecure!
And again, dhcp & tftp don't require each other, but are used together to
provide the network boot service to client PCs.

You probably already know this... but I'm just trying to cover all the bases.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#11 Post by sunburnt »

netjess; At any rate... What version of LanPuppy did you try?

I ask because if you used the new alpha release, then I have verification.
If you got it to work, then your the first to report it, & I need more info.

Please let me know all the details of your setup, & what worked & what didn't.
I'm getting ready to release alpha-2, & if it verifies, then on to beta release.

P.S. Ask IT folks about allowing users to run their own programs, big risk!
The fact that upon reboot Puppy loads new isn't the problem... It's hacking.

User avatar
netjess
Posts: 29
Joined: Fri 17 Feb 2006, 14:24
Location: Oklahoma, USA
Contact:

#12 Post by netjess »

sunburnt,

I used what is posted here:
http://www.murga-linux.com/puppy/viewto ... 0249#60249

It was from the page: http://puppylinux.org/wikka/LanPuppy
I didn't try very hard because I din't want to use it the way you had it set up.
I want an environment that boots up clean from PXE with no bootfloppies or starting DOS to start linux, just get a DHCP address and tftp the OS and boot.
I am an IT person. I am the Network Admin where I work. I work mostly in M$ but I have administrated DNS, DHCP and Sendmail from Linux servers.
My efforts with Puppy isn't as a production business envronment. I don't think that is the goal of Puppy. In business networks it's all about control and locking it down in order to maintain that control in order to avoid down time.
To me anyway Puppy is more about liberating and enabling. Low cost educational availability, libraries, coffe house or civic kiosks. If something gets corupted. reboot and its clean. If someone wants personal storage they choose it. If a network want to enable storage for Puppy user then they can control and or scan the content of the storage, in PXE you can also asign the type of boot up a machine gets by it's MAC address. fact is no matter what if a person want to load malicious or un authorized software there are ways to do it. It is the job of the IT personel to safegard or contain the impact of those activites.
I have a working PXE environment. I boot to it all the time with DOS. I just wanted to get Puppy on it and get it to PXE at my home as well so I don't have to have a CD or HDD install. I also wanted to get it working for a coffe house in my town.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#13 Post by sunburnt »

I bought 10 used 3Com NICs from ebay for $3 each (3c905c-tx-m).
They all boot LanPuppy with no problem, so does my AMD - VIA MB (rhine).
Some Intel NICs are supposted to do PXE also, I haven't tried them though.

I boot PupServer with DOS because it's convienient, there's no boot setup,
so SysLinux, Grub, Win. boot loader, or DOS can be used to boot it.
So it will boot clean from a PXE enabled PC or a NIC, & DOS isn't required...
If you know how to setup one of the other boot managers.

There's an new alpha release of LanPuppy if your interested in trying it.
I don't have the URL at the moment as I'm at my son's PC... let me know.

Post Reply