Menu

linux/

lxd: Manually remove lvm storage pool

lvremove /dev/default/LXDThinPool

To list all lvm pools:

lvdisplay
· 22 Apr 2022

Do I need to restart after dnf update?

Reboot is needed if one of the following packages was updated:

kernel
glibc
linux-firmware
systemd
dbus

There is an application to easily check it:

sudo dnf install yum-utils
needs-restarting -r
· 22 Apr 2022

Establish SSL connection with openssl using custom CA bundle

openssl s_client -verify_return_error -CAfile ats_certs.pem -showcerts -connect www.zilverenkruis.nl:443 -servername www.zilverenkruis.nl
· 21 Apr 2022

curl: Request URL via proxy

It is possible to request a URL in curl via proxy server using -x flag:

curl -x http://127.0.0.1:8080 https://google.com

This will send CONNECT request to your proxy server 127.0.0.1:8080. CONNECT request will ask proxy server to tunnel TCP connection to the destination. This means that, for example, proxy server won’t verify SSL certificate.

To force curl to send regular GET request, use the following command:

curl --request-target https://google.com -x 127.0.0.1:8080 127.0.0.1:8080
· 21 Apr 2022

No sound in Fedora after sleep

If you have no sound after the system comes back from sleep, try to run this command:

sudo systemctl start systemd-suspend
· 28 Mar 2022

Disable USB device

To disable USB device (audio device from Dell WD-19TB dock station in the example) when connecting it to your laptop, find it’s ids:

sudo lsusb -v

For example:

...
Bus 005 Device 007: ID 0bda:402e Realtek Semiconductor Corp. USB Audio
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x402e 
  bcdDevice            0.01
  iManufacturer           3 Generic
  iProduct                1 USB Audio
  iSerial                 2 200901010001
...

Save idVendor and idProduct values.

Create new file /lib/udev/rules.d/90-delldock.rules with the following content:

ACTION=="add", ATTR{idVendor}=="0bda", ATTR{idProduct}=="402e", RUN="/bin/sh -c 'echo 1 >/sys/\$devpath/remove'"

When the device is connected it will be automatically removed and your system won’t know about it

· 18 Mar 2022

Do not start LXD containers on boot

For all newly created containers:

lxc profile set default boot.autostart=false

Or for existing container:

lxc config set <container_name> boot.autostart false
· 28 Feb 2022

Profile Ansible playbooks

Install profiling module:

ansible-galaxy collection install ansible.posix

Enable profiling in ansible.cfg in [defaults] section:

callback_whitelist = ansible.posix.profile_tasks
· 14 Feb 2022

Unable to start Podman containers in LXD

[root@fe ~]# podman run hello-world
ERRO[0000] 'overlay' is not supported over extfs at "/var/lib/containers/storage/overlay" 
Error: kernel does not support overlay fs: 'overlay' is not supported over extfs at "/var/lib/containers/storage/overlay": backing file system is unsupported for this graph driver

To fix this error, you’ll need to edit /etc/containers/storage.conf file and make sure that it contains the following options:

[storage]
driver = "overlay"
[storage.options]
mount_program = "/usr/bin/fuse-overlayfs"

Run the following command to verify the result:

podman --log-level=debug ps -a
· 5 Feb 2022

How to check which cipher suites are supported by a website

sudo dnf install sslscan
sslscan example.com
· 24 Jan 2022