GNU/Linux

Installing Gentoo via Asahi Linux on an Apple Silicon-based Mac

20 minutes to read

When Apple launched Macs with Apple silicon, people speculated that a revolution in desktop computing had started. I saw on Reddit a GNU/Linux user claimed that GNU/Linux distributions should start to worry about the potential transition from x86-64 to ARM64 and do something about it to survive. What they might have not realized was that common software packages that constitute GNU/Linux had been long prepared for ARM64 thanks to portability of high-level programming languages. …

Gentoo Configuration Guide: Full Disk LUKS2 with GRUB and systemd

This collection is a tutorial which provides instructions to set up LUKS2-based full disk encryption on a Gentoo system using GRUB as the bootloader and systemd as the init system. In particular, setting up LUKS2 for use with GRUB is especially tricky, and this tutorial addresses any intricacies there. This tutorial aims to support both new Gentoo installations and existing ones, so it can be used to encrypt an unencrypted system too. …

Use Git to Manage Kernel Sources on Gentoo

Updated: 12 minutes to read

Gentoo offers its users a wide array of Linux kernel packages in the sys-kernel/* category, each of which may install the kernel in a different way. In particular, the sys-kernel/*-sources packages (such as sys-kernel/gentoo-sources, sys-kernel/vanilla-sources) install only the kernel’s source code and do nothing else. This is suitable for users who prefer to compile and install the kernel on their own but still would like to let the system package manager update the kernel sources automatically. …

Refine Gentoo on Windows Subsystem for Linux

8 minutes to read

This article covers some information that can help perfect a Gentoo installation on Windows Subsystem for Linux (WSL) to maximize its performance, improve its interoperability with Windows, and even unlock new system capabilities. Originally, I had been planning to write a full Gentoo on WSL installation tutorial during September of the last year, but that tutorial was only halfway done before I had to move on for something more important in my real life, which is why I have disappeared from my personal site for almost another half of year (though you could find my development activities on GitHub if you looked at my profile). …

Properly Handling Process Output When Using Java’s ProcessBuilder

16 minutes to read

Another mysterious disappearance of me from my personal website has happened after the previous one in last November. The reason is the same: I had been quite busy. But unlike last time, I do not think that the things which kept me busy in the past month were futile. I spent significant amount of time helping students in a software engineering course for which I was a teaching assistant, and assisting others is always a meaningful activity in my opinion, regardless of the type of assistance being offered, the context, the recipient of the assistance, or the form. …

Gentoo Configuration Guide: systemd

Updated: 5 minutes to read

As of now, the Gentoo Handbook, which is the official Gentoo installation guide, mainly focuses on steps to install a system based on OpenRC instead of systemd. After all, as a project mainly maintained by Gentoo developers, it would be a surprise if Gentoo did not introduce OpenRC as the distribution’s init system with primary support. For people who want to use systemd on Gentoo, the Handbook does include some instructions in itself, but it sometimes asks the users to refer to the standalone systemd article too. …

Gentoo Configuration Guide: GNOME on systemd

Updated: 5 minutes to read

Getting a perfect GNOME configuration on Gentoo is not hard but is tricky. In other words, it would be a piece of cake once you have done it, but it is not easy to get it right with only one shot for the first time. The GNOME Guide on Gentoo Wiki is a good resource and is enough for a barely functional GNOME installation, but there are plenty of rooms for improvements, like removing the authentication dialog when modifying network settings, and enabling Wayland screen sharing in web browsers like Google Chrome. …

A Patchy System – Applying Patches with Portage to Fix Upstream Bugs

12 minutes to read

For many free software projects, there is usually some delay between the initial annoucement of a bug fix or an enhancement and the moment when you finally get the software update that ships it. As a user, you need to wait for the patch to get reviewed and accepted by the project, wait for the change to be tested and integrated, wait for the new version containing the change to be released by the upstream, and finally, wait for your distribution to ship the new release. …

Create a CPU Frequency and Temperature Monitoring Bash Script for Linux-based Systems

4 minutes to read

This post will show you a way to monitor CPU frequency and temperature on Linux-based systems without aid of any programs or packages that are not commonly preinstalled on major GNU/Linux distributions. No extra hardware drivers are required: the magic is done merely by a short Bash script in just a few lines that only relies on mechanisms provided by the Linux kernel itself and some most essential Unix commands. …

My Gentoo Hands-on Experience

Updated: 14 minutes to read

It has been six weeks since I published the last post on this site. Myriad new topics and ideas to write about have accumulated in my drafts for new articles, but I was too busy to find enough time for converting them into high-quality articles I have been endeavored to deliver. Now, as I finally have got some free time, I want to talk about one of the things I did during the past period: trying out Gentoo, a source-based GNU/Linux distribution famous for letting its users compile almost every component of the operating system, including the Linux kernel. …

Use Btrfs on Fedora Installed from a Raw Image

8 minutes to read

Fedora is moving to Btrfs for its default file system on its “desktop variants” in Fedora 33. This change is welcomed by some users because of some benefits Btrfs is offering. Other Fedora variants still default to ext4, although users may elect to use Btrfs during system installation with the Anaconda installer. But for non-desktop-variant raw image distributions like the Minimal aarch64 image, you do not have the chance to choose a file system other than ext4, because you are applying the image directly instead of using Anaconda. …

Perform Manual dnf history undo

8 minutes to read

My choices of GNU/Linux distributions are Fedora for desktop computers and CentOS for servers. Both of them feature DNF - Red Hat’s package manager front-end for RPM, which is the primary reason I use these distributions. Although one might argue that it is slow, DNF is very clear on not only what it will do for an action but also what it has done: it maintains a history of package installation and removal operations, which are called “transactions”. …

Install Raspberry Pi’s vcgencmd on Fedora

Updated: 5 minutes to read

This post is a continuation of my previous one about setting up a cluster of Raspberry Pis running Fedora. After I got the cluster to compute something, @ColsonXu, the cluster’s owner, asked me if I could monitor the CPU temperature of each Raspberry Pi by running this command: $ /opt/vc/bin/vcgencmd measure_temp The vcgencmd program is included in Raspberry Pi OS (formerly called Raspbian) as a utility for retrieving information about Raspberry Pi’s hardware. …

Set Up Fedora on a Raspberry Pi Cluster

14 minutes to read

First and foremost, I would like to thank @ColsonXu for giving me this opportunity to play with some Raspberry Pis. He had got a few Raspberry Pi 4’s and built a cluster with them for computing purposes, but there was nothing to compute until the morning when @mrdarcychen found an article about running Rosetta@home on Raspberry Pi from Fedora Magazine, and Colson approved the plan. I was able to take the job of installing software required to run Rosetta@home on the Raspberry Pis. …

Use grep as a Substitute for cat

4 minutes to read

I came across a fascinating and educative article, Unix Recovery Legend, when someone posted a link to it on Reddit. The article presents a story of the writer, Mario Wolczko, and some other colleagues attempting to recover a system partially destructed by rm -rf /. The rm command was interrupted before it scraped off directories like /usr, but it was too late to save /bin, /dev and /etc, which were respectively the directory for basic executable programs, device files, and system configuration files. …