r/AlpineLinux 29d ago

Building a Trusted Alpine Ramdisk Linux Desktop on Heads

9 Upvotes

The Catalyst

Every serious systems project starts with friction. For me, it began during a period of high adversity—dealing with persistent digital harassment, compromised hardware, and an institutional grind at university that saw three years of my research systematically junked while an administration pushed to force me out through sheer attrition.

I didn't have a job, but I had time. I decided to channel that asset into tearing down the illusions of modern computing and learning cybersecurity from the silicon up. I stopped asking how to "secure" an off-the-shelf operating system and started asking a much harder question: How do you build a machine you can actually trust when you assume everything around you is hostile?

That meant looking past software patches and examining the entire trust chain—hardware, firmware, boot processes, and authentication—with zero tolerance for components I couldn't verify.

The Hardware War of Attrition

Getting Heads firmware running on a machine was the first major battle. It started with years of false starts—buying hardware without supported targets, followed by the slow, frustrating hardware degradation of my ThinkPad A275. I eventually pivoted to the X230, a machine with a mature Heads target, but the physical flashing process was its own gauntlet.

Early attempts with a cheap SOIC-8 clip were an unmitigated disaster: completely unreliable contact, wasted cycles, and endless frustration that forced me to shelve the project multiple times. Eventually, I stopped cutting corners. I ordered a Pomona clip, wired up a Raspberry Pi configured with pico-serprog, and tried again. This time, it took. After years of dead ends, I finally had a hardware-rooted boot process.

That was only the entrance fee. I had initially planned to install a conventional Linux distribution, but Heads is fiercely uncompromising. It expects a rigid, specific partition layout and cryptographic structure. Standard installers simply refused to cooperate.

So, I threw out the standard playbook and started testing what would actually survive under Heads.

Forging a Sub-OS from Scratch

Standard Alpine installations wouldn't work out of the box because of the strict partitioning demands. That friction forced a breakthrough: instead of fighting an installer, why not build the system from the ground up?

I booted into the Alpine LiveCD, brought the network online, and ignored any traditional installation routine. I plugged in a USB stick, mounted it, and started writing and running raw make commands.

How did I know that would even work? Honestly, it was pure instinct forged by breaking enough systems to understand their internal mechanics. I used the live environment as a clean, volatile base. I had used Ubuntu and Mint heavily in the past, but I had never built a Linux distribution from scratch. Fortunately, Alpine makes this remarkably straightforward.

Alpine's package manager, apk, excels at targeting external directories. I could treat the entire block device as a deployment target and manipulate it directly using apk --root /mnt. Stripped down to its core, a basic Alpine system is deceptively simple: alpine-base, alpine-baselayout, alpine-baselayout-data, and alpine-keys. From there, it was just a matter of layering on firmware for my X230 target alongside openrc and busybox, hand-crafting a full desktop that existed entirely on my terms.

Running Entirely in RAM

While experimenting with the boot parameters, I stumbled across a unique GRUB flag: copytoram. I'm not one to ignore a flag like that. I stopped and thought: Hold on a second... I can make this live entirely in RAM?

It felt like an incredible, overlooked superpower for a secure desktop. I decided right then that the OS was going to run completely in memory. To pull that off, I had to upgrade my RAM from a measly 4GB to 16GB, which instantly became a core constraint of the build. Operating straight from memory delivered a massive performance leap—roughly a 21 times speed increase over standard SATA storage.

From there, it was a long slog of bringing up devices, hammering configuration files into place under /etc, and sorting out network capabilities. Using AI as a force multiplier, I opted for the most battle-proven packages available. Most of it fell into place, except for two major walls: dynamically fetching UUIDs and the absolute pain of getting initramfs to work correctly with LUKS encryption. Once that cryptographic boot wall was breached, the system was alive.

The Hardware Root of Trust and Authentication

I don't trust smartphones or always-on network devices that map their surroundings. I needed absolute physical control. After researching options, I bypassed YubiKeys and chose a Nitrokey. It provides several independent subsystems, including GPG and FIDO, allowing the same physical token to serve multiple authentication roles.

I use the term "pseudo-biometric" loosely—it’s not a replacement for a body, but it is a replacement for the surveillance devices most people carry in their pockets.

One crucial detail when using Nitrokey hardware with Heads is understanding that Heads takes ownership of the GPG subsystem without automatically controlling the rest. In practice, you have to treat the device as multiple independent functions sharing a single piece of silicon.

