Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: CentralWare on February 15, 2022, 02:54:14 PM

Title: Servers for piCore?
Post by: CentralWare on February 15, 2022, 02:54:14 PM
With the advent of Pi4, using a RasPi as a server doesn't sound unreasonable to me, but from the looks of it, most of the dependencies for NFSd (portmap, rfc, etc) are unavailable and God knows somewhere in the archives there will be an x86/64 list of sources which would save hours of hunting, compiling (missing dep error), rinse - lather - repeat.  If anyone has access to said list(s) I don't mind doing the leg-work.
NOTE: I have not hunted in pre-11.x armvX versions to see if one or more of these already exist.

Extensions requested (in this area):
NFS (nfs_utils)
AoE (aoe_tools, vblade) -- I think I still have the dependency list on this set
SMB (Samba 4.x is listed, confirmation to its functionality requested for those who've used it.)
FTP (I'm going to compile busybox's FTPd for now, but it's far from being a "complete" server - suggestions requested)
SMTP/POP3/IMAP
Apache
MySQL (MariaDB)
PHPSubversion (SVN), CVS, etc.

Thanks everyone!
Title: Re: Servers for piCore?
Post by: Rich on February 15, 2022, 10:38:35 PM
Hi centralware
nfs-utils is available:
http://tinycorelinux.net/13.x/aarch64/tcz/nfs-utils.tcz.info

A search for  "samba mysql maria nfs aoe vblade apache"  turned up this in the source directories:
Code: [Select]
http://tinycorelinux.net/10.x/x86_64/tcz/src
drwxrwxr-x 2 root staff 4096 Jan 24  2019 apache

http://tinycorelinux.net/10.x/x86/tcz/src
drwxrwxr-x 2 root staff 4096 Feb 10  2019 nfs-utils

http://tinycorelinux.net/11.x/x86_64/tcz/src
drwxrwxr-x 2 root staff 4096 Feb 16  2020 mariadb

http://tinycorelinux.net/12.x/aarch64/tcz/src
drwxrwxr-x 2 root staff 4096 Jan  3  2021 nfs-utils
drwxrwxr-x 2 root staff 4096 Sep  7  2020 samba4

http://tinycorelinux.net/12.x/armv7/tcz/src
drwxrwxr-x 2 root staff 4096 Sep  7  2020 samba4

http://tinycorelinux.net/12.x/x86_64/tcz/src
drwxrwxr-x 2 root staff 4096 Jan 31  2021 mariadb
drwxrwxr-x 2 root staff 4096 Aug 21 10:24 unionfs-fuse

http://tinycorelinux.net/12.x/x86/tcz/src
drwxrwxr-x 2 root staff 4096 Mar 20  2021 nfs-utils
drwxrwxr-x 2 root staff 4096 Aug 27 13:36 unionfs-fuse

http://tinycorelinux.net/13.x/aarch64/tcz/src
drwxrwxr-x 2 root staff 4096 Sep  7  2020 samba4

http://tinycorelinux.net/13.x/armv7l/tcz/src
drwxrwxr-x 2 root staff 4096 Sep  7  2020 samba4

http://tinycorelinux.net/13.x/armv7/tcz/src
drwxrwxr-x 2 root staff 4096 Sep  7  2020 samba4

http://tinycorelinux.net/4.x/x86/tcz/src
drwxrwsr-x 2 root staff    4096 Dec 17  2012 apache2
drwxrwsr-x 2 root staff    4096 Dec 11  2015 apache2-mod-php5
drwxrwsr-x 2 root staff    4096 Dec 17  2012 apache-tomcat
drwxrwsr-x 2 root staff    4096 Dec 17  2012 libnfs
drwxrwsr-x 2 root staff    4096 Dec 17  2012 libnfsidmap
drwxrwsr-x 2 root staff    4096 Dec 17  2012 mysql
drwxrwsr-x 2 root staff    4096 Dec 17  2012 mysql-client
drwxrwsr-x 2 root staff    4096 Dec 17  2012 samba3
drwxrwsr-x 2 root staff    4096 Dec 17  2012 vblade

http://tinycorelinux.net/5.x/armv6/tcz/src
drwxrwxr-x 2 root staff      4096 Mar 21  2014 apache2.4
drwxrwxr-x 2 root staff      4096 Jan 30  2014 libnfsidmap
drwxrwxr-x 2 root staff      4096 Jul  2  2014 mariadb
-rw-rw-r-- 1 root staff   2747577 Nov  2  2013 nfs-utils-1.2.8.tar.bz2
-rw-rw-r-- 1 root staff       126 Nov  2  2013 nfs-utils.config
drwxrwxr-x 2 root staff      4096 Feb 23  2014 samba

http://tinycorelinux.net/5.x/x86_64/tcz/src
drwxrwsr-x 2 root staff    4096 Dec 18  2013 nfs-utils
drwxrwsr-x 2 root staff    4096 Dec 31  2013 samba

http://tinycorelinux.net/5.x/x86/tcz/src
drwxrwxr-x 2 root staff     4096 Mar 20  2014 apache2.4
drwxrwxr-x 2 root staff     4096 Jun 30  2014 mariadb
-rw-rw-r-- 1 root staff 45226492 Oct 17  2013 mariadb-5.5.33a.tar.gz
drwxrwsr-x 2 root staff     4096 Jan 18  2014 nfs-utils

http://tinycorelinux.net/6.x/armv6/tcz/src
drwxrwxr-x 2 root staff     4096 May 29  2015 apache2.4
drwxrwxr-x 2 root staff     4096 May 30  2015 libnfsidmap
drwxrwxr-x 2 root staff     4096 May 26  2015 mariadb
drwxrwxr-x 2 root staff     4096 Apr 17  2015 pymysql
drwxrwxr-x 2 root staff     4096 Jan 13  2015 samba4

http://tinycorelinux.net/6.x/armv7/tcz/src
drwxrwxr-x 2 root staff     4096 May 29  2015 apache2.4
drwxrwxr-x 2 root staff     4096 May 30  2015 libnfsidmap
drwxrwxr-x 2 root staff     4096 May 26  2015 mariadb
drwxrwxr-x 2 root staff     4096 Apr 17  2015 pymysql

http://tinycorelinux.net/6.x/x86/tcz/src
drwxrwxr-x 2 root staff    4096 Oct  7  2015 aoetools
drwxrwxr-x 2 root staff    4096 Oct  5  2015 apache2.4
drwxrwxr-x 2 root staff    4096 Apr  6  2015 mariadb
drwxrwxr-x 2 root staff    4096 Oct  7  2015 vblade

http://tinycorelinux.net/7.x/armv6/tcz/src
drwxrwxr-x   2 root staff  4096 Oct  7  2015 aoetools
drwxrwxr-x   2 root staff  4096 Jan  4  2016 apache2.4
drwxrwxr-x   2 root staff  4096 Jan 12  2016 mariadb-client
drwxrwxr-x   2 root staff  4096 Oct  7  2015 vblade

http://tinycorelinux.net/7.x/armv7/tcz/src
drwxrwxr-x 2 root staff     4096 Oct  7  2015 aoetools
drwxrwxr-x 2 root staff     4096 Jan  4  2016 apache2.4
drwxrwxr-x 2 root staff     4096 May 30  2015 libnfsidmap
drwxrwxr-x 2 root staff     4096 May 26  2015 mariadb
drwxrwxr-x 2 root staff     4096 Jan 12  2016 mariadb-client
drwxrwxr-x 2 root staff     4096 Apr 17  2015 pymysql
drwxrwxr-x 2 root staff     4096 Oct  7  2015 vblade

http://tinycorelinux.net/7.x/x86_64/tcz/src
drwxrwsr-x 2 root staff    4096 Jan 29  2017 apache
drwxrwsr-x 2 root staff    4096 Dec 29  2015 libnfs
drwxrwsr-x 2 root staff    4096 May  3  2016 mariadb
drwxrwsr-x 2 root staff    4096 Apr 11  2016 nfs-utils

http://tinycorelinux.net/7.x/x86/tcz/src
drwxrwxr-x 2 root staff 4096 Jul 24  2016 apache2.4
drwxrwxr-x 2 root staff 4096 Jul 24  2016 apache2.4-mod-php7.0
drwxrwsr-x 2 root staff 4096 Jul 27  2016 samba3

http://tinycorelinux.net/8.x/armv6/tcz/src
drwxrwxr-x 2 root staff     4096 Jul  8  2016 apache2.4
drwxrwxr-x 2 root staff     4096 Jun 29  2016 apache2.4-mod-php5
drwxrwxr-x 2 root staff     4096 Jun 29  2016 apache2.4-mod-php7
drwxrwxr-x 2 root staff     4096 Jun  2  2016 mariadb
drwxrwxr-x 2 root staff     4096 May 22  2016 mariadb-client
drwxrwxr-x 2 root staff     4096 Dec 25  2016 mysql-connector-python
drwxrwxr-x 2 root staff     4096 Dec 26  2016 pymysql
drwxrwxr-x 2 root staff     4096 Jun 12  2016 samba4

http://tinycorelinux.net/8.x/armv7/tcz/src
drwxrwxr-x 2 root staff     4096 Jul  8  2016 apache2.4
drwxrwxr-x 2 root staff     4096 Jun 29  2016 apache2.4-mod-php5
drwxrwxr-x 2 root staff     4096 Jun 29  2016 apache2.4-mod-php7
drwxrwxr-x 2 root staff     4096 Jun  2  2016 mariadb
drwxrwxr-x 2 root staff     4096 May 22  2016 mariadb-client
drwxrwxr-x 2 root staff     4096 Dec 25  2016 mysql-connector-python
drwxrwxr-x 2 root staff     4096 Dec 26  2016 pymysql
drwxrwxr-x 2 root staff     4096 Jun 12  2016 samba4

http://tinycorelinux.net/8.x/x86_64/tcz/src
drwxrwxr-x 2 root staff 4096 Jul  3  2017 mariadb
drwxrwxr-x 2 root staff 4096 May 22  2017 samba

http://tinycorelinux.net/9.x/armv6/tcz/src
drwxrwxr-x 2 root staff 4096 Jun 24  2017 apache2.4

http://tinycorelinux.net/9.x/armv7/tcz/src
drwxrwxr-x 2 root staff 4096 Jun 24  2017 apache2.4
drwxrwxr-x 2 root staff 4096 Feb 15  2018 nfs-utils
Title: Re: Servers for piCore?
Post by: CentralWare on February 15, 2022, 11:55:27 PM
@Rich: Thanks, Rich.  I built a repo browser for version/arch/tcz directories but didn't think to add support for sources! :)

Take care, stay safe & stay healthy!
Title: Re: Servers for piCore?
Post by: curaga on February 16, 2022, 03:32:54 AM
bftpd is my preferred ftp server. Small and easy to configure.

Using rpis as servers usually runs into trouble with the unreliable microsd (and on older versions, unreliable USB IIRC).
Title: Re: Servers for piCore?
Post by: CentralWare on February 16, 2022, 04:56:23 AM
@Curaga: The plan on our end is 1) Boot from uSD (init=rootfs.gz,modules.gz and servers.gz) 2) servers.gz would have a custom bootlocal.sh which basically tends to launching the services and 3) in theory, mmcblk0p1 is then unloaded once complete as it's no longer necessary since technically, no extensions were loaded from the tcedir.
Speaking of which, is it safe to assume the above scenario is "safe" for our bootlocal.sh to overwrite the one that already exists in rootfs.gz?  (The tc-config hasn't even launched at this point, so I can't foresee a problem, but you guys know the system a bit better than I do! :) )
Title: Re: Servers for piCore?
Post by: Rich on February 16, 2022, 09:58:46 AM
Hi centralware
... is it safe to assume the above scenario is "safe" for our bootlocal.sh to overwrite the one that already exists in rootfs.gz? ...
Both  bootsync.sh  and  bootlocal.sh  are there for you to customize. When restored, they overwrite the  rootfs.gz
version anyway.

