How Do You Correct a /etc/fstab File That is Read Only?

Problem scenario
You boot up and log in. You cannot write to /tmp/.

What should you do?

Solution
First, mentally identify the file system in the /etc/fstab file (e.g., /dev/desk/by-id/dm-uuid-LVM-abcd1234).

Here is an example of an /etc/fstab file to determine what the file system string you need is:

/dev/disk/by-id/dm-uuid-LVM-abcd1234 / ext4 defaults,quota,grpquota 0 0
# /boot was on /dev/sda2 during curtin installation
/dev/sdc /var ext4 defaults 1 2
/dev/sda /opt ext4 defaults 0 0
/dev/disk/by-uuid/987654321 /boot ext4 defaults 0 0

Procedure
Run a command like this (but replace /dev/desk/by-id/dm-uuid-LVM-abcd1234 with the file system you need):

sudo mount -o remount,rw /dev/desk/by-id/dm-uuid-LVM-abcd1234

Now you should be able to modify the /etc/fstab file.

How Do You Troubleshoot the Python Problem “ValueError: time data … does not match %m”?

Problem scenario
You are trying to parse a log file with Python. The date entries use abbreviated spellings of months — not integer month values. You get an error like this:

“ValueError: time data ‘Jul 15 06:10:32’ does not match format ‘%m %d %H:%M:%S'”

What should you do?

Solution
Replace the “%m” with “%b”.

import datetime
log_reader = open(‘auth.log’, …

How Do You Find out if a VIN Has a Letter “o” or the Numeral 0?

Question
How do you determine/identify a vehicle identification number having the letter “O” (as in “Oscar”) or the numeral 0? The Arabic number 0 can be confused with the letter “O.”

Answer
It is numeral 0. The letter “O” is not allowed according to
https://checkventory.com/articles/whats-your-number/
. Apparently letters “I” and “Q” are not allowed either (presumably due to their potential confusion with numerals “1” and “0”).

Why Do yum/dnf Commands Fail with the –installroot Flag and How Do You Fix Them?

Problem scenario
dnf or yum commands always fail when you use the –installroot flag. The destination of the –installroot directory do not matter. You see error messages about epel, version, 404 and reaching external servers.

Solution
Root cause: There is an invocation of chroot behind the scenes (according to https://bugzilla.redhat.com/show_bug.cgi?id=850686).

Procedures
The –installroot=/foo/bar flag should always be used in conjunction with –releasever=X where “X” is the major version of your RedHat server.

How Do You Install an rpm/yum/dnf Package in a Non-Stardard Location?

Problem scenario
A partition is filling up on CentOS/Stream/RHEL/Fedora Linux. You do not want to have a package be installed in /usr or some “normal” location. You want to uninstall a package and reinstall it elsewhere. But moving the directory won’t work because the binary command will point to the old location. What should you do to get the destination of the installation to be something customized (and not the default directory)?

How Do You Troubleshoot the Python Problem “TypeError: ‘module’ object is not callable”?

Problem scenario
You run a Python program with datetime, but you get the error “TypeError: ‘module’ object is not callable.” What should you do?

Solution
Even though you may use “import datetime” at the top of the program, you should use “from datetime import datetime, timezone” at the top. If you used the syntax “datetime.datetime…”, you will need to remove one of the “datetime.” strings from the code.

What Do the Terms Upstream and Downstream Mean in I.T.?

Question
What do the terms upstream and downstream mean in I.T.?

Answer
If a project B is downstream from project A, project B has evolved from project A. In the genealogy of software/code/projects, project A is said to be upstream to project B if project A is an ancestor of project B. Project D is said to be downstream to project C if project D is a descendant of project B.

How Do You Troubleshoot “wine: could not exec wineserver”?

Problem scenario
You installed wine. You ran a command, but you got this:
“wine: could not exec wineserver”

What should you do?

Solution

1. Run this:

sudo find / -name wineserver64

2. Run this command but replace “/path/to” with the path to the wineserver64 file you found above:

export wineserver=/path/to/wineserver64 …

How Do You Run Code in the Eclipse IDE?

Problem scenario
You are using Eclipse for the first time. You try to to use Run, but you get an error message like this: “Unable to Launch The selection cannot be launched, and there are no recent launches.” Or you try to go to “Run configuration” and you have a prototype, but the “Run” button is grayed out. What should you do?

Solution
In the Run configuration section,