This guide speeds up your installation and in about 20-30 minutes you are completely up and running INCLUDING firewall and remote access from the start. I use the minimal desktop version on this as this also runs my Web Radio on MIXXX. You need a fast SD-Card like Samung EVO Plus Professional with 130 MB/s Write and 180 MB/s Read. This speeds up the process factor 2 to 10 compared to other discount SD-cards. I also force turbo mode right from the first boot wich speed up the kernel about 40 to 60 percent but alsp saves y0u handling time later.
Prerequisite
- Having a DHCP-server (use a home router with hard firewall enable).
- Having GNSS/GPS physically installed on the RasPi
- A fresh SD-Card
- Download latest version of Raspberry Pi image (this reduce update upgrade time later)
- Latest version of RUFUS
- Prepare headless version:
- On the old RasPi or ant other Pi make password . Copy this to a file called AUTHS.
- Make an empty file called “ssh”.
Flash Time of the Raspi Image
Now flash the SD card using Rufus.
When finished – and while the card still in your PC card reader do:
Copy the files auths and ssh to the folder /boot/
edit these config files:
#nano /boot/config.txt
Add this
at the end after [all]:
enable_uart=1 dtoverlay=pps-gpio,gpiopin=4 force_turbo=1 avoid_warnings=2
Edit:
#nano /boot/cmdline.txt
At the front of the string remove:
console=serial0,115200
Your GNSS /GPSD will not work if its there.
To the end, add:
nohz=off ipv6.disable=1 smsc95xx.turbo_mode=0
Now take the card to the RasPi and boot.
Booting Raspi
After some few minutes the pi is good to access remotely with ssh included on the dhcp-address it got automatically. Otherwise old style keyboard and mouse and a monitor.
on the upper right console:
Edit NETWORK Config to something fixed like
192.168.1.200 sub 24 gateway 192.168.1.1 DNS 127.0.0.1 192.168.1.1
In console do:
#apt update -y (dont upgrade yet as might set you down an hour) #raspi-config edit settings as you please like: keyboard, hostname, sound, splascreen, desktop timeout 0ut, vnc-server only raspi 64 at present)
Install your applications and server packages
#apt install ufw chrony gpsd gpsd-clients pps-tools bind9 wireguard ufw htop mc mixx samba monitorix -y
#nano /etc/ssh/sshd_config
Set this:
Protocol 2 Port xxxx (what you like) root-access no AllowUsers YourUsername (needed on Debian)
#systemctl restart sshd
Login via putty via to your RasPi to test you got access. Remeber the port of your own choice
Make these settings just for the case:
#systemctl enable gpsd
#systemctl enable monitorix
#systemctl enable bind9
#systemctl enable chrony
Firewall UFW
#ufw allow from 192.168.0.0/16 to any port your added before proto tcp // ssh
#ufw allow from 192.168.0.0/16 to any port 8080 proto tcp //monitorix
#ufw allow from 192.168.0.0/16 to any port 5900 proto tcp //VNC
use port 5938 tcp/udp for Teamviewer
#ufw allow to any port 53 //DNS
#ufw allow to any port 123 proto udp //NTP
Make sure you have the console or ssh access on the new port!
#ufw enable
Try putty now on new connection.
Chrony NTP Server
LETS do Chrony NTP server ready:
#nano /etc/default/chrony
DAEMON_OPTS="-4 -F -1 -r -m -s"
❗ Watch out that some copy and paste convert and add English “goose-eyes” instead of the straight. This will NOT work and make Chrony and/GPSD invalid for start. (It took quite a while before I realized this little bug).
#nano /etc/default/gpsd
and add this:
DEVICES="/dev/ttyS0" GPSD_OPTIONS="-n -D3"
#reboot
Now you can modify Monitorix and everything else using VNC or Putty and do the upgrade as we postponed before.
You might need to reboot after upgrade and trimminh Monitorix or your needs.
Happy RasPi Serving 🙂