Back to posts

mkswap - A message to the kernel

mkswap began as a curiosity. I have used Linux as a daily driver or the other side of a dual boot for over 6 years, with most of those years being on Arch Linux. In those days, Arch was already a great experience, but it lacked the polish that comes from popularity. It had limited AUR helpers, no archinstall and lacked various small QOL changes. For example, if you forgot to update for a few weeks (which, at least on a dual boot machine, is not inconceivable), the package manager keyring would expire, and your updates would fail until you manually upgraded the keyring. Now pacman automagically detects this and upgrades the keyring first, rendering my upgrade script that always checked for keyring upgrades obsolete.
 
The real problems however, were much more serious. Serious dependency mismatches and driver issues, which led me to reinstall arch quite a few times. Each time I always wondered at the mk- prefixed tools, mkfs and mkswap. They magically marked the blocks of solid state storage chips into the correct form so that the kernel knows what its dealing with and gives me no trouble.

An example http server using tserve

mkswap was a long and exciting learning experience. Now that it works on ext4 and btrfs, I might wait until ZFS or bcachefs becomes the mainstream before I begin figuring out their quirks and adding support for them in rsmkswap.