Well, I've learned a few things.
Linked is a TKLPatch to be applied to Raspbian (based on wheezy) to make a Raspberry Pi as much like Turnkey Linux 12.0 as I could pull off. I'll continue to work on it as feedback allows.
Rationale: Eben Upton created the $35 Raspberry Pi to better prepare students for post-secondary work in computer science and hardware and software engineering. Raspian (or Raspbian, depending on where you look) is a remix of wheezy for the Raspi's architecture that includes essential tools to get kids up and running quickly as effective programming. By all accounts, it is very successful. In my school, 2/5 of the student population are now actively engaged in programming (compared to one last year). Regardless of its purpose, Raspberry Pi's specs make it perfect for some server appliances. No one does server appliances more purposefully and thoroughly than Turnkey Linux. My original intention was to make patches to create appliances directly. That's when I started asking What Would TKL Devs Do? So I decided to recreate Core as best I could, and then create appliances from that foundation.
What the patch assumes:
- Raspi is running Raspian from a freshly created .img.
- Raspi-config, otherwise, has been used to set locale, set TZdata, set keyboard-configuration.
- Root password has been created.
- Raspi has wired internet connectivity
- SSH has been enabled.
- All other users are logged off; root is logged in via SSH.
- TKLPatch is compiled on Raspian.
- I think that's it...
What the patch does:
- Sets hostname to 'core'.
- Purges packages that were obviously not helpful on a core appliance. I was conservative here. I could have just used the list linked here [raspbian server edition project] -- and probably made the image much smaller. Primarily, I'm too ignorant (but willing to learn) to purge effectively.
- Install function, followed by installs directly informed by Core 12.0 manifest - so directly informed, in fact, that I've probably got stuff in there that isn't serving any use on a Raspi (eject, lvm, for examples). Exceptions to the install list v the Core 12.0 manifest include all webmin packages.
- Webmin in Overlay: This patch is big, and I've been corrected for such behavior before. It's nevertheless plump with webmin. I took webmin wholesale out of a running instance of Core 12.0 running in a VM. Informed by the manifest, I took all the modules and the theme included in Core. Are there too many modules? Probably.
- Also in Overlay: Confconsole's services.txt. Standard practice for me.
- Installed via wget (could do better with a variable and a function, I realize): TurnKey Linux's python libraries and other original code.
- I can't remember how confconsole is handled - it'll be obvious to anyone who looks at the patch. Sorry, if I stop to look this post will never get finished.
- Handled via overlay: the actual inithooks that seemed relevant to raspi: in /usr/lib/inithooks/bin and firstboot.d.
- Shellinabox is installed from repo; the port is changed in conf with sed.
Problems I know about and don't know how to correct:
- Root cannot login via shellinabox. This makes me a sad panda; I've looked through running Core VM to see if I could find out why. Nothing was obvious to me. I checked permissions, groups, etc.
- 3 or 4 python modules/scripts are in /usr/bin that rightfully belong elsewhere. They have a place that's clearly defined in the documentation. If I remember correctly, they make confconsole go. I tried many things to make everything work with these files where they belong, but I didn't try the right thing. I'm ignorant about so much in fact, that I can't narrow it down to just Python ignorance.
Problem I'm anticipating:
- Webmin username/password sync with linux. I'm not sure I got this right.
I stuck this up on github at https://github.com/ghoulmann/Raspliance-Core. Raspliance Core? Really? For now. I mention this because...It's a 12MB tarball and won't fit here. If there's a better way to handle webmin (or anything here, for that matter) let me know. I want to keep this rolling.