Raspberry Pi and databases
Every server whose apps use a managed database runs a small database proxy. Apps connect to localhost:13306 (MySQL and MariaDB) or localhost:15432 (Postgres), and the proxy sends each connection to the right database server, using the login name. This is true even when no database runs on that server.
The proxy needs a 4 KiB memory page size. A Raspberry Pi 5 on Raspberry Pi OS (Debian 13, "trixie") uses a 16 KiB kernel by default, and the proxy cannot start on it. Until the Pi boots the 4 KiB kernel, apps on it cannot reach their databases.
Switch an existing server
Run this on the server. It needs sudo. The installer only restarts on a first install; on a server that is already installed or already enrolled, you run this yourself:
sudo /opt/turbopanel/share/orchestration/scripts/tp-orchestrate kernel-features status
sudo /opt/turbopanel/share/orchestration/scripts/tp-orchestrate kernel-features apply pi-4k-pagesize --rebootstatus prints three tab-separated columns: feature id, state, and reason. Tabs are shown as spaces here. When the server can switch:
pi-4k-pagesize switchable this server can switch to the 4 KiB kernel (a restart is needed)The state is one of not-applicable, switchable, restart-needed, ready, or blocked.
When status prints switchable for pi-4k-pagesize, the server can switch.
apply copies /boot/firmware/config.txt to config.txt.tp-backup-<date and time> in the same directory, then adds the line kernel=kernel8.img at the top of config.txt.
With --reboot, it waits until the server has finished enrolling with TurboPanel, then shows a countdown (Restarting in 10 second(s)…). Press Ctrl-C to cancel and restart yourself later.
When the server is back, getconf PAGESIZE prints 4096 and status prints ready. The database proxy then starts by itself.
Leave out --reboot to save the change and restart on your own schedule. status then reads restart-needed.
At install time
On a Raspberry Pi running Raspberry Pi OS on Debian 13, the installer does the same switch as its last step, after everything else is installed — but only on a first install. It records whether the server was already enrolled, waits for fresh enrolment files, then explains what is about to happen, saves the change, counts down, and restarts the server.
On a re-run of the installer on an already installed server, or on a server that is already enrolled, it never restarts: it prints the apply command instead. Updates never do this, and it never restarts while an update is waiting to be confirmed.
To skip it, set TURBOPANEL_SKIP_KERNEL_SWITCH=1 when you run the installer. You can run the command above later instead.
When it does nothing
- The server is not a Raspberry Pi.
- The OS is not Raspberry Pi OS on Debian 13 ("trixie").
- The page size is already 4 KiB.
/boot/firmware/config.txtalready chooses another kernel. It is left as it is, andstatussaysblocked.- The 4 KiB kernel modules (
*-rpi-v8) are not installed, andstatussaysblocked. config.txthasauto_initramfs=1butinitramfs8is missing from the boot partition, andstatussaysblocked.
Undo
sudo /opt/turbopanel/share/orchestration/scripts/tp-orchestrate kernel-features undo pi-4k-pagesize
sudo rebootundo removes the kernel=kernel8.img line only when TurboPanel added it. If you wrote kernel=kernel8.img yourself, it prints Nothing to undo and you remove the line by hand. undo never restarts the server. The backup copy is left in place.
If a Pi does not come back
Take the SD card out and mount its boot partition on another computer. Delete the kernel=kernel8.img line from config.txt, or copy the config.txt.tp-backup-… file over it, then put the card back.
Related
- Managed databases — creating a cluster on a server.
- Servers — the server control panel, including reboot.
- Daemon setup — which hosts the installer supports.
Last updated on
Principals
The named accounts your sites, services and database logins run as — what a principal is, its two forms, how names work, placing one on several servers, and what removing one does
Git sources and repositories
Connecting GitHub and GitLab, how applications, installations and repositories relate, binding a repository to a service, push-to-deploy and its two modes, deploy keys for plain git, and every refusal code