Moving the root partition.

This a summary of an article describing how to move the root partition found on the Raspberry Pi Forums .

Before you do anything do a “lsusb”without your external storage plugged in. Then plug in your external storage and do a “lsusb” again to make sure that your storage is going to work OK.

Before you start give a bit of thought as to how you want your storage partitioned. I just left my SSD as a single 500GB partition. In the future I can see that I’ll be adding more to house my collection of music and videos.

Anyway, without further ado, if you follow this guide  to the letter I’m quite sure you’ll have no problems.

LAMP + WordPress

This is not intended to be a complete HOWTO for Linux (Raspbian), Apache2, PHP, MySQL and  WordPress on a Raspberry Pi 4 4GB. What it is supposed to be is a guide that demonstrates that it is easy to get LAMP + WordPress going on a Pi with some links to the documentation that I used.

Assuming you’ve got your Pi and possibly some external storage it’s important to plan out what you’re trying to accomplish and how you want to go about it.

So, I had a 4GB Pi4 as well as a Sandisk Extreme external SSD. First step was to get the latest Raspbian (Buster) in an SD card and booting. Once that was accomplished I installed Apache2 and got that working properly. MySQL / MariaDB was the next cab off the rank followed by PHP and php-mysql.

After each step it’s a damn good idea to make good and sure that what you’ve just installed works properly.

Downloading and installing WordPress was quite possibly the easiest part of the whole process.

For each of the LAMP components there is a heap of available documentation available – remember that Google is your friend. The Raspberry Pi Forums are a brilliant resource. The MariaDB documentation is comprehensive to say the least as is the PHP documentation. There is more WordPress documentation than any mortal could ever want.

So, the steps I followed were :-

  1. Get Raspbian working.
  2. Download, install and get Apache2 working.
  3. If you are going to get SSL working this is when you’d do. I decided not to and just skipped it.
  4. Download and get MariaDB installed and working.
  5. Get PHP and php-mysql downloaded, installed and working.
  6. Get the latest version of WordPress downloaded and installed.
  7. In MySQL reate the WordPress user and the WordPress database.
  8. Set up the privileges for the user.
  9. Configuring WordPress is pretty trivial IF you follow the WordPress procedures.

This is a much more complete HOWTO.

Once I got it all working I set about getting all my stuff over from an ISP’s server. Lots of copying and pasting is all it took.

Once I got it all over I started messing around with WordPress themes and layouts. The choices are bewildering and the theme and layout of this site is a “first attempt mess” which I’ll refine as I work out what I want and how to get there.

At this point I decided that a 32GB SD card probably wouldn’t be enough so I decided to press a Sandisk Extreme 500GB SSD into service. I found a great HOWTO on the  Raspberry Pi Forums and it worked first time. I’ll put that procedure into another post.

Getting rid of the heat

So when I use the Pi to watch movies on our TV it tends to get a bit hot under the collar – up to around 81 or 83degC. Something needed to be done about that state of affairs so I installed it in a heatsink case with fans.

Pi with heatsink case with fans.

Much better. No matter what I do I can’t get the temperature over 55degC.

While I was at it I decided to go with the 64 bit kernel so I added arm_64bit=1 to config.txt so now uname -a gives me :-

Linux markpi 4.19.75-v8+ #1270 SMP PREEMPT Tue Sep 24 18:59:17 BST 2019 aarch64 GNU/Linux

Everything still works as it should – Apache2, PHP, MySQL and VLC which we use a lot for movies, tv series, etc.

The next step is a TV HAT or a TV USB dongle – probably the dongle as that won’t mean messing around with GPIO standoffs, etc to get it to fit with the heatsink.