TurnKey Linux Virtual Appliance Library

TKL Core for Raspberry Pi

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.

 

Drew Ruggles's picture

Awesome!

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

I've got two Raspberries coming tomorrow

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


Jeremy's picture

Good on you Rik

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.

Thanks, folks.

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's picture

GitHub is cool I reckon

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... :)

"Raspliance" LAMP stack

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.


Booting Raspliance-Core Image

Hi Rik, 

I'm having trouble booting from your Raspliance image on my Raspi. I've read that older software (from before Sept. 2013) is problematic with newer boards. Have you had any success booting from your image on a newer Raspi board?

Thanks,

 Kyle 

do my way

try to build it again for your r-pi. since the img file on github WON'T work with newer bords. first install lastest pidora from "http://www.raspberrypi.org/downloads/"
then use the command line on your pi to run this commands:
"https://github.com/ghoulmann/Raspliance-Core/blob/master/core/conf"

make sure you created a root password BEFORE doing any of commands above.
give me feed back anyway :)

Command Line

When you say "use the command line on your pi to run this command: https://github.com/ghoulmann/Raspliance-Core/blob/master/core/conf",

What am I supposed to use GIT or APT-GET then https://github.com/ghoulmann/Raspliance-Core/blob/master/core/conf ???

I am using RPI B+ board and not having any luck.

I'll try PIDORA and then COMPILE TURNKEY OVERLAY and then run the command line address you listed above.

sorry

don't use pidora. you should use raspain...

copy the commands of  https://github.com/ghoulmann/Raspliance-Core/blob/master/core/conf to a file. like tkl.sh .make it executable . run it through ssh (don't use vnc because this commands will remove x server)

i'm going to run it on my b+ tonight

DONE :)

well
i got TURNKEYLINUX core on my pi b+ now

it was so hard

many problems

but now its done

i changed /core/conf file.since it won't work anymore (some packeges changed)
 

now i'm asking that how i can publish this as .img for others?
is there any way that i can edit the Raspian.img file so it become an TKL.img ?

Jeremy's picture

Great work!

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! :)

TNX

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

Jeremy's picture

Let us know how you go

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

Complete Update

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)

SO fantastic.

Great work! I wish I could have been more present for this thread, but I've taken a new position for last year and a half and it's kept my hands full. So glad you put this together! Thank you.

there you are :)

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

:)

Instructions + NO MORE BUG

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

TKL Core for Raspberry Pi

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

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)