The sequence goes like this:
sbin/init->etc/inittab->etc/init.d/rcS->etc/init.d/tc-config(load extensions, restore)->opt/bootsync.sh->opt/bootlocal.sh
Title: Re: Servers for piCore?
Post by: curaga on February 16, 2022, 11:02:29 AM
Overwriting files in an initrd is totally fine. Unmounting the SD card during runtime does seem the most reliable option.
Title: Re: Servers for piCore?
Post by: Greg Erskine on February 16, 2022, 02:26:31 PM
I have been using Raspberry Pi's with a USB drive for music servers since the original RPi1B (256mb) without issues.

I only buy SanDisk Sd cards, so corruption has not been a problem for me.

Most Raspberry Pi's can boot from a USB device, so SD cards are not really necessary.

Proper power supplies for the RPi and USB drives is the main thing to look out for.

YMMV


Title: Re: Servers for piCore?
Post by: CentralWare on February 16, 2022, 11:58:47 PM
Hello everyone!

Power supply: 5v 70A driving (up to/relay controlled) two dozen units, mostly Pi2 and Pi3 with a few 4s in the mix; with a spare 70A ready to go should the first ever take a dump.  They're currently header-fed which doesn't do the job with USB devices being driven from the Pi, but the headers are temporary as a proof-of-concept run for the project.