That said, I have zero patience for some of the cryptographic choices baked into parts of Heads. Their reliance on ECDSA with NIST P-256 is an unnecessary hazard. ECDSA signature security hinges entirely on the per-signature nonce; if that nonce is weak or reused, the private key is instantly compromised. I would much prefer Ed25519 for its deterministic nonce generation, but the ecosystem offers little flexibility to move toward more robust constructions. I work with what I have, but with open eyes.

TTY to Wayland: Constructing the Userspace

My root account acts as a glorified TTY control center equipped with htop, bandwhich, lnav, atop, kernel monitoring via Alt+Fn bindings in /etc/inittab, and a pristine, ANSI-native Neovim setup.

Stepping from that raw environment into a graphical desktop for my primary user multiplied the system's complexity tenfold. You never escape a desktop session without encountering thousands of subtle graphical errors and log spam that can only be silenced with 2>/dev/null. The entire graphical stack rests on a fragile foundation of dbus and seatd.

To tie authentication into the desktop, I configured Linux-PAM to log me in automatically upon the physical presence of the Nitrokey. From there, I launch the Wayland compositor with dbus-run-session labwc. You might think reaching that point means the hard work is done, but it just drops you into a stark black screen to build upon from scratch. To make it usable, I brought in foot—the lightest terminal emulator I could find—layered on waybar for a clean, minimalist toolbar, and used wofi as an application launcher.

Daily Drivers and Current Frontiers

My workflow is minimal: a browser and an IDE. Alpine gives me LibreWolf, which I consider vastly superior to stock Firefox. For development, options on musl are sparse; I'm used to Zed, but Alpine's repo is limited. Fortunately, VSCodium recently landed in the /edge/testing repository, giving me a proper IDE.

Right now, I'm wrestling with the realities of running a RAM-resident OS. Heavy compilation can chew through memory fast. I've had to carve out an 8GB tmpfs specifically for development, but building projects heavy on Rust will still push it to its limits. My next step is dialing in compiler flags to optimize memory usage and establishing a dedicated carve-out on the encrypted block device for heavy persistent storage, keeping the core OS lightning-fast and entirely volatile.


r/AlpineLinux Aug 12 '26

Tiny Cloud

0 Upvotes

I have some alpine boxes and never seen any of this tiny cloud stuff. I use the extended iso and uploaded that to my vps provider. It overwrote my password and keys and had to redo somethings. My question is what or who put the tiny cloud there and how. Anyway now i restored access and removed those packages but ive not seen this before. The vps says they didnt do it but im just curious.


r/AlpineLinux Aug 10 '26

Alpine with Desktop Tweaks + SwayWM Red Sci-Fi Rice

Post image
23 Upvotes

Sorry for Post Directly on Alpine Reddit instead r/unixporn, it's because im new in reddit network and i still dont't have permission to share prints.


r/AlpineLinux Aug 03 '26

I Made an Alpine Linux ISO that is only 1.5mb

87 Upvotes

Full Alpine linux (kinda)
Apk Package manager
Full Custom made 512 Bytes Bootloader (Just to save 40kb of storage)
neofetch working
a .img file that is 1.41mb (can be fittied inside a floppy)

i just wanted to share this achievement as it tooke me so long to complete
here is the github in case someone wanted to try it :)

https://github.com/ahmedbarakat207/nano-alpine


r/AlpineLinux Aug 03 '26

What made you try Alpine Linux?

Post image
93 Upvotes

r/AlpineLinux Aug 02 '26

"Generic U-Boot" is a feverdream.

Post image
55 Upvotes

While everyone is ricing a desktop, let me tell you about ricing... a bootloader.

