How to set up a Puppy Linux Cybercafe

A home for all kinds of Puppy related projects
Message
Author
User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#66 Post by ecomoney »

Ok, the story so far, I have managed to get the 55mb minimal install netboot 4.12 install to netboot from the smoothwall server...the next step, figure out how to make a netbooting 4.20!

I took the initrd.gz and pup_420.sfs from the puppy 4.2 rc3 iso. The idea was to combine them to make a new "humungous initrd.gz" to put into the root/tftpboot folder of the smoothwall, replacing the initrd.gz file that is there which boots the cutdown 4.1.2.

The initrd.gz for 4 series puppys appears to contain just one file when un-gzipped (gunzip?) or opened with pupzip (i.e. clicked on), its actually compressed with a thing called cpio to squeeze a few more megs of compression.

I made a mnt/home/hinit folder and placed the initrd.gz and pup_420.sfs files from the 4.2 iso in it, and then made a new subdirectory called "/mnt/home/hinit/tmp" and changed directory to it

Code: Select all

mkdir ./tmp
cd tmp
The next step was to extract the initrd.gz file from the folder below into the current folder (i.e. from /mnt/home/hinit/initrd.gz)

Code: Select all

zcat ../initrd.gz | cpio -idv
After chugging for a bit, a familiar linux directory tree appeared in /mnt/home/hinit/tmp. The next step was for me to copy the pup_420.sfs file from the directory below (i.e. /mnt/home/hinit) into the uncompressed directory tree.

Code: Select all

cp ../pup_420.sfs ./
Then to remove the origional initrd.gz in /mnt/home/hinit

Code: Select all

rm ../initrd.gz
and to zip up the contents of the current folder (/mnt/home/hinit/tmp) into a new "humungous initrd.gz"

Code: Select all

find . | cpio -o -H newc | gzip -9 > ../initrd.gz
after much thrashing around of the hard disk and a spike in processor usage, I found a new /mnt/home/hinit/initrd.gz file, of around 98mb....so I copied it over the top of the working initrd.gz (about 55mb) on the smoothwall

Code: Select all

cd ../
scp -pvC -P 222 ./initrd.gz root@smoothwall:/home/tftpboot/initrd.gz
Marveling at my newfound ability to enter completely unintelligible code on the command line, I rebooted the laptop, which was set to "netboot" in the bios

Code: Select all

could not find ramdisk image: initrd.gz
WHY!!! the initrd.gz file was in exactly the same place as the one that worked, with exactly the same name....how come it wasnt found?

Im at a loss, and I know soon I will be called over to demonstrate my work so far. The cutdown 4.1.2 is fine, but it doesnt actually contain any applications and will do little to run a cybercafe. I need 4.2 (with PWidgets!) if Im going to keep this contract.

Can anyone shed any light?
Last edited by ecomoney on Tue 05 Jan 2010, 05:16, edited 2 times in total.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

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

#67 Post by MagicZaurus »

Hi!

Here you also can find the full version 4.1.2 initrd.gz and vmlinuz.

ftp://puppy@ftp.servage.net/humongous412/

Maybe you can buy WhoDo a beer and ask him to build the humongous initrd.gz from 4.2 RC3 for you. If he thinks your project is important for Puppy promotion he might spent a few of his PCs CPU cycles for it.

Don't be frustrated. Breaking new grounds is always not an easy thing.

What about access permission for your new initrd.gz on the SmoothWall? Readable for everyone?

Cheers!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#68 Post by ecomoney »

Hi MZ, thanks for getting back to me so quickly. Im sure WhoDo has quite enough on his plate to be spending time packaging netboot files.

. I did check the permissions while the two different initrd.gz files were still on puppy, and they had both had three ticks next to the "world" access. I tried a "ls -l >> dir.txt", transferred it back up to the laptop, then onto my internet connected computer via a pendrive (I know...not a good setup to work from) and got this

Code: Select all

