After upgrading to Ubuntu 22.04 running apt shows an error message saying “Key is stored in legacy trusted.gpg keyring“: The key needs to be exported from the legacy keyring and then imported back to the current system. List the keys and find the key ID of the repository that is…
Linux: Booting in single-user mode
Sometimes it might be necessary to start in single-user mode to do some administration work, or even reset an existing password. Normally this can be achieved via the GRUB boot loader. CentOS / RedHat (with root account enabled) Switch on your system. Press Esc until the GRUB menu shows up.…
Linux / Unix: Comparing differences between folders
I had to check the file changes between two Backintime snapshots recently. You can always use rsync for that, but there is a more straightforward way by using diff. -q will display only the files that differ. -r will make the comparison recursive. There is a GUI application called Meld…
Linux / Ubuntu / hdparm: Identifying drive features and setting sleep patterns
Preparing the storage Install hdparm and smartmontools Install hdparm and the SMART monitoring tools. Identify the right hard drive Make sure you identify the correct drive, as some of the commands will destroy data. If you don’t understand the commands, then check them first. You have been warned. Identify the…
Linux: Configure locale and keyboard layout when remotely accessing from a Mac
At work I have to remote into several different Linux systems from a Mac and there is always the pain of having to handle different keyboard layouts if using Synergy or VMs. The conversion from a Mac keyboard layout doesn’t translate correctly when the Linux system has the keyboard configured…
Linux: Adding a GUI to headless/server installs
Server and minimal installs are normally headless and have no graphical interface. If needed you can add a GUI manually. The process is slightly different depending on the distro. RedHat / CentOS 7.x RedHat / CentOS 8.x Ubuntu 18.04.x LTS Debian 9.x Debian 10.x All the above distros use systemd…
Linux: Initiating a CPU backtrace
Sometimes a process is taking a lot of CPU time and it isn’t clear what the cause is. For example, at times it is common to see the kworker process consuming a lot of CPU. kworker is a placeholder process for kernel worker threads. These threads perform most of the…