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:

  1. Raspi is running Raspian from a freshly created .img.
  2. Raspi-config, otherwise, has been used to set locale, set TZdata, set keyboard-configuration.
  3. Root password has been created.
  4. Raspi has wired internet connectivity
  5. SSH has been enabled.
  6. All other users are logged off; root is logged in via SSH.
  7. TKLPatch is compiled on Raspian.
  8. I think that's it...

What the patch does:

  1. Sets hostname to 'core'.
  2. 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.
  3. 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.
  4. 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.
  5. Also in Overlay: Confconsole's services.txt. Standard practice for me.
  6. Installed via wget (could do better with a variable and a function, I realize): TurnKey Linux's python libraries and other original code.
  7. 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.
  8. Handled via overlay: the actual inithooks that seemed relevant to raspi: in /usr/lib/inithooks/bin and firstboot.d.
  9. Shellinabox is installed from repo; the port is changed in conf with sed.

Problems I know about and don't know how to correct:

  1. 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.
  2. 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:

  1. 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.

 

Forum: 
Drew Ruggles's picture

Nice work, Rik! (...and "thanks" for doing the work and sharing. I look forward to getting a Raspberry Pi and checking it out)

Eric (tssgery)'s picture

Perfect timing, I have two Pi's that should show up on my doorstep tomorrow!

Jeremy Davis's picture

Nice work mate! I haven't got one, but this makes it all the more appealing! Perhaps I better go order one now...

The only thing that I would suggest would be that rather than host the tarred patch on github, would be to host the untarred code. That way you or others would be able to easily add to/modify your work. GitHub is a great place to store patches in development IMO.

Hope it's a productive start.

Great advice re: github, Jedmeister. It's my first real experience with it. I've eliminated the tarball, added the directory that contains the patch, and updated the readme. All with the hope someone does something very cool with it...Or anything at all with it, really.

Jeremy Davis's picture

I find it very useful for sharing code. If you like GitHub then have a look at the TKL GitLab appliance too Rik. It's very much like GitHub. You may find it very useful for your students for keeping track of, and sharing all the coding work they are doing on their Raspis!

I have a very basic git/GitHub cheatsheet (in a text file) that I've been meaning to put in the wiki (for my own future reference as much as anything else). If you think that would be useful for you too, perhaps I should pull my finger out and post it...

Once I get a Raspi I'll take your patch for a test drive. Adding to my extensive todo list now... :)

Again, built with the fantastic TKLPatch. A LAMP stack that tries to be all the turnkey it can be. But for the Raspi.

It's here: https://github.com/ghoulmann/raspliance-LAMP-Stack

There was a lot of excitement about Owncloud working on Raspi, along with lot's of instructions all day on twitter. Wish I could've gotten this out there.

I feel like I'm doing some of this right; a lot I feel is going wrong. My webmin + modules handling is not elegant; I lift it wholesale out of LAMP 12.0 and stick in the overlay folder as appropriate. It works; I tried using the repos and forcing architecture, but it looked like that method was asking for trouble.

Problem 1: Root can't log in to shellinabox. A security measure that ordinarily would make sense; I know TKL 12 appliances don't have this issue, but I can't see how it was solved.

Problem 2: Could not make phpmysql work on 12322. I saw the apache2 host definition for it in LAMP 12, and stuck that where it belonged in overlay; no luck. So I am missing something there.

Problem 3: I don't know things about security. I think I made the inithooks in firstboot.d too executeable, for example.

Jeremy Davis's picture

I've been really wanting to have a play with a Raspi for a while, but still haven't gotten around to it (I don't even have one yet...).

I'd suggest that if you want to host your image, set up a SourceForge project. Otherwise there are plenty of free places to upload stuff (if you have enough room you could even use DropBox...!?)

In the future it'd be super awesome to have a whole heap of Raspi ready TurnKey appliances!

But in the meantime I've had a few thoughts (but haven't got far into turning them into reality...). If we could get TKLDev set up right, at least those interested could build their own TurnKey Raspian appliances! :)

Ideas/Requirements:

I suspect that there may be some appliances that would just be too tricky to build (at least easily) but even if we could get the most popular ones building that'd be super awesome! :)

Morteza PRK's picture

i will try QEMU.. first time i hear about it :)))

Jeremy Davis's picture

I have read a bit about using QEMU to emulate Raspi but haven't actually tried it yet.

From what I gather the version of QEMU in Debian Wheezy repos should work (no need to compile from source as some articles suggest) - but as I said I haven't got far (I set up the test env but haven't got back to it to actually test running anything in it...)

[update] I have got Raspbian running in QEMU on TKL Core v13.0 (Debian Wheezy based). However you need QEMU from wheezy-backports. The version in the main wheezy repo is too old... I probably should document this somewhere as it involved a fair bit of mucking around...

Morteza PRK's picture

i have forked Rik Goldman project. it's been modified. you shouldn't get any error

https://github.com/mortezaPRK/Raspliance-Core

thanks to @Jeremy..... (http://www.turnkeylinux.org/users/jedmeister)

Jeremy Davis's picture

My guess is that it was still Wheezy (or perhaps even Squeeze) based though, so not really suitable for usage directly now anyway.

I note that Rik's repo is still available (here). That is definitely Squeeze based, but perhaps you can update it to Stretch? I'm no RPi expert, but please feel free to post if you have questions and I'll do my best...

Morteza PRK's picture

let me thank you for your idea and works you have done for PI users. i forked your RASPLIANCE git-hub repo,

i will fork your other Repos as soon as possible ....

:)

Morteza PRK's picture

i wrote an instuction for noobs (i'm a noob :) )
http://www.instructables.com/id/Raspberry-PI-THE-HOME-SERVER-TURNKEY-LINUX/


and there is no more bugs (e.g. shell in a box)

thanks to everyone

lnwpen88's picture

Perfect timing, I have two Pi's that should show up on my doorstep tomorrow.

Jeremy Davis's picture

Although TBH I'm not sure... I guess you'll need to wait for input from others...

One day we might have a proper TurnKey ARM port OOTB! That'd be cool eh!

John Carver's picture

I got my first chance to play with a Raspberry Pi a couple months ago while trying to introduce my grandson to the world of Linux.  I was impressed by how easy it was to get up and running.  Since Raspbian is now based on Debian Jessie it got me thinking how great it would be to run some of the TurnKey appliances on a Pi. There are a number of other ARM based SBC's that would be potential hosts as well.  As an owner of three Roku's I like to see some opensource competition.

Information is free, knowledge is acquired, but wisdom is earned.

Jeremy Davis's picture

I did a fair bit of work on it (prior to v14.0). But never quite got it completed. I really hope to get back to it because it would be a winner! :)
Rahat's picture

Thanks for sharing your learning @Rik Goldman

Jeremy Davis's picture

It'd be awesome to support and we're still keen on the idea, but currently we're way behind schedule and don't really have any spare cycles... I doubt these old instructions still work, but perhaps!?

We're currently still working on our Buster based upgrade. I'm still testing, but I hope to start releasing updated appliances any day now...

Once we've worked through the library a bit and done most (if not all) of the library, then we'll be able to asses what our next priority might be... Perhaps proper RPi support might make it...

Jeremy Davis's picture

This is a bit of a late post, but I just wanted to highlight a new development...

Yannick (a TurnKey community member) has built "experimental" TurnKey RPi builds. If you can, it'd be awesome if you could test these out and see how they go. Please post any feedback in that thread.

Please note that these builds only support RPi 4 (none of the other models, RPi 400 is a RPi 4, built into a keyboard).

Add new comment