I wanted another computer as a sandbox, I don't really trust VMS, and fucking ch...
Ryan Castellucci (they/them) :nonbinary_flag: 🔜 40C3 @ryanc@infosec.exchange
I wanted another computer as a sandbox, I don't really trust VMS, and fucking chip shortages, so to the boneyard it is. I have a disused ASRock Rack J1900D2Y with 8GB of RAM and a PicoPSU that used to be my mail server. Somehow, at some point, I modded the 1U case to mount the rack ears on the back. Annoying. So I dig up the original rack ears which I apparently still have, and try to flip things around, except the drive tray doesn't work the other way around somehow. What. Fine. I have a drill and a file. Sorted. While I'm at it, I splice an INA219 current sensor into the power connection for funzies and hook it up to the BMC's I2C bus. I then root the BMC so I can access it. So then I set about setting up Debian on it on a mirrored pair of Intel enterprise SSDs with encrypted ZFS. The board claims to support UEFI booting. This was determined to be a lie. Whatever. A problem for later. I put GRML (which is my new favorite rescue "CD" since it also has aarch64 builds available) on a flash drive, remove the case from the false drive, solder it to a motherboard header cable, and plug it into the internal USB hub I at some point added to the case. Boots fine, but only as a BIOS drive. I do a manual ZFS setup and debootstrap install, then I fuck around with GRUB for... a while... and eventually get it working on a system partition I've set up mirrored with mdadm (metadata v1.0 - at the end of the partition). Then comes the part where I get ZFSBootMenu working with SSH unlock. ZFSBootMenu is intended to boot via UEFI, but as I said, that doesn't work, but that's what GRUB is - I can chainload. Eventually that works, but I cannot manage to type the passphrase via the janky BMC's Java IPKVM. Fine. I have a file server I already set up SSH unlock with, but that means I'll have to build my own ZFSBootMenu files. After a while, I finally get that working, only to be immediately prompted for the passphrase a second time (on the screen, via the IPKVM, where I keep failing to type it, and it takes abour 90 seconds to check because I cranked up pbkdf2 iterations) when Debian starts. Right, need to bake the key into the encrypted initramfs that ZFSBootMenu loads. More chroot bullshit. I get that working, and Debian shits a brick and drops into a root shell because it can't find /sbin/init. Apparently I needed to install systemd-sysv for that. So I sigh, boot back into the GRML environment, mount the chroot for the fifteenth time, run the apt install, and rebuild the initramfs. I unmount everything, cross my fingers, and type reboot. The janky Java IPKVM refreshes. BIOS POSTs. GRUB chainloads ZFSBootMenu. The SSH unlock actually works perfectly. The boot process finally gets past the init stage, and a beautiful flood of green [ OK ] messages starts cascading down the screen. The login prompt finally appears. I go to type my username, but the BMC drops the connection again. I frantically reload the applet, but instead of the console, the screen glitches out, showing a live camera feed of my street just as a yellow car pulls up outside. I whistled for a cab and when it came near, the license plate said 'Fresh' and it had dice in the mirror. If anything I could say that this cab was rare, but I thought 'Nah, forget it, yo, holmes, to Bel-Air!' I pulled up to the house about seven or eight, and I yelled to the cabbie, 'Yo holmes, smell ya later!' I looked at my domain, I was finally there, to sit on my throne as the Heir of Bel-Air.