OpenWRT
Hardware considerations
- Min. 128 MB Storage/128 MB RAM to be able to use advanced Ansible collections like -imp1sh/ansible_openwrt
- 64 MB Flash for Tailscale
First setup
- Set root-pw
- Set IP, reboot
- add ssh key
- Login in via ssh
Install packages:
opkg update
opkg install git tmux
- Check in
/etc
cd /etc
git init .
git add .
git commit -m'Initial commit'
Upgrade all packages
Since OpenWrt firmware stores the base system in a compressed read-only partition, any update to base system packages will be written in the read-write partition and therefore use more space than it would if it was just overwriting the older version in the compressed base system partition. It's recommended to check the available space in internal flash memory and the space requirements for updates of base system packages.
Run in tmux (!):
tmux
opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade
reboot
Add packages
Basics
opkg install curl luci-app-ddns luci-app-upnp screen rsync
openssh
opkg openssh-client openssh-sftp-server
Wlan uplink
- Connect to client Wi-Fi networkhttp://192.168.8.1/
- Network/Wireless
- Scan
- Join Network
Storage
Freeing space
- FAQ: No space left on device
- How to list only packages that I have installed?
- Recover from full /overlay
What helped after package installation broke and left half-installed packages:
- Removed leftovers from
/overlay/upper/usr/lib/
- Reboot
USB Storage
Quick Start for Adding a USB drive
Extroot
For SD-Card usage (yes, kmod-usb-storage
needs to be installed to access a
sd-card, at least on the GL.Inet X-750
):
opkg install kmod-mmc kmod-usb-storage
ls -al /sys/block/
ls -la ls -al /dev/sd*
parted -s /dev/sda -- mklabel gpt mkpart extroot 2048s -2048s