Install Ansible on Gentoo

Gentoo provides a package called app-admin/ansible for Ansible. To install it, just run: ❯ sudo emerge --ask app-admin/ansible Note that unlike Ansible package on CentOS/Fedora, there is no default ansible.cfg provided with the Gentoo Ansible package. ❯ ansible --version ansible 2.9.9 config file = None configured module search path = ['/home/kenno/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/lib/python-exec/python3.7/ansible python version = 3.7.7 (default, May 9 2020, 19:52:18) [GCC 9....

June 28, 2020 · 1 min · 78 words · kenno

How to Label Ext4 Filesystem

I have a 2TB drive, when connecting to my Fedora workstation, it’s mounted using the UUID of the partition as the following: # mount | grep sde1 /dev/sde1 on /run/media/kenno/f59ffb93-5a92-4af9-a9b5-19ca3bb8aa37 type ext4 (rw,nosuid,nodev,relatime,seclabel,uhelper=udisks2) I think it’ll look nicer if it’s mounted with a shorter name, e.g. ‘Podcast’. The filesystem for this drive is ext4. To create a label on the ext4 filesystem, we can use a program called e2label. The exact command is e2label device [ volume-label ] according to the man page....

June 20, 2020 · 1 min · 185 words · kenno

Move or toggle current window to second monitor in DWM

I’ve switched to use DWM, Dynamic Windows Manager, from GNOME on my laptop since the beginning of this month. So far I really enjoyed it. Here are some commands I needed to know since I have an external screen connected ot this machine. To change the focus to previous/next screen: Mod1 + , Mod1 + . To move applications from a screen to another, just add Shift key: Mod1 + Shift + , Mod1 + Shift + ....

June 18, 2020 · 1 min · 89 words · kenno

SELinux Non-Default Home Directory Location

On most my systems I created a user called devops with its home directory created at /srv/devops. And on Fedora or CentOS systems, those home directories have their SELinux context set correctly when created. Recently, I found out that on all 3 machines so far, the SELinux context has been reverted. ~# ls -lZ /srv total 0 drwx------. 5 devops devops system_u:object_r:var_t:s0 127 Oct 30 2019 devops It should have had the same context as the normal user kenno in /home directory:...

June 15, 2020 · 3 min · 482 words · kenno

How to Create Multiple Directories with Incrementing Numbers in Names

I need to create 20 empty directores with the following name: dvd01, dvd02, dvd03,…, dvd20. My first thought was to use for loop, but then I decided to do a quick Google search, and found something more elegant: $ mkdir dvd{01..20} That’s cool, isn’t it? Reference: How to create multiple directories with incrementing numbers in a single command?

June 9, 2020 · 1 min · 58 words · kenno

Dell Latitude 7400 System BIOS 1.7.4

Dell released a new BIOS firmware version 1.7.4 for the Latitude 7300 and 7400 on May 22, 2020. This release is again marked Urgent and contains the following fixes and enhancements: Fixes: Firmware updated to address CVE-2020-5363 Enhancements: Updated the Embedded Controller Engine Firmware This version 1.7.4 is already available on Fedora 32 via fwupdmgr tool. [root@matht436 ~]# fwupdmgr refresh Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.jcat Downloading… [***************************************] Fetching metadata https://cdn.fwupd.org/downloads/firmware-00558-stable.xml.gz Downloading… [***************************************] Successfully downloaded new metadata: 1 local device supported [root@matht436 ~]# fwupdmgr update • Thunderbolt Controller has no available firmware updates • SSDPEKKF512G8 NVMe INTEL 512GB has no available firmware updates Upgrade available for System Firmware from 1....

June 8, 2020 · 1 min · 198 words · kenno

BIOS Firmware for ThinkPad P1 Gen1 1.30

Lenovo just released an updated BIOS firmware version 1.30 for ThinkPad P1 Gen1 on June 3rd. The changes in this v1.30 release are: CHANGES IN THIS RELEASE Version 1.30 [Important updates] - Update includes a security fix. - Address CVE-2020-0529, (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0529) - Address CVE-2020-0528, (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0528) [New functions or enhancements] - Updated the Diagnostics module to version 04.12.001. [Problem fixes] - Fixed an issue where USB keyboard connected via Thunderbolt WS Dock might not be used at BIOS POST....

June 8, 2020 · 3 min · 613 words · kenno

Create Disk Partition With GNU Parted

My favourite tool to create disk partitions on Linux is c[fg]disk. cfdisk used to create MBR based partition, and cgdisk is for GPT one. Today, I want to learn to use another tool called GNU Parted. After plugging an external disk, we can use udiskctl command to identify the disk device. # udisksctl status MODEL REVISION SERIAL DEVICE -------------------------------------------------------------------------- Samsung SSD 850 EVO 250GB EMT01B6Q S21MNXAG919308T sda ST2000DM001-1ER164 HP51 Z4Z46TMA sdb ST2000DM001-1ER164 HP51 Z4Z46W3E sdc Samsung SSD 850 EVO 250GB EMT01B6Q S21MNXAG919312Y sdd Samsung SSD 840 EVO 250G 0309 533144424E4541443837343335324120 sde The last Samsung SSD 840 (/dev/sde) is the one that I’m going to work with....

May 20, 2020 · 2 min · 419 words · kenno

BIOS Firmware for ThinkPad X1 Carbon Gen 6 1.48

On May 15, Lenovo released a new BIOS firmware for ThinkPad X1 Carbon Gen 6. The latest of the version of the firmware is 1.48. (There previous version 1.47 was withdrawn for some unknown reason.) Changes in this releases: CHANGES IN THIS RELEASE Version 1.48 [Important updates] - Update includes a security fix. [New functions or enhancements] - Updated the Diagnostics module to version 04.12.001. [Problem fixes] - Fixed an issue where Force PXE boot by Intel AMT does not work....

May 16, 2020 · 3 min · 469 words · kenno

BIOS Firmware for Thinkpad P1 Gen1 1.29

It’s almost exactly one month from the last time Lenovo released (v1.28 of ) the BIOS firmware for ThinkPad P1 Gen 1. Apparently, v1.28 firmware has been marked “Withdrawn” according to this n2eul21w.txt. The changes in this release v1.29 is: CHANGES IN THIS RELEASE Version 1.29 [Important updates] - Addresses CVE-2019-0154 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0154) Refer to Lenovo's Security Advisory page for additional information about LEN-27714 "Multi-vendor BIOS Security Vulnerabilities". (https://support.lenovo.com/us/en/product_security/LEN-27714) [New functions or enhancements] - Updated the CPU microcode....

May 16, 2020 · 2 min · 340 words · kenno