mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Disable radio on RaspberryPi
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Check for broken dependencies.
|
||||
sudo apt-get check
|
||||
|
||||
# Update the packages lists.
|
||||
sudo apt update
|
||||
|
||||
|
||||
@@ -1,25 +1,43 @@
|
||||
# Raspberry Pi OS
|
||||
|
||||
1. [Store files on the SD even when the overlay file system is active](#store-files-on-the-sd-even-when-the-overlay-file-system-is-active)
|
||||
1. [Disable WiFi and Bluetooth](#disable-wifi-and-bluetooth)
|
||||
1. [Through boot configuration](#through-boot-configuration)
|
||||
2. [Through rfkill](#through-rfkill)
|
||||
2. [Swap](#swap)
|
||||
3. [Run containers](#run-containers)
|
||||
1. [Kernel containerization features](#kernel-containerization-features)
|
||||
2. [Firewall settings](#firewall-settings)
|
||||
4. [Sources](#sources)
|
||||
4. [Store files on the SD even when the overlay file system is active](#store-files-on-the-sd-even-when-the-overlay-file-system-is-active)
|
||||
5. [Further readings](#further-readings)
|
||||
6. [Sources](#sources)
|
||||
|
||||
## Store files on the SD even when the overlay file system is active
|
||||
## Disable WiFi and Bluetooth
|
||||
|
||||
The files just need to be stored on a different file system from `/`. You can partition the SD and use that, or create a file and mount it as a virtual file system:
|
||||
### Through boot configuration
|
||||
|
||||
```sh
|
||||
truncate -s '6G' 'file'
|
||||
mkfs.ext4 'file'
|
||||
mkdir 'mount/point'
|
||||
sudo mount -t 'ext4' -o 'loop' 'file' 'mount/point'
|
||||
sudo chown 'user':'group' 'mount/point'
|
||||
touch 'mount/point/new-file'
|
||||
Disable one or both in the `all` section of `/boot/config.txt`:
|
||||
|
||||
```ini
|
||||
[all]
|
||||
dtoverlay=disable-wifi
|
||||
dtoverlay=disable-bt
|
||||
```
|
||||
|
||||
### Through rfkill
|
||||
|
||||
1. block one or both:
|
||||
|
||||
```sh
|
||||
rfkill block wifi
|
||||
rfkill block bluetooth
|
||||
```
|
||||
|
||||
1. check they are correctly soft-blocked:
|
||||
|
||||
```sh
|
||||
rfkill list
|
||||
```
|
||||
|
||||
## Swap
|
||||
|
||||
Disable the swap file.
|
||||
@@ -57,6 +75,23 @@ update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
|
||||
```
|
||||
|
||||
## Store files on the SD even when the overlay file system is active
|
||||
|
||||
The files just need to be stored on a different file system from `/`. You can partition the SD and use that, or create a file and mount it as a virtual file system:
|
||||
|
||||
```sh
|
||||
truncate -s '6G' 'file'
|
||||
mkfs.ext4 'file'
|
||||
mkdir 'mount/point'
|
||||
sudo mount -t 'ext4' -o 'loop' 'file' 'mount/point'
|
||||
sudo chown 'user':'group' 'mount/point'
|
||||
touch 'mount/point/new-file'
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [rfkill]
|
||||
|
||||
## Sources
|
||||
|
||||
- The [k3s] project page
|
||||
@@ -64,7 +99,14 @@ update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
|
||||
- [Run Kubernetes on a Raspberry Pi with k3s]
|
||||
- Project's [issue 2067]
|
||||
|
||||
<!-- project's references -->
|
||||
|
||||
<!-- internal references -->
|
||||
[rfkill]: rfkill.md
|
||||
|
||||
<!-- external references -->
|
||||
[build your very own self-hosting platform with raspberry pi and kubernetes]: https://kauri.io/build-your-very-own-self-hosting-platform-with-raspberry-pi-and-kubernetes/5e1c3fdc1add0d0001dff534/c
|
||||
[how to disable your raspberry pi's wi-fi]: https://pimylifeup.com/raspberry-pi-disable-wifi/
|
||||
[issue 2067]: https://github.com/k3s-io/k3s/issues/2067#issuecomment-664052806
|
||||
[k3s]: https://k3s.io/
|
||||
[run kubernetes on a raspberry pi with k3s]: https://opensource.com/article/20/3/kubernetes-raspberry-pi-k3s
|
||||
|
||||
28
knowledge base/rfkill.md
Normal file
28
knowledge base/rfkill.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# rfkill
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
2. [Sources](#sources)
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# List devices.
|
||||
rfkill list
|
||||
|
||||
# Block a device.
|
||||
rfkill block 'wifi'
|
||||
rfkill block 'id'
|
||||
|
||||
# Unblock a device.
|
||||
rfkill unblock 'bluetooth'
|
||||
rfkill unblock 'id'
|
||||
```
|
||||
|
||||
## Sources
|
||||
|
||||
- [How to disable your Raspberry Pi's Wi-Fi]
|
||||
|
||||
<!-- project's references -->
|
||||
<!-- internal references -->
|
||||
<!-- external references -->
|
||||
[how to disable your raspberry pi's wi-fi]: https://pimylifeup.com/raspberry-pi-disable-wifi/
|
||||
Reference in New Issue
Block a user