Managing File System Encryption with LUKS

Last year, I already wrote a blog post about the same topic: Configure Encrypted Storage With LUKS, and I had used fdisk to create a disk partition. In this post, I’ll use parted to achieve the same thing. I’m going to perform this operation on a server called servera on a disk device /dev/vdb. First, let’s verify that vdb is available and has no partition: [root@servera ~]# parted -l ... Error: /dev/vdb: unrecognised disk label Model: Virtio Block Device (virtblk) Disk /dev/vdb: 1074MB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: Use parted to create a partition on vdb using the whole disk. ...

June 28, 2020 · 3 min · 502 words · kenno

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.2.0] Reference: ...

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 + . References: ...

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

Upgrading STM32 Nucleo F401RE Firmware on Linux

I’ve been meaning to pick up a micro-controller and work on it again. About 5 years ago when I first encountered Arduino, I spent sleepless night learning about it, and creating things from DIY weather station, world clock, light sensor, etc. Fast forward to the current days, I almost forgot everything I learned. But we can always re-learn, or can’t we? Tonight, I found an Stm32 Nucleo F401RE micro-controller, and I want to start by updating the firmware on it (admittedly, this is the easiest thing to do). ST provides a tool called STW-LINK007, which can be freely downloaded from its website, to flash the firmware on a range of its micro-controllers. I have also written a blog post to update a similar micro-controller, STM32F4-Discovery, in the past. ...

June 15, 2020 · 2 min · 301 words · kenno