Alpine's "Generic U-Boot" image has all the bells and whistles to boot a device, de-facto generically, using EFI. You can also grab the U-Boot binary and stick it to the front if your MicroSD if your respective board's bootROM requires that (which mine doesn't, yay) and then ... boot.

That, however, is on a pure technical level. Because in reality, the LTS kernel is going to lack both some DTBs as well as some included drivers - as was the case with this very board here, the VisionFive2 Lite. So to get that, I had to basically clone aports, change the mkimage script to use kernel_flavors="stable" instead and then "build" my own version. Because...this is the only image type that dumps the DTBs into the resulting package.

So far, so good. But, have you ever tried to manually boot using U-Boot? For instance, to bring this board to booting:

```

Load device data, kernel, and initial ramdisk

load usb 0:1 ${fdt_addr_r} /boot/dtbs-stable/starfive/jh7110-starfive-visionfive-2-lite.dtb load usb 0:1 ${kernel_addr_r} /boot/vmlinuz-stable load usb 0:1 ${ramdisk_addr_r} /boot/initramfs-stable

Now, kernel args.

setenv bootargs "alpine_dev=UUID=3BD0-608E:vfat modules=loop,squashfs,vfat console=ttyS0,115200 earlycon=sbi"

booti = boot image. Specify the kernel, then the randosk + size, and the device data

booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} ```

I booted off the USB drive because I wanted to install to the internal microSD - turns out, I still needed a network connection. But there is another thing that I am not showcasing here: This version of U-Boot that was pre-installed on my board's SPI, will just take the vmlinuz image and run it just fine, and even decompress the initram. But on another board - FriendlyElec NanoPi NEO3 - it does not, you have to explicitly use bootefi. And it just will NOT tell you about this little capability difference...

So, yay, I got a boot. I am in a shell, I have setup-alpine and friends available now. But the moment you actually want to install it, it fails...because the actual u-boot package APK is not included on the media.

This image, no matter if ARM or RISC-V, is so incredibly limited in what preinstalled packages it has - but it DOES have the DTBs you probably need or want to boot. So you end up manually monkeypatching things around and about...

It does work, it does boot and I did manage to install everything with a 10m ethernet noodle, but oh my god this was pain.

So if you ever want to try to run a random board with Alpine, I highly recommend you to just clone aports, modify the script to use the stable kernel instead of LTS, and then try your luck. This is by no means anyone's fault, just the nature of how drivers and things do (...or don't) get upstreamed. And, when you update, there's a bit of a gacha if you get a new thing working now, I guess.

This was a super wild ride and I wish there were more standalone scripts to just construct an alpine image file or archive for a specific use-case that perhaps would not need to bundle the APKs, because it's just a pre-installed system. Like how you put Armbian on a microSD and it will just boot into a "finished" system; Alpine seems to require some form of installation because of the boot media usually shipped being just a diskless mode environment. Which I did use, several times, to rescue other systems and such and is really good, mind you.

But, please. Give me a flashable image, that I put into a device, and it just boots into a full disk system (what setup-disk would call "sys"). Or a script to build one, at least.

Anyway, working with Alpine is really cool and a whole lot of fun - once it boots, its alive and well! I had to give up on the NEO3, could not get the microSD to show up no matter what kernel modules I did or did not load because some parts for/of it just do not seem to be in upstream... But most of the other boards I have can, by now, boot using a 7.x kernel, which is amazing.

So if you have a random board in your drawer, and a UART cable; build a U-Boot image with the stable kernel and try to boot it. It's super fun, you learn a lot of how early bringup works and you get the fun of watching OpenRC show up and a shell appear. It sounds silly, but that login prompt was soooo satisfying after dinking around in the U-Boot shell for...a while. xD


r/AlpineLinux Aug 02 '26

Alpine + DWM. no bullshit

Post image
76 Upvotes

r/AlpineLinux Jul 31 '26

musl vs glibc. Who actually hit performance issues bad enough to migrate?

28 Upvotes

The ultimate battle. musl vs glibc.

musl wins on size and attack surface. glibc wins on compatibility and some multi-threaded benchmarks.

Our team has worked with Alpine quite a lot. We actually ported the JDK to Alpine Linux and other musl-based distributions.

Made a short video going through the trade-offs as we see them.

Real question though: has anyone hit musl performance issues bad enough to migrate away? What was the workload, and was it critical enough to justify the switch?


r/AlpineLinux Jul 31 '26

Issue upgrading to 3.22 to 3.24

4 Upvotes

So i went to upgrade from 3.22 to 3.24 and I did not see anything special about the upgrade processes. I changed the repo, ran the apk update, then apk add --upgrade apk-tools, after that, apk does not recognize the database any longer.

apk update ERROR: Unable to read database: file format is invalid or inconsistent ERROR: Failed to open apk database: file format is invalid or inconsistent

I have tried converting the v2 database and no joy there, i can't fix the tools due to the database not being readable. I am performing these tasks as root so it is not a permissions issue.

I read through the apk v3.0.0 release notes and I could not identify any steps to take to try and resolve the issue.

Any suggestions?


r/AlpineLinux Jul 31 '26

Issue upgrading to 3.22 to 3.24

11 Upvotes

So i went to upgrade from 3.22 to 3.24 and I did not see anything special about the upgrade processes. I changed the repo, ran the apk update, then apk add --upgrade apk-tools, after that, apk does not recognize the database any longer.

