Looping Through Line in a File in Bash

I wanted to install vim package on FreeBSD 13.0, and did so without realizing that there were over 86 additional dependency packages installed. This was done with pkg install -y vim command. Anyway, I wanted to clean up by removing vim and those dependencies after all this is a headless server. Removing vim package doesn’t remove the installed dependencies. Fortunately, I was able to copy and paste the names of dependency packages and save it to a file....

April 17, 2021 · 2 min · 226 words · kenno

Labeling an exFAT Partition File System

I just formatted an external drive with exFAT file system with the intention to share this drive between Windows/Linux/macOS. When the drive is mounted on my Fedora desktop, it shows as: /dev/sde1 on /run/media/kenno/E17F-B2B1 type exfat ()(rw,nosuid,nodev,relati...) I want to give it a name, so it’ll be mounted as: /run/media/kenno/DRIVE_NAME. On Linux system, we can use a tool called exfatlabel to get or set the exFAT file system. I already created a partition and format it (mkfs....

April 10, 2021 · 1 min · 203 words · kenno

Work Around for Dracut and LUKS Issue on Pre-release Fedora 34

I’ve been running Fedora 34 pre-release version even before it became beta. Everything has been working so far until recently when a package dracut was updated from 0.58 to 0.58-1. What is dracut? Good question. It’s an initramfs infrastructure used on Fedora system. Find out more from Dracut. The issue that introduced in version 0.58-1 on F34 is that it prevents any machines that use LUKS encryption for root partition to boot....

April 10, 2021 · 2 min · 319 words · kenno

Clean Up Systemd Journal Logs

On my Fedora 33 system, the systemd journal is persistently logged. Over time, the size of the log accumulate quite a lot. # du -shx journal/ 4.2G journal/ I already cleaned up the log twice in the past, but I already forgot how to do it. To fix my short-term memory, I’m going to document how I do this by following this blog post Clear systemd journal. The command for cleaning up old logs is journalctl with the option --vaccume-time=OLDER_THAN_TIME....

March 26, 2021 · 1 min · 166 words · kenno

Create libvirt Virtual Network From an XML File

I have a need to setup a virtual network on a VM-host server. Usually, I just use the virt-manager gui application to create this task. However, I’d like to do this via command line this time. Why? Well, why not? It’s always fun to learn new thing. :) libvirt keeps network configuration in XML files under /etc/libvirt/qemu/networks/. Here is what I have on one of my machines: # ls -1 /etc/libvirt/qemu/networks/*xml /etc/libvirt/qemu/networks/classroom....

March 22, 2021 · 3 min · 543 words · kenno

Passed EX403 Satellite 6 Administration

Last night I published 4 or 5 of blog posts related to the Foreman/Satellite server. Well, it wasn’t a coincidence, it was me cramming the last minute for the Red Hat Satellite 6 Administration exam today. It’s also known as EX403. Needless to say, I didn’t know what was in the exam, and I can’t share what was in exam I had taken today. What I can share with you is that I passed EX403!...

March 9, 2021 · 2 min · 300 words · kenno

Foreman: Publishing and Promoting Content Views Using Hammer

In this blog post, I’m going to practice publishing and promoting content views using the hammer CLI. I already know how to do this using the Satellite/Foreman web UI. First, I’m going to create the Base content view for Operations organization and Boston location. [root@foreman ~]# hammer content-view create \ > --name Base --organization Operations \ > --description 'Base Packages' Content view created. [root@foreman ~]# hammer content-view list --organization Operations ----------------|---------------------------|--------------------------|-----------|---------------------|--------------- CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS ----------------|---------------------------|--------------------------|-----------|---------------------|--------------- 6 | Base | Base | false | | ----------------|---------------------------|--------------------------|-----------|---------------------|--------------- The next step is adding the repos to the content view....

March 7, 2021 · 6 min · 1259 words · kenno

Foreman: Creating Software Life-Cycles Using Hammer

In this post, I will create a new life-cycle environment paths for the Operations organization that includes life-cycle environments named Deveopment, QA, and Production. Let’s list the current life-cycle environment for Operations organization. [root@foreman ~]# hammer lifecycle-environment list --organization Operations ---|---------|------ ID | NAME | PRIOR ---|---------|------ 6 | Library | ---|---------|------ When we create our first environment, we’ll need to use the ID of the Library, which is 6 in this case....

March 7, 2021 · 2 min · 290 words · kenno

Foreman: Creating Product & Repository Using Hammer

In this blog post, I’m going to show how to add a new product caled EPEL8 and populate it with a repository from EPEL 8. There should be 3 main steps: Create a Content-Credentials which stores the package signing key of the product or repository Create a new Product Create a new Repository Firt thing first, let’s create a new content-credentials named RPM-GPG-KEY-EPEL-8 with the contents from the EPEL 8’s GPG signing key....

March 7, 2021 · 4 min · 691 words · kenno

Foreman: Creating Organization & Location With Hammer

Let’s learn how to create an organization and location on Foreman/Satellite server using the hammer command-line-interface. In this example, I’m going to create an organization called: Operation and assign its location to Boston. On the Foreman server, excute the following commands: [root@foreman ~]# hammer organization create --name Operations Organization created. [root@foreman ~]# hammer location create --name Boston Location created. [root@foreman ~]# hammer organization add-location --name Operations \ > --location Boston The location has been associated....

March 7, 2021 · 1 min · 188 words · kenno