2020-11-18 15:41:52 -05:00
# Advanced Features
## How to switch kernels?
2016-07-02 14:20:49 -04:00
2020-11-25 12:05:16 -05:00
Check [_this_ ](https://www.armbian.com/kernel/ ) for more info.
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
## How to troubleshoot?
## How to unbrick the system?
2020-11-14 21:01:55 -05:00
2020-11-14 21:04:34 -05:00
Both of above headings have been moved to a new page and expanded upon: [Recovery ](User-Guide_Recovery.md )
2020-11-14 21:01:55 -05:00
2020-11-18 15:41:52 -05:00
## How to build a wireless driver?
2016-07-02 14:20:49 -04:00
2017-08-06 14:46:21 +02:00
Install and recreate kernel headers scripts (optional)
armbian-config -> install kernel headers
exit
2016-07-02 14:20:49 -04:00
cd /usr/src/linux-headers-$(uname -r)
make scripts
2022-08-01 07:58:20 +03:00
Go back to root directory and fetch sources (working example, use `ARCH=arm64` on 64bit system)
2016-07-02 14:20:49 -04:00
2017-08-06 14:46:21 +02:00
cd
2024-07-12 10:25:33 +07:00
export KSRC="/usr/src/linux-headers-$(uname -r)"
2016-07-02 14:20:49 -04:00
git clone https://github.com/pvaret/rtl8192cu-fixes.git
cd rtl8192cu-fixes
2024-07-12 10:25:33 +07:00
make -C "$KSRC" M="$PWD" ARCH=arm
Refer to [Linux Kernel Documentations: Building External Modules ](https://www.kernel.org/doc/html/latest/kbuild/modules.html ) for more information.
2022-08-01 07:58:20 +03:00
2016-07-02 14:20:49 -04:00
Load driver for test
2017-08-06 14:46:21 +02:00
2016-07-02 14:20:49 -04:00
insmod 8192cu.ko
2022-08-01 07:58:20 +03:00
Check `dmesg` and the last entry will be:
2016-07-02 14:20:49 -04:00
usbcore: registered new interface driver rtl8192cu
Plug the USB wireless adaptor and issue a command:
iwconfig wlan0
2022-08-01 07:58:20 +03:00
2016-07-02 14:20:49 -04:00
You should see this:
wlan0 unassociated Nickname:"<WIFI@REALTEK >"
2017-08-06 14:46:21 +02:00
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
2016-07-02 14:20:49 -04:00
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
2017-08-06 14:46:21 +02:00
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
2016-07-02 14:20:49 -04:00
Check which wireless stations / routers are in range
iwlist wlan0 scan | grep ESSID
2022-08-01 07:58:20 +03:00
## How to run Docker?
2016-07-02 14:20:49 -04:00
2023-03-11 09:12:09 +01:00
Docker works reliably with the distribution-provided builds. It is as simple as `apt-get install docker.io` .
If you prefer to use the latest Docker builds provided directly by Docker, please follow the guide below.
Though if you run into trouble using those please revert back to distribution binaries before complaining.
2021-02-20 23:16:46 -05:00
2016-07-02 14:20:49 -04:00
Preinstallation requirements:
2020-11-06 10:24:40 +01:00
- Armbian 20.08.17 or newer with Kernel 3.10 or higher
- Debian Buster (might work elsewhere with some modifications)
2016-07-02 14:20:49 -04:00
- root access
2020-11-06 10:24:40 +01:00
This method is based on Docker Debian installation [documentation ](https://docs.docker.com/engine/install/debian/ ). Execute this as root:
2016-07-02 14:20:49 -04:00
2020-11-06 10:24:40 +01:00
```bash
2020-11-06 10:30:19 +01:00
apt-get remove docker docker-engine docker.io containerd runc
2023-03-11 09:12:09 +01:00
apt-get install ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
2020-11-06 10:30:19 +01:00
apt update
2023-03-11 09:12:09 +01:00
apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
2022-08-01 07:58:20 +03:00
```
2016-07-02 14:20:49 -04:00
2017-04-24 16:25:46 +02:00
Test if Docker works correctly:
2016-07-02 14:20:49 -04:00
2020-11-06 10:24:40 +01:00
```bash
2020-11-06 10:30:19 +01:00
docker run hello-world
2020-11-06 10:24:40 +01:00
```
If you get that kind of output, then Docker install went fine:
```bash
Hello from Docker!
This message shows that your installation appears to be working correctly.
```
If you would like to use Docker as a non-root user, you should now consider adding your user to the `docker` group with something like:
```bash
2020-11-06 10:30:19 +01:00
usermod -aG docker your-user
2022-08-01 07:58:20 +03:00
```
2020-11-06 10:24:40 +01:00
2020-11-06 10:30:19 +01:00
You will have to log out, and log in once more in order to be able to run Docker without being root.
2020-11-06 10:24:40 +01:00
Let's try a last test to see if a Docker container can be seen outside of your Armbian machine:
```bash
docker run -d -p 80:80 hypriot/rpi-busybox-httpd
```
2017-08-06 14:46:21 +02:00
2017-04-24 16:25:46 +02:00
... and point the browser of any device in the same network to `http://<IP OF YOUR DEVICE>/`
2016-07-02 14:20:49 -04:00
2019-05-27 13:42:25 +02:00
[More info in this forum topic ](https://forum.armbian.com/topic/490-docker-on-armbian/ )
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
## How to set wireless access point?
2016-07-02 14:20:49 -04:00
2020-03-21 18:07:52 +01:00
There are two different HostAP daemons. One is **default ** and the other one is for some **Realtek ** wifi cards. Both have their own basic configurations and both are patched to gain maximum performances.
2016-07-02 14:20:49 -04:00
Sources: [https://github.com/igorpecovnik/hostapd ](https://github.com/igorpecovnik/hostapd "https://github.com/igorpecovnik/hostapd" )
Default binary and configuration location:
/usr/sbin/hostapd
/etc/hostapd.conf
2017-08-06 14:46:21 +02:00
2016-07-02 14:20:49 -04:00
Realtek binary and configuration location:
/usr/sbin/hostapd-rt
/etc/hostapd.conf-rt
Since its hard to define when to use which you always try both combinations in case of troubles. To start AP automatically:
1. Edit /etc/init.d/hostapd and add/alter location of your conf file **DAEMON_CONF=/etc/hostapd.conf ** and binary **DAEMON_SBIN=/usr/sbin/hostapd **
2016-08-09 20:18:19 +03:00
2. Copy * * /etc/network/interfaces.hostapd** to * * /etc/network/interfaces**
2016-07-02 14:20:49 -04:00
3. Reboot
4. Predefined network name: "BOARD NAME" password: 12345678
5. To change parameters, edit /etc/hostapd.conf BTW: You can get WPAPSK the long blob from wpa_passphrase YOURNAME YOURPASS
2020-11-18 15:41:52 -05:00
## How to connect IR remote?
2016-07-02 14:20:49 -04:00
2017-08-06 14:46:21 +02:00
Required conditions:
2016-07-02 14:20:49 -04:00
- IR hardware
- loaded driver
2024-07-21 11:34:56 +03:00
Get your [remote configuration ](https://lirc.sourceforge.net/remotes/ ) (lircd.conf) or [learn ](https://kodi.wiki/view/HOW-TO:Set_up_LIRC#Learning_Commands ).
2020-11-25 18:04:21 -05:00
You are going to need the list of all possible commands which you can map to your IR remote keys:
2017-08-06 14:46:21 +02:00
2016-07-02 14:20:49 -04:00
irrecord --list-namespace
To start with learning process you need to delete old config:
2017-08-06 14:46:21 +02:00
rm /etc/lircd.conf
2016-07-02 14:20:49 -04:00
2022-08-01 07:58:20 +03:00
Then start the process with:
2016-07-02 14:20:49 -04:00
irrecord --driver=default --device=/dev/lirc0 /etc/lircd.conf
And finally start your service when done with learning:
service lirc start
Test your remote:
irw /dev/lircd
2020-11-18 15:41:52 -05:00
## Outdated
### How to freeze your filesystem? (outdated)
In certain situations it is desirable to have a virtual read-only root filesystem. This prevents any changes from occurring on the root filesystem that may alter system behavior and it allows a simple reboot to restore a system to its clean state.
You need an ODROID XU4 or Allwinner A10, A20 or H3 board with legacy kernel where we added support for overlayfs. Works only on Ubuntu Xenial. Login as root and execute:
apt-get install overlayroot
echo 'overlayroot="tmpfs"' >> /etc/overlayroot.conf
reboot
After your system boots up it will always remain as is. If you want to make any permanent changes, you need to run:
overlayroot-chroot
Changes inside this will be preserved.