How to Install Turnkey Linux on the Raspberry Pi

by Apr 22, 2018Technology2 comments

This quick guide will show you how to install Turnkey Linux in the Raspberry Pi.  This tutorial will only work on the Raspberry Pi 2 or older because Wheezy unfortunately does not support the ARMv8 kernel in the newer Raspberry Pi 3.  If you need any help burning the Wheezy image to an SD card there is a great cross platform program called Etcher that makes writing the .img files simple.  It can be downloaded here.  Now, lets begin…

Get a copy of Raspbian Wheezy

Getting a copy of Wheezy is a must, this project will not work correctly on Jessie or Stretch.  The newest version of Wheezy at time of writing this is July 2013.

http://downloads.raspberrypi.org/raspian/images

Burn the .img file to your SD card, and fire up your Raspberry Pi.

Next do some initial configuration.

Wait for the raspi-config menu.  Once loaded, do the following…

  • Expand your SD card.
  • Set your Locale, Time-zone, etc.
  • In the Advanced menu, set your gpu ram to 16mb.
  • In the Advanced menu, enable SSH.
  • In the Overclock menu, bump to Modest, or whatever value you feel comfortable with.
  • Now Finish, and allow the Raspberry Pi to Reboot.

Set up a Root Password

Set up a root user password by entering the following command.

sudo passwd root

Make sure you pick a strong password.  Enter it twice to confirm.

Convert to Turnkey Linux

Next lets install Turnkey Linux using the TKL_Patch.  Thank you to ghoulmann & Mort’z for all their hard work.

Next we are going to login as the root user, and download the repository to our Raspberry Pi.

sudo su
git clone https://github.com/ghoulmann/Raspliance-Core.git /tmp/tkl

Next lets compile the Patch.

1
2
3
cd /tmp/tkl/
./compile_tklpatch.sh
tklpatch-apply / ./core/

This may take a while…  Once complete reboot.

1
reboot

Logging in to Turnkey.

Once the reboot is complete, you will be prompted to login again.  Login with

1
2
root
(your password)

Set up our Network Interfaces

On the initial install, we will be missing our Network Interfaces. At the prompt enter the following…  (Assuming your logged in with root.  If not, prefix the following command with ‘sudo’)

1
nano /etc/network/interfaces

This will likely give you a blank file.  If you want to use your DHCP Server for the IP address for your Server enter the following…

1
2
3
4
# UNCONFIGURED INTERFACES
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

If you would like to add a static IP address to your Turnkey server (recommended) enter the following, but set to your networks configuration…

1
2
3
4
5
6
7
8
9
10
11
# UNCONFIGURED INTERFACES
auto lo eth0
iface lo inet loopback
# Set the following to your network settings
iface eth0 inet static
address 192.168.10.10
netmask 255.255.255.0
broadcast 192.168.10.255
network 192.168.10.0
gateway 192.168.10.1
dns-nameservers 192.168.10.1

When finished, press Ctrl+x, y to confirm, save and exit.  This should set up your Network adapter to work in Turnkey.

Lets give this a reboot, and let the system come up again.

1
reboot

Logging in to Webmin

On initial installation Webmin doesn’t run by default and we will need to start the service.  Start your web browser and enter the following URL.

http://(your ip address):4200

You will be prompted for your login information.  You can log in with your pi username and password.  Once logged in, enter the following.

1
service webmin start

Once completed, you can now log into the Webmin interface by entering the following in your browser.

http://(your ip address):12321

Now you should be logged into the Webmin panel.  Go ahead and have fun!