|
@@ -66,6 +66,7 @@ If you didn't already configure this during the installation. Typically the case
|
|
- Fix YAML formatting globally: In `/etc/vim/vimrc.local`, add `autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab`.
|
|
- Fix YAML formatting globally: In `/etc/vim/vimrc.local`, add `autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab`.
|
|
1. Add mount options:
|
|
1. Add mount options:
|
|
- Setup hidepid:
|
|
- Setup hidepid:
|
|
|
|
+ - **TODO** Use existing `adm` group instead of creating a new one?
|
|
- Add PID monitor group: `groupadd -g 500 hidepid` (example GID)
|
|
- Add PID monitor group: `groupadd -g 500 hidepid` (example GID)
|
|
- Add your personal user to the PID monitor group: `usermod -aG hidepid <user>`
|
|
- Add your personal user to the PID monitor group: `usermod -aG hidepid <user>`
|
|
- Enable hidepid in `/etc/fstab`: `proc /proc proc defaults,hidepid=2,gid=500 0 0`
|
|
- Enable hidepid in `/etc/fstab`: `proc /proc proc defaults,hidepid=2,gid=500 0 0`
|
|
@@ -123,7 +124,7 @@ If you didn't already configure this during the installation. Typically the case
|
|
1. Check the performance governor and other frequency settings:
|
|
1. Check the performance governor and other frequency settings:
|
|
1. Install `linux-cpupower`.
|
|
1. Install `linux-cpupower`.
|
|
1. Show: `cpupower frequency-info`
|
|
1. Show: `cpupower frequency-info`
|
|
- - Check the boost state should be on (Intel).
|
|
|
|
|
|
+ - Check the boost state should be on (Intel).
|
|
- Check the current performance governor (e.g. "powersave", "ondemand" or "performance").
|
|
- Check the current performance governor (e.g. "powersave", "ondemand" or "performance").
|
|
1. (Optional) Temporarily change performance governor: `cpupower frequency-set -g <governor>`
|
|
1. (Optional) Temporarily change performance governor: `cpupower frequency-set -g <governor>`
|
|
1. (Optional) Permanently change performance governor: **TODO**
|
|
1. (Optional) Permanently change performance governor: **TODO**
|
|
@@ -190,7 +191,12 @@ The simplest alternative, without any local system caching.
|
|
- `Domains`: A space-separated list of search domains.
|
|
- `Domains`: A space-separated list of search domains.
|
|
1. (Optional) If you're hosting a DNS server on this machine, set `DNSStubListener=no` to avoid binding to port 53.
|
|
1. (Optional) If you're hosting a DNS server on this machine, set `DNSStubListener=no` to avoid binding to port 53.
|
|
1. Enable the service: `systemctl enable --now systemd-resolved.service`
|
|
1. Enable the service: `systemctl enable --now systemd-resolved.service`
|
|
-1. Point `resolv.conf` to the one generated by systemd: `ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf`
|
|
|
|
|
|
+1. Fix `/etc/resolv.conf`:
|
|
|
|
+ - Note: The systemd-generated one is `/run/systemd/resolve/stub-resolv.conf`.
|
|
|
|
+ - Note: Simply symlinking `/etc/resolv.conf` to the systemd one will cause dhclient to overwrite it if using DHCP for any interfaces, so don't do that.
|
|
|
|
+ - Note: This method may cause `/etc/resolv.conf` to become outdated if the systemd one changes for some reason (e.g. if the search domains change).
|
|
|
|
+ - After configuring and starting resolved, copy (not link) `resolv.conf`: `cp /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf`
|
|
|
|
+ - Make it immutable so dhclient can't update it: `chattr +i /etc/resolv.conf`
|
|
1. Check status: `resolvectl`
|
|
1. Check status: `resolvectl`
|
|
|
|
|
|
#### NTP
|
|
#### NTP
|
|
@@ -267,17 +273,35 @@ Everything here is optional.
|
|
|
|
|
|
## Troubleshooting
|
|
## Troubleshooting
|
|
|
|
|
|
-- `network-online.target` is stalling during boot:
|
|
|
|
- - See all services it depends on: `systemctl show -p WantedBy network-online.target`
|
|
|
|
- - Disable the unused services which stall.
|
|
|
|
-- Firmware for the network card fails to load:
|
|
|
|
- - Causes a syslog record like "firmware: failed to load rtl\_nic/rtl8168g-3.fw (-2)" when trying to up the interface.
|
|
|
|
- - Might happen after installation even if working initially (for some reason).
|
|
|
|
- - Realtek solution: Enable the "non-free" repo and install "firmware-realtek".
|
|
|
|
-- Perl complains about a locale error:
|
|
|
|
- - Test with `perl -e exit`. It will complain if there's an error.
|
|
|
|
- - Check the locale: `locale`
|
|
|
|
- - Comment `AcceptEnv LANG LC_*` in `/etc/ssh/sshd_config` to prevent clients bringing their own locale.
|
|
|
|
|
|
+**`network-online.target` is stalling during boot**:
|
|
|
|
+
|
|
|
|
+- See all services it depends on: `systemctl show -p WantedBy network-online.target`
|
|
|
|
+- Disable the unused services which stall.
|
|
|
|
+
|
|
|
|
+**Firmware for the network card fails to load**:
|
|
|
|
+
|
|
|
|
+- Causes a syslog record like "firmware: failed to load rtl\_nic/rtl8168g-3.fw (-2)" when trying to up the interface.
|
|
|
|
+- Might happen after installation even if working initially (for some reason).
|
|
|
|
+- Realtek solution: Enable the "non-free" repo and install "firmware-realtek".
|
|
|
|
+
|
|
|
|
+**Perl complains about a locale error**:
|
|
|
|
+
|
|
|
|
+- Test with `perl -e exit`. It will complain if there's an error.
|
|
|
|
+- Check the locale: `locale`
|
|
|
|
+- Comment `AcceptEnv LANG LC_*` in `/etc/ssh/sshd_config` to prevent clients bringing their own locale.
|
|
|
|
+
|
|
|
|
+**Boot volume is full**:
|
|
|
|
+
|
|
|
|
+- If this failed during a software upgrade, take note of the error.
|
|
|
|
+- Most of the time `apt auto-remove` should be enough.
|
|
|
|
+- Manually remove old kernels (if there's still not enough space):
|
|
|
|
+ - List installed kernels with `dpkg -l | tail -n +6 | egrep 'linux-image-[0-9]+' | grep -Fv $(uname -r)`
|
|
|
|
+ - `rc` means already removed, `iU` means it’s queued for install, `ii` means eligible for removal.
|
|
|
|
+ - Remove all kernels marked `ii` by apt-uninstalling `linux-image-X-generic linux-image-X linux-image-X-common`.
|
|
|
|
+ - Run another `apt auto-remove` just in case (pointless?).
|
|
|
|
+- Afterwards:
|
|
|
|
+ - If it ran out of space during an APT software upgrade, run `apt install -f` to fix any packages which failed and maybe a `apt upgrade` in case there's more upgrades.
|
|
|
|
+ - Make sure the initramfs isn't corrupt (if it ran out of space during an upgrade) by running `update-initramfs -u -k all`.
|
|
|
|
|
|
## Miscellanea
|
|
## Miscellanea
|
|
|
|
|