bootsync/bootlocal would require updating core.gz (or rootfs) which would work out fine for some, but the goal here was to use pristine kernel/init files and just append our own GZ to the pxe/extlinux configuration to make it plug-n-play without having to keep an inventory of all of the custom cores, or the need for mydata, which in PXE isn't a preference (nor an option in most cases.)  The trial running pxeboot.gz (our init which overwrites bootlocal, adds nfs-utils, numerous drivers and a few other necessities) seems to be working flawlessly, but I still felt it best to inquire.

Scenario: A fresh, untouched machine boots via PXE, isn't in the system yet with its own storage, so this appended core boots with the updated bootlocal/sync files allowing it to create its NFS/AoE storage remotely, have the default profile (setup, desktop, server, development, etc.) created which in turn, adds the PXE configuration file onto the TFTP server, calls into DNS/DHCP where a hostname and IP are assigned so the machine can be looked up without having to know much about it and a few minutes later, the box is ready to be SSH'ed into for profiling and use.  We still have to perfect VNC/RPC for the different platforms, drivers, etc. so we're not done just yet.

SD Cards: Over the years, I've bought mostly MicroCenter SD cards for in-house and Samsung for client use for different applications ranging from CCTV cameras to the Pi, and found one of the biggest flaws isn't just manufacturing/dependability, but it runs the chance the pads on the SD (or the pins of the SD socket) have a potential of not making a great connection over time, especially in tablets (where the card isn't sealed well), cameras, my truck's stereo! and of course, the Pi.  We've overcome this with a two stage fix which has done wonders: First, clean the contacts with Iso/rubbing alcohol to remove oxidation/debris, especially for those cards that get frequently man-handled...  then a thin coating of EKG/Electrode conductive gel - insert the cards in/out a few times in the socket, wipe off any excess on the card, and it seems to make a clean, conductive seal between the pins and the card's pads.  For devices which have already begun to oxidize on the socket pins, an electronics contact cleaner (burnishing tool) tends to revive them well.

Thanks to everyone for their input!  Take care and stay safe!

Title: Re: Servers for piCore?
Post by: Rich on February 17, 2022, 12:30:59 AM
Hi centralware
... allowing it to create its NFS/AoE storage remotely, ...
I don't know what they do or if they'll be of any use to you, but if you look through  tc-config , it contains
nfsmount  and  aoe  boot codes.
Title: Re: Servers for piCore?
Post by: CNK on February 17, 2022, 02:49:43 AM
For an SMTP/POP3/IMAP x86/x86_64 example, as described in the thread (http://forum.tinycorelinux.net/index.php/topic,25147.msg160356.html) where I asked about it at the time, the only extension that ever seems to have offered any of these was GNU mailutils (https://mailutils.org/). That extension was built for TC5 on x86 and kept until TC10. build notes here (http://tinycorelinux.net/5.x/x86/tcz/src/mailutils/compile_mailutils).

I created my own mailutils extension, but have been lazy and never submitted it (also I never tested it much because I haven't got around to setting up that aspect of my home server). Also I built version 3.13, and 3.14 is available now.

The dependencies had changed a little since the TC 5 extension, I ended up with:
Code: [Select]
readline.tcz
libltdl.tcz
gnutls35.tcz
tcp_wrappers.tcz
libunistring.tcz

Build dependencies:
Code: [Select]
readline-dev libunistring-dev gnutls35-dev tcp_wrappers-dev libltdl libtool-dev compiletc squashfs-tools

With: "./configure --prefix=/usr/local --disable-static", these programs are built:
Code: [Select]
Servers: pop3d imap4d comsat mda lmtpd
Clients: putmail frm mail sieve messages readmsg dotlock movemail mimeview decodemail mh

For FTP I'm currently running GNU inetutils ftpd in TC13 x86_64 (inetutils-servers.tcz) and it works well for my usage. It doesn't seem to be available on ARM, but here are juanito's compiling notes (http://tinycorelinux.net/9.x/x86_64/tcz/src/inetutils/compile_inetutils) for TC9 Pure64. The only dependency is readline7.tcz. tftpd is also in it, and telnetd etc., as well as the inetd super server which runs them.

@centralware: Thanks for the Micro SD contacts tip by the way.
Title: Re: Servers for piCore?
Post by: Rich on February 17, 2022, 09:34:23 AM
Hi centralware
The most recent  inetutils  build scripts for ARMv7 can be found here:
http://tinycorelinux.net/8.x/armv7/tcz/src/inetutils/
http://tinycorelinux.net/8.x/armv7/tcz/src/inetutils-servers/

Title: Re: Servers for piCore?
Post by: CentralWare on February 18, 2022, 11:18:23 PM
I don't know what they do or if they'll be of any use to you, but if you look through  tc-config , it contains nfsmount  and  aoe  boot codes.
@Rich: Probably not, as the boot codes are intended as client-side; but yes, I'm pretty familiar with the inner-workings of tc-config.  I appreciate the bump in that direction, though!
Quote
The most recent  inetutils  build scripts for ARMv7 can be found here:
@Rich: I think you just made my point from another post :)  The most recent version of said extension can be found somewhere around 5 releases ago. I'll take a peek; thanks!

@Admins: Suggesting a repo update.  When submitting a project into the repository, recommending a new file extension_name.tcz.build.xsh be added to assist in the compiling/recompiling process.  I'll submit a form example when time permits, but basically it's a 3-Step script; first, download all source files from at-that-moment valid URLs, ensure build and app dependencies are loaded, secondly, do the actual config/compilation and finally, packing up the extension/tcz.  At very-very least, documentation or notes regarding STEPS #1-2.  I'd imagine I'm not the only one here who hates re-inventing the wheel and/or saving precious hours!

@Everyone: I appreciate the feedback; I'll post scripting and extension submissions for those which are successful and let everyone here decide if they're desirable in the repo.  (Including mailutils.  If memory serves, busybox even has smtp (sendmail) and pop support; but I don't recall IMAP being among those services.  Thanks for the info!)
Title: Re: Servers for piCore?
Post by: Rich on February 19, 2022, 12:23:32 AM
Hi centralware
The  inetutils  build scripts I linked to do everything you mentioned except fetch the source package.
I created my own version of build scripts. You can find some examples of how I do it here:
http://tinycorelinux.net/12.x/x86/tcz/src/Resizer/
http://tinycorelinux.net/10.x/x86/tcz/src/AutoCursor/
http://tinycorelinux.net/10.x/x86/tcz/src/PicFormat/
http://tinycorelinux.net/11.x/x86/tcz/src/lshw/
http://tinycorelinux.net/10.x/x86/tcz/src/exfat/
http://tinycorelinux.net/10.x/x86/tcz/src/gpicview/

The first 3 are programs I wrote. The tarballs contain source files and build scripts.
The last 3 are packages I built. Those links contain separate build scripts and source tarballs.
I've pretty much managed to automate everything except updating the change log in the  .info  file.
Title: Re: Servers for piCore?
Post by: CentralWare on February 19, 2022, 08:16:03 AM
@Rich: Thank you for the links; I'll look into them once we're able to power back up (Winter storm is causing havoc on the electricity and the UPS devices are being tripped at least once per minute, thus since I'm here I might as well power everything down - it's going to happen and when it does... there's going be be a ripped power line that takes at least ten minutes longer than the UPS batteries are good for!! :)
Title: Re: Servers for piCore?
Post by: CentralWare on February 21, 2022, 08:52:07 AM
@Rich: Good morning!

I just finished compiling mailutils for RasPi (mailutils.tcz, mailutils-doc.tcz and mailutils-src.tcz where -src contains the raw source code and build script) however it led me to a couple questions... Thanks!

T.J.
Title: Re: Servers for piCore?
Post by: Paul_123 on February 21, 2022, 09:02:20 AM
For clarity
armv6 (All of the single core rpi boards)
armv7 (All of the quad core processors that are not RPI4)
armv7l (RPI4)

armv6, armv7, and armv7l are distinctly different repos.   Typically extensions are compiled for armv6 and then the same copy of the extension is put into these 3 repos. (except for the kernel modules)   We do not use symlinks on these files (Although we could)
Title: Re: Servers for piCore?
Post by: CentralWare on February 22, 2022, 03:14:40 AM
@Paul: Thank you for the update.  I'll have to go back and re-enable 7L in our repo/archives.
I just checked in with a RasPi4 and see something a bit odd; filesystems-KERNEL is installed..  but both v7 and v7L are in tce/options.  Any guess how that could have happened?
Code: [Select]
$ uname -r
5.4.51-piCore-v7l
The inquiry about files being linked between v6~v7L; the repo consists ~95% extensions, ~5% modules...  considering the sheer file size of armX/tcz and then multiply it by each platform...  I'm thinking symlinks is the way to go on our end considering our mirror of TinyCore and then our own extensions/modules being added on top of that... we have a 512GB flash drive we use to back up just the TCL Repo and pretty soon it won't be big enough to do so. :)
Title: Re: Servers for piCore?
Post by: Rich on February 22, 2022, 08:56:38 AM
Hi centralware
... but both v7 and v7L are in tce/options.  Any guess how that could have happened? ...
I can't give an exact answer, but it might have something to do with this:

The TC12 ARMv7 repo contains v7, v7l (and v7l+) modules:
http://tinycorelinux.net/12.x/armv7/tcz/

And the TC12 ARMv7l repo contains no modules:
http://tinycorelinux.net/12.x/armv7l/tcz/
Title: Re: Servers for piCore?
Post by: Paul_123 on February 22, 2022, 12:46:02 PM
piCore13 is when the armv7l became active.
Title: Re: Servers for piCore?
Post by: CentralWare on February 24, 2022, 05:00:12 AM
Thank you, gentlemen!  Notes on my end have been updated.
I'm about half way down the list of extensions to be built and/or researched...
Code: [Select]
mailutils                     nfs-utils                       busybox-net                    samba
php                            sqlite                           apache                            mariaDB
xrdp                            vnc                              nbd-server                      iscsi
FCoE                           s/ftpd                          nvme-of                          aoe/vblade
afp (apple)                  ncp (novell)                 gfs (cluster)                     FUSE
WebDAV                     subversion                  Lustre                              DRBD
VMFS                          dropbear                    dnsmasq
...and I ran across a slight issue with nbd.  (This isn't the first time I've experienced this, just the first time I've reached out to anyone as just like today, I just bypassed the problem with manpage compilation and moved on.)  When using autoconf/make (which I'm far from expert experience) there's a problem building the manpages (docbook2man not found) and it errors out.
Code: [Select]
make -C man -f mans.mk nbd-server.1.sh.in nbd-server.5.sh.in nbd-client.8.sh.in nbd-trdump.1.sh.in nbdtab.5.sh.in Any recommendations?
Title: Re: Servers for piCore?
Post by: Paul_123 on February 24, 2022, 08:40:34 AM
I normally disable building documentation.   But do you have the docbook extensions loaded?
Title: Re: Servers for piCore?
Post by: CentralWare on February 25, 2022, 04:19:33 AM
@Paul: Yes, there are two extensions "docbook" related available on 12.x/ARM (docbook_xml_dtd and docbook_xsl.tcz) and the app/link docbook2man does not exist within either from the looks of it - I stopped digging at that point.  --disable-manpages didn't work for me on the first run (still came back with a missing file issue when automake/install launched) so I just had my build script fake the files and alter the Makefiles as needed to get the mail part of the job done. :)  Not the most pristine method...  but sometimes you just have to grab a hammer...