Technology

Gentoo with EFIStub, encrypted BTRFS, swap, dracut or genkernel initramfs, open-rc.

Posted on by AJ Ianozi

Hello! It’s been a while since I wrote a post; life has been busy I’m working on a better blog management system and I finally got a desktop! Hopefully more updates to come both here and on Seldom.Travel! Stay tuned for more updates.

Also, I must apologize for the lack of wrapping on this blog entry. This blog will be 11 years old next month, and I plan on updating the theme soon. Please bear with me.

Recently, I built a Gentoo system with an efistub (no bootloader) and ZFS natively-encrypted rootfs. It was great until I ran into a bug on kernels below 5.14 where the zfs system would get currupted. OpenZFS’s answer was “Update to 5.14” (apparently Gentoo’s stable was 5.10), and if I’m updating out of whatever is stable I’m going all the way and trying 5.15… which isn’t supported yet for ZFS. Result? I scrapped the whole thing and decided to just use btrfs!

This is heavily inspired by this post (shout out to William for putting that together) except I plan on using btrfs with zlib compression instead of ext4, I plan on having a module-free kernel, I want an encrypted swap partition, and we can no longer use eudev (because they’re retiring it). I also don’t want to use lvm, it’s just another layer of complexity that I don’t need, and I’ll be showing how to use dracut as well as genkernel depending on the route you wanted to go. We’ll be extracting the resulting initramfs, and building it into the kernel. (Read more)

Push notifications on linux with cronjobs and smartmontools

Posted on by AJ Ianozi

Up until very recently, I was having smartmontools (and other cron processes such as backups) email me when a hard drive was failing. For some reason my already-finicky mail-forwarding setup ended up failing and I couldn’t get it to consistently send again, so I thought to myself: What other ways can I have my server notify me in an obvious way? The answer was Push Notifications!

Now, I wouldn’t attest to knowing the details behind post-notifications; my quest was for a quick and easy solution for Android: Simplepush.io.

Pros of Simplepush:

  • Super easy to set up
  • “Just works”
  • Supports end-to-end encryption
  • Works for android

Cons:

  • Costs $4 $10/yr
  • Doesn’t seem to work for iOS (works for iOS now)
  • Isn’t a self-hosted solution, if that matters to you.

I did find a free solution that would also work with iOS using Telegram, and maybe I’ll do that if simplepush.io ever disappears: Telegram API: Send Message – Personal Notification Bot

Anyway, let’s get into how I did this! (Read more)

Backups with rsnapshot and SSH

Posted on by AJ Ianozi

This is a simple schema on how I configure backups over SSH between my various servers. The howto on this stuff can be found all over the web, I’m mostly consolidating it here for my own records, in case I want to do it again later. Big thanks to a few guides on helping me put this together, if you’d like some further reading:

All devices in question run Gentoo, but this should work on anything with rsnapshot and openssh. (Read more)

Dynamic DNS with Cloudflare, ddclient, and DNS-O-Matic (with Multiple Domains)

Posted on by AJ Ianozi

It’s been a very long time since I’ve updated this blog. For a while I’ve kept a separate one, AJfox.us, but the home server I’ve been using to host it failed about a year ago. I will be getting AJfox back up and running at some point, or I’ll port the posts to this site, I haven’t decided yet.

Anyway, this topic is about how to configure dynamic DNS with Cloudflare, using DNS-O-Matic and ddclient.

Reason for this post

There were plenty of guides on getting Dynamic DNS up and running with cloudflare, and one or two with DNS-O-Matic, but absolutely none for multiple domains. If you’ve found this guide by a google search, I’m assuming you already know at least what Dynamic DNS and Cloudflare are, if not you can check out the basics here: Replacing DynDNS with CloudFlare DDNS

I was trying to set up an easy way to set the DNS for multiple domains (e.g. ianozi.com and ajfox.us), which doesn’t seem to be covered anywhere online.

What is DNS-O-Matic?

To answer this question, let me quote someone who explains it better than I:

DNS-O-Matic is a service from OpenDNS for distributing dynamic DNS updates to supported authoritative DNS services. Cloudflare is one of the supported services. Source: Using DNS-O-Matic dynamic DNS updates with Cloudflare

And what is ddclient?

ddclient is a daemon that periodically updates your DNS information to a Dynamic DNS service. I’ve seen plenty of guides where people have been trying to get it working with Cloudflare, but it apparently requires patching the standard version to get it working correctly, I wasn’t able to.

Instead, I set up ddclient to sync with DNS-O-Matic, and then set DNS-O-Matic to sync with Cloudflare.

With that out of the way, let’s get down to business! (Read more)