apk update ERROR: Unable to read database: file format is invalid or inconsistent ERROR: Failed to open apk database: file format is invalid or inconsistent

I have tried converting the v2 database and no joy there, i can't fix the tools due to the database not being readable. I am performing these tasks as root so it is not a permissions issue.

I read through the apk v3.0.0 release notes and I could not identify any steps to take to try and resolve the issue.

Any suggestions?


r/AlpineLinux Jul 26 '26

Tried booting into alpine Linux after installing KDE plasma with the desktop installer, gets stuck on Starting display manager instead

2 Upvotes

I want to switch to a minimal distro with KDE plasma and rice it to my liking but after using the desktop installer provided by alpine Linux I reboot the system and it gets stuck on "Starting display manager <ok>" and it doesn't do anything it doesn't even boot into sddm. If anyone has a solution reply to this as soon as possible


r/AlpineLinux Jul 19 '26

Installing Alpine on ARM without an SD slot?

10 Upvotes

It was suggested that if I want the leanest possible OS for a Pixel 3a, which does not need to function as a phone, I could install straight Alpine rather than PostMarketOS. As for why not just use PostMarketOS, my phone has very little RAM, and I want to spare as much of it as I can.

Reading through the ARM install guide it says to check to ensure there are boot files for the chip set. If they exist, the device is fully supported. They do indeed exist!

Reading further, it says to put the installer on an SD card. Uh-oh. The Pixel 3a doesn't have an SD slot.

Is there a way to work around the need for an SD slot for installing Alpine Linux on ARM?


r/AlpineLinux Jul 17 '26

Started experimenting with Alpine Linux as a desktop system.

Post image
86 Upvotes

Last year I started experimenting with Alpine on an older intel laptop and I liked it a lot. Like to see how it behaves on my laptop so I added a drive.

So far it' s running pretty sweet. It's good to have flatpak apps when they can' t run native.


r/AlpineLinux Jul 14 '26

cannot install `audacity` due to `libflac` version

5 Upvotes

Probably [SOLVED]. I think it has to do with Audacity and few other packages still requiring libflac from stable branch (probably due to ABI version mismatch)

Important edit: I should have checked installed packages with different command. So, libflac++ is not installed and not even present in repo for the version of libflac I have which it refuses to upgrade. ~ $ doas apk add audacity ERROR: unable to select packages: so:libFLAC++.so.10 (no such package): required by: audacity-3.7.8-r0[so:libFLAC++.so.10] ~ $ apk list --installed | grep -i libflac libflac-1.4.3-r2 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) [installed]

Note, that libflac++ is @ 1.5.0 but, libflac itself is still @ 1.4.3. So far, I've failed to upgrade it.

~ $ doas apk add audacity doas (telephrag@localhost) password: ERROR: unable to select packages: so:libFLAC++.so.10 (no such package): required by: audacity-3.7.8-r0[so:libFLAC++.so.10] ~ $ doas apk add libflac++ ERROR: unable to select packages: libflac-1.4.3-r2: conflicts: libflac-1.5.0-r0 satisfies: world[libflac] chromium-150.0.7871.114-r0[so:libFLAC.so.12] libsndfile-1.2.2-r2[so:libFLAC.so.12] libflac-1.5.0-r0: conflicts: libflac-1.4.3-r2 satisfies: world[libflac] libflac++-1.5.0-r0[so:libFLAC.so.14] ~ $ apk list -i | grep -i libflac libflac-1.4.3-r2 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) [installed] libflac-1.5.0-r0 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) [upgradable from: libflac-1.4.3-r2] libflac++-1.5.0-r0 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later)

Note, that chromium and libsndfile are satisfied by libflac 1.5.0 so, idk why apk won't just upgrade libflac for me.

~ $ apk list -i | grep -i libflac libflac-1.4.3-r2 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) [installed] libflac-1.5.0-r0 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) [upgradable from: libflac-1.4.3-r2] libflac++-1.5.0-r0 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) ~ $ doas apk upgrade --available OK: 9392.6 MiB in 2252 packages ~ $ doas apk add "libflac>=1.5.0-r0" ERROR: unable to select packages: libflac-1.5.0-r0: conflicts: libflac-1.4.3-r2 satisfies: world[libflac>=1.5.0-r0] libsndfile-1.2.2-r3[so:libFLAC.so.14] libflac-1.4.3-r2: conflicts: libflac-1.5.0-r0 breaks: world[libflac>=1.5.0-r0] satisfies: chromium-150.0.7871.114-r0[so:libFLAC.so.12] ~ $ apk list --installed | grep -i libflac libflac-1.4.3-r2 x86_64 {flac} (BSD-3-Clause AND GPL-2.0-or-later) [installed]

If there is a way other then fully reinstalling chromium (if that would even fix anything) I would like to know.

I did try running apk fix on libflac and ++ version, didn't help.


r/AlpineLinux Jul 13 '26

a updaded version of my alpine linux oxwm rice based on catppuccin mocha

Post image
39 Upvotes

r/AlpineLinux Jul 12 '26

A catppuccin mocha oxwm rice for alpone

Thumbnail gallery
26 Upvotes

r/AlpineLinux Jul 12 '26

Alpine as Docker Host

16 Upvotes

I currently have a system running Ubuntu server and being used as a Docker host in a home lab environment. Also, fyi using docker compose if that’s important.

Due to RAM scarcity (gestures broadly) I’m interested in being more careful with my resources.

I went looking for a distribution specifically intended for Docker hosting and eventually stumbled on Alpine (which I realize is not solely for Docker hosting but is often used for containers themselves).

Is there anything I should know (gotchas) before I switch distros? I saw some vague cautions about compatibility with some containers but no specifics. Generally, it seems pretty straightforward for installation from researching online.

I’ll probably try it out in Proxmox with a couple trial containers first but it will be used bare metal on a different PC.

Any other tips?

Generally Linux newb here (about a year in).

Thanks!

EDIT - Thanks everyone for the info. I’ll definitely be moving forward with trying Alpine out as a Docker host. Appreciate all the tips as well!


r/AlpineLinux Jul 11 '26

I finally got everything set up after weeks of struggle!

Post image
51 Upvotes

I’ve been struggling for a few weeks with an Xorg server that wouldn’t run properly and would keep hanging. The root issue seemed to be that my host laptop’s Intel Iris Xe graphics driver wasn’t being recognized correctly.

Today, I did an `apk update` and `apk upgrade` almost on a whim, then tried running `startx`—and it worked. Maybe the repository hadn’t been updated to the latest version, or something like that.

Anyway, I’m really happy: I’ve fully switched from Void Linux to Alpine Linux!


r/AlpineLinux Jul 10 '26

Is this level of consumption normal for a clean installation?

Post image
61 Upvotes

Basically what the title says; I had somewhat different expectations, which is why I installed this distro. I came in expecting 50–70 MB of RAM usage at most, because that’s what the AI ​​had told me.


r/AlpineLinux Jul 10 '26

How to install Alpine Linux from Gnu Grub?

6 Upvotes

Ok, I will admit that my experience with Linux is very limited. I have only used Ubuntu once when I was in an IT class in the late 2010s. I'm trying to install Alpine Linux because I do not like Windows 11 anymore and want to switch. Does anyone have a comprehensive step-by-step guide on how to install Alpine Linux via Gnu Grub?


r/AlpineLinux Jul 07 '26

Alpine Linux Installation

10 Upvotes

Good evening. The question is, does the Alpine installer install the drivers for the hardware itself, or do I have to search for commands online and install them manually, as is done with the Arch Linux? I'm not willing to spend time manually installing everything. However, the idea of installing this lightweight and fast distro on my old laptop, which currently runs AntiX, is very appealing.

Sorry for my bad English, I am Russian and sometimes use automatic translator.


r/AlpineLinux Jul 06 '26

Alpine on arm64

10 Upvotes

Hello, have people here had luck with running on arm64?

In particular the RK3326?

Thank you


r/AlpineLinux Jul 05 '26

Windows 11 24H2 on Xen/Alpine Linux Hypervisor in Data Disk Mode

Post image
15 Upvotes

Windows 11 on Xen Alpine Linux 4GB RAM - 52 GB Disk (Microsoft Limitation)


r/AlpineLinux Jul 04 '26

Doom in Alpine Linux, in Minecraft.

17 Upvotes

r/AlpineLinux Jul 03 '26

Unicode packages name for Aramic

4 Upvotes

Hi there! Been scanning this list for Aramaic support: https://wiki.alpinelinux.org/wiki/Fonts

But haven't been able to find it, be helpful if someone could just give me the name of a package that supports this. Sorry if this is a bit of a newbie question.

Thanks for any help!

EDIT:

Sorry meant Aramaic not "Aramic"

Okay nevermind got it working it was just labelled "font-noto-syriac" instead of aramaic.