total 101629
-rw-r--r-- 1 root   root           0 Mar 18 08:18 dir.txt
-rw-r--r-- 1 root   root   102013039 Mar 17 19:33 initrd.gz
-rw-r--r-- 1 root   root       13156 Apr  8  2009 pxelinux.0
drwxr-xr-x 2 nobody nobody      1024 Mar 17 22:05 pxelinux.cfg/
-rw-r--r-- 1 root   root     1627180 Apr  9  2009 vmlinuz
I dont know a lot about file permissions (I dont have to, I use puppy!) but from deciphering this and comparing it, the initrd.gz seems to have precisely the same file permissions as when it was on the puppy machine, and the same as the other files which can be read at netboot...I dont think its a permissions problem.

Speaking of permissions, I would have liked to have tried the full 4.1.2 file you posted a link too, but I get asked for a password...none of the usual seem to work. Perhaps you would pm? If I can get hold of the file I will send a link over to Pascal who is packaging a new smoothwall mod, so he can produce a full and a cutdown version of the Smoothwall Puppy Boot mod. This would be an excellent spinoff project from the whole excercise.
Last edited by ecomoney on Wed 18 Mar 2009, 05:48, edited 1 time in total.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

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

ramdisk_size

#69 Post by raffy »

Ah, I thought I saw somewhere that ownership of TFTP files in Smoothwall has to be by nobody? I guess you posted it early on - do this in terminal opened inside the folder you were using above:

Code: Select all

chown -R nobody:nobody *
(The -R is supposed to affect files inside lower-level folders like pxelinux.cfg.)

Also, in /pxelinux.cfg/default, ramdisk_size should be sufficient to hold your new initrd.gz. The arithmetic of this is to divide the bytes with 1,024 to come up with KB of memory. Or, to make it fool-proof, copy the KB numbers of initrd.gz that you see in Rox (File Manager).

Using information from the file window you just posted, the number can be anywhere from 99700 to 102000 (all such possibilities should work).

EDIT: You have funny dates there in your files: April 9, 2009???
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

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

#70 Post by MagicZaurus »

Sorry! When I copy&paste the link, the password was lost.

ftp://puppy:puppylinux@ftp.servage.net/humongous412/

I think it's a kind of public. Raffy provided me with the location to upload the files last time.

Indeed permissions seem to be ok.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#71 Post by ecomoney »

Hi Raffy, I did as you suggested with the chown command, all of the files in the folder are no owned by nobody, but I was still getting the same message from the boot prompt on the client computer.

smoothwall has the "joe" text editor, using that I opened the /home/tftpboot/tftpboot.cfg/default file and changed it to read

Code: Select all

DEFAULT Puppy
PROMPT 0
NOESCAPE 0
ALLOWOPTIONS 0
TIMEOUT 100

MENU TITLE Puppy Network Booting!

# Puppy Linux Loader
LABEL Puppy
MENU Puppy Net-Booting
KERNEL vmlinuz
APPEND initrd=initrd.gz ramdisk_size=[b]102013040[/b]

EOF
this was one number bigger than the file size reported in the directory isting above...still no joy. Then I looked at your instructions and saw the nuber you had suggested was much smaller...I think I got my bytes and my megabytes mixed up. :oops:

I edited the /home/tftpboot/pxelinux.cfg/default file again, and changed it to 102000, the larger of the range you suggested, but still no luck.

Ive found the problem with the dates, the bios date on the machine I compiled the files with was incorrect, I have corrected this now. Will this make any difference?

Im have just finished downloading the file you sent MZ, thank you for that. If the netboot then works with the file you sent me (which I assume has been tested before), I think I can summize that it must be in my packaging of the new 4.2 initrd.gz that the error has crept in, and the message about the initrd.gz file not being found is somehow erronious.

Good news is, I have finally (after about four years of trying) managed to get internet connection sharing to work. In the room where my workshop is, I dont have internet connectivity via an ethernet cable, and smoothwalls dont do wireless! I should be able to use another old laptop I have in for repair to "collect" a net connection, input it into the smoothwall, then out of the smoothwall into my test machine..perhaps via a router? I have a spare router but it has a dhcp server in it too...perhaps I can turn this off? This will finally give me something approximating the actual setup of the cybercafe.

Many thanks again for your quick responses.

P.S. I have uploaded my "failed" 4.2 humongous initrd.gz (the one giving these messages when I use it to replace the previous cutdown one which works) to my webserver here. Would it be easy for someone knowledgeable to do a "post-mortem" and see why it doesnt work?

http://ecomoney.eu/smoothwall/puppytftp/fails/initrd.gz

[/code]
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#72 Post by ecomoney »

Right, I transferred the latest initrd.gz that you sent the link to MZ to the smoothwall, and I even did a directory listing to make sure that it had transferred.

Code: Select all

total 94586
-rw-r--r-- 1 nobody nobody      314 Mar 18 08:18 dir.txt
-rw-r--r-- 1 root   root          0 Mar 18 10:45 dir2.txt
-rw-r--r-- 1 nobody nobody [b]94829431[/b] Mar 17 23:02 initrd.gz
-rw-r--r-- 1 nobody nobody    13156 Apr  8  2009 pxelinux.0
drwxr-xr-x 2 nobody nobody     1024 Mar 18 10:39 pxelinux.cfg/
-rw-r--r-- 1 nobody nobody  1627180 Apr  9  2009 vmlinuz
You can see from the filesize that I have *tried to* highlight in bold above that the correct file was transferred.....still the same error message!!!!

cannot find initrd.gz

So just as a double check, I retransferred the smaller (58mb) cutdown 4.1.2 version back to the /home/tftpboot folder, and tried it again, and it worked!!!! :evil: :?

So....

Out of the three humungous initrd.gz files I tried only the smallest one was "found"vand worked, despite them all being called the same thing and being in the same place.

This jogged my memory of something I skim read about size limits of 100mb or similar...just I cannot remember where..

Im going to need to do some more research. MZ, can you confirm that you have booted from the file you just sent e before, and from what platform? It may be that the tftp server in smoothwall has some kind of size restriction.

Many thanks for your continued help...I must be off to sleep at some time.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#73 Post by ecomoney »

Aha! have tracked down something, I looked in /var/log on the smoothwall and found a file "atftpd.log", this was 130k big text file, so I knew it must contain the results of all my long trials and tribulations. I looked inside. Remember from above, the last thing I did was to retry the smaller initrd.gz from the cutdown 4.1.2. Heres the last section.

Code: Select all

Mar 18 11:41:45 seafarers atftpd[2460.16384]: Advanced Trivial FTP server started (0.7)
Mar 18 11:41:45 seafarers atftpd[2461.16384]: pid file already exist, overwriting
Mar 18 11:41:57 seafarers atftpd[2461.16384]: SIGTERM received, stopping threads and exiting.
Mar 18 11:41:57 seafarers atftpd[2461.16384]: atftpd terminating
Mar 18 11:41:57 seafarers atftpd[2461.16384]: unlink: Permission denied
Mar 18 11:41:57 seafarers atftpd[2461.16384]: Main thread exiting
Mar 18 11:41:57 seafarers atftpd[2492.16384]: Advanced Trivial FTP server started (0.7)
Mar 18 11:41:57 seafarers atftpd[2493.16384]: pid file already exist, overwriting
Mar 18 11:44:21 seafarers atftpd[2523.16386]: Serving /pxelinux.0 to 192.168.0.248:2070
Mar 18 11:44:21 seafarers atftpd[2524.32770]: Serving /pxelinux.0 to 192.168.0.248:2071
Mar 18 11:44:21 seafarers atftpd[2525.49154]: Serving /pxelinux.cfg/01-00-08-02-15-d2-df to 192.168.0.248:57089
Mar 18 11:44:21 seafarers atftpd[2526.65538]: Serving /pxelinux.cfg/C0A800F8 to 192.168.0.248:57090
Mar 18 11:44:21 seafarers atftpd[2527.81922]: Serving /pxelinux.cfg/C0A800F to 192.168.0.248:57091
Mar 18 11:44:21 seafarers atftpd[2528.98306]: Serving /pxelinux.cfg/C0A800 to 192.168.0.248:57092
Mar 18 11:44:21 seafarers atftpd[2529.114690]: Serving /pxelinux.cfg/C0A80 to 192.168.0.248:57093
Mar 18 11:44:21 seafarers atftpd[2530.131074]: Serving /pxelinux.cfg/C0A8 to 192.168.0.248:57094
Mar 18 11:44:21 seafarers atftpd[2531.147458]: Serving /pxelinux.cfg/C0A to 192.168.0.248:57095
Mar 18 11:44:21 seafarers atftpd[2532.163842]: Serving /pxelinux.cfg/C0 to 192.168.0.248:57096
Mar 18 11:44:21 seafarers atftpd[2533.180226]: Serving /pxelinux.cfg/C to 192.168.0.248:57097
Mar 18 11:44:21 seafarers atftpd[2534.196610]: Serving /pxelinux.cfg/default to 192.168.0.248:57098
Mar 18 11:44:21 seafarers atftpd[2535.212994]: Serving /vmlinuz to 192.168.0.248:57099
Mar 18 11:44:22 seafarers atftpd[2536.229378]: Serving /initrd.gz to 192.168.0.248:57100
Mar 18 11:44:22 seafarers atftpd[2536.229378]: Requested file to big, increase BLKSIZE
Mar 18 11:44:26 seafarers atftpd[2537.245762]: Serving /vmlinuz to 192.168.0.248:57101
Mar 18 11:44:27 seafarers atftpd[2538.262146]: Serving /initrd.gz to 192.168.0.248:57102
Mar 18 11:44:27 seafarers atftpd[2538.262146]: Requested file to big, increase BLKSIZE
Mar 18 11:44:28 seafarers atftpd[2539.278530]: Serving /vmlinuz to 192.168.0.248:57103
Mar 18 11:44:29 seafarers atftpd[2540.294914]: Serving /initrd.gz to 192.168.0.248:57104
Mar 18 11:44:29 seafarers atftpd[2540.294914]: Requested file to big, increase BLKSIZE
Here is the difference between it working with the smaller file, and not working with the larger. Apparently its down to "BLKSIZE".

Off for some more research to find out how to increase it...whatever it is :roll:
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

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

#74 Post by Aitch »

Rob, continuing good luck with your project

Your "I tried to highlight comment"

I don't think you can embolden inside a code box

However it DOES highlight it


also RE: wifi from the smoothwall;

It looks possible to add a wrt54 in reverse mode [at least I think they have a wifi version] - see Dennis's comment

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

However, I wouldn't be surprised if someone like tempestuous didn't know a way to add some code to the smoothwall to add wifi to it, maybe....

Aitch :)

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

#75 Post by MagicZaurus »

pascal what do you know about blksize in relation to this mod, it is limiting transfer's over pxe to a max size of 90Mb's!

anything that can be done here?
i have emailed the author of atftpd but am still awaiting reply

i need to increase this to serve a live image of winxp live which i would like to be 200 - 300mb ideally. my current image of 90mb is really to small i need to make the ramdrive bigger !
This is from the Smoothwall forum. So there is a limit of 90MB for the initrd.gz on Smoothwall. So this might be the root cause of your problem.

I used Puppy as my TFTP server and was able to boot that initrd.gz which you downloaded. So if that limit on Smoothwall cannot be changed, then you need to make a smaller Puppy initrd.gz by leaving some unnecessary packages out.

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

#76 Post by MagicZaurus »

I just read the whole thread at Smoothwall forum and I see that you also posted over there and got an answer that the TFTP in Smoothwall is limited to 91MB for initrd.gz.

In my opinion the only solution is to remove some packages from Puppy if you insist on using Smoothwall.

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

#77 Post by MagicZaurus »

Hi ecomoney!

There is hope for your Smoothwall. I found out that Smoothwall actually has the dnsmasq package installed. They only use it for DNS, but if it is a complete package then dnsmasq also can do DHCP and TFTP. The TFTP server of dnsmasq doesn't have the 90MB limit.

Could you check if you have dnsmasq on the Smoothwall?

Code: Select all

which dnsmasq
or

Code: Select all

locate dnsmasq
If yes, then please check if there is a file /etc/dnsmasq.conf.

I don't have a spare PC to install Smoothwall and try it myself, so I can only give you my ideas.

Configuration will be then manual in the dnsmasq.conf and not from the web interface. I need to look up the important parameters. But better than nothing and once it is setup, I doubt anybody need to change it.

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

#78 Post by MagicZaurus »

Ok. Here it is. If /etc/dnsmasq.conf exists then add the following at the end of the file. If it doesn't exist then create a new file with the content.

Code: Select all

enable-tftp
tftp-root=/home/tftpboot
The tftp-root must specify the folder where your vmlinuz and initrd.gz are. If I remember correct it is /home/tftpboot in your case.

Remove the Smoothwall mod with the tftp package to avoid problems that both tftp servers are running at the same time. Then shutdown your Smoothwall, pray hard and long and then restart the Smoothwall and try.

Good luck! Hope to hear good news from you.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#79 Post by ecomoney »

MZ you are a Star! PUPPY LINUX RC3 JUST BOOTED!!!!!!!!!

:shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

It took just 1 minute and 8 seconds to load the entire thing!!!

So the Smoothwall mod is actually totally unnecessary for this? and it actually imposes a restriction that would not be there if the native tftp server was being used? This has totally blown me away. This is actually far far simpler. I think I can (probably) even code up a smoothwall mod myself now to boot puppy. This is some discovery.....Im thinking of all the cybercafe's Ive seen out there struggling with viruses.

Im gonna post this and have a moment to take it all in.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

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

congrats

#80 Post by raffy »

Congrats (again). :)

So dnsmasq works well for net-booting Puppy, thanks to MZ.

And, Robert, the RC3 that you booted must be the humongous initrd.gz that you yourself built? The procedure that you indicated will be a good remastering extension.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

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

#81 Post by Aitch »

Woohoo

Well done Rob, MZ & others

Online beers all round :wink:

Aitch :)

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

#82 Post by MagicZaurus »

Great!

That's a really good news to go to sleep with a peaceful mind. It's already past midnight here.

TFTP is slower compared to booting from CD or USB. The reason is that the protocol is very simple and a bit slow. But it works and is still faster than booting Vista from the HD.

You can make it faster by removing unnecessary applications from the initrd.gz.

Good luck for your demo!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#83 Post by ecomoney »

We need to ask John Murga to install this:-

[url=http://www.phpbbhacks.com/download/6314]PHPBB Virtual Beer Mod[url]

Ive had time to compose myself a little now. I really dont know how to thank you MagicZaurus. If I was a man of any means whatsoever I would be writing you a big fat cheque right now.

Hopefully one day I will be...Im planning on offering a custom smoothwall box as a slot in appliance from my companies website, but weve still go a long way to go with the puppy customization before then. Im sure in these bleak economic times it will be very popular cheap hassle-free plug in replacement for all those expensive and problematic Windows cybercafe's out there.

@Raffy - Yes it was the repackaged 4.2 RC3 that I made earlier that I booted, so that long list of commands is the definitive way of creating a netbootable puppy. It would be nice to have a script to automate this process i.e.

Code: Select all

makenetboot ./initrd.gz ./pup_420.sfs
This would mean me finding out about command line variables in bash scripting, and my poor brain needs a break for a bit. I may ask PizzasGood as he did a few good scripts to edit initrd.gz's and pup_xxx.2fs's a while back that I included in Ecopup. I can see Im going to have to do quite a lot of customizations of the pup_420.sfs and will need some kind of automated way of packaging them up before I send them over to to the 2 smoothwalls at the two cybercafe sites.

Anyway, It seems that on the next visit I make to the cybercafe, I will be able just stroll in with a ten year old server under my arm, plug in a few cables, make a few bios settings and delouse the entire place 8) :lol:

There is only one last job for me to do...break the news to Pascal hes made a smoothwall mod for something smoothwall does already out of the box :roll:

Many thanks to everyone for pushing the barriers and getting the project this far. I am forever in your debt.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

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

#84 Post by MagicZaurus »

Sorry ecomoney, I already posted in the Smoothwall forum just now. Hope that's not a problem.

I agree that there is still a lot of things to be done to get this a nice and smooth product. But your are on the right track.

Making a script to automate the creation of the initrd.gz shouldn't be a big problem.

Keep us updated how it goes with your demo at the cybercafes.

Ciao

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#85 Post by ecomoney »

Ive just read it, very diplomatically put MZ, Im sure I could not have done a better job...especially after the two days of banging my head against the wall. As you discovered the fix the duty should rightfully be all yours.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Post Reply