Bradley Kirton's Blog

Published on Jan. 31, 2024

Go home

Setting up a OKDO Rockpi SE

Download the appropriate image

OKDO images can be found here https://www.okdo.com/software-hub/.

I used the rock-4se_debian_bullseye_cli_b38.img.xz image.

Flash the image to a micro USB

xz -d rock-4se_debian_bullseye_cli_b38.img.xz  # Decompress the image
sudo dd bs=4M if=rock-4se_debian_bullseye_cli_b38.img of=/dev/sdd conv=fsync oflag=direct status=progress

Once flashed plug it all in and power up the board.

Connect to wifi

If you are not connected via the ethernet port you can connect to a WIFI with nmcli.

sudo nmcli dev wifi connect <SSID> password <password>

Update sudoers

sudo echo 'radxa    ALL=(ALL)   NOPASSWD: ALL' > /etc/sudoers.d/sudoers

Install AdGuard

Upgrades the distribution and installs all the stuff.

sudo apt update
sudo apt upgrade
sudo apt install ufw zsh git avahi-daemon avahi-utils libnss-mdns
sudo apt autoremove
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
sudo /opt/AdGuardHome/AdGuardHome -s install # If not already installed
sudo /opt/AdGuardHome/AdGuardHome -s start # If not already started
sudo /opt/AdGuardHome/AdGuardHome -s status # If not already started
sudo ufw allow ssh http
sudo ufw enable
sudo hostnamectl set-hostname adguard
sudo nano /etc/hosts  # You may need to change the rock4-se here to adguard
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
sudo reboot

Enable autologin

mkdir /etc/systemd/system/getty@tty1.service.d/
sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin radxa %I $TERM

Check if it is accessible

Try connecting to the adguard page with either the board IP address or the hostname we set above.

Navigate to http://adguard:3000.