Adventures in Creating a Minimal Alpine Linux Installer
bt.ht
bt.ht
My favorite feature (the killer feature) of Alpine is that rootfs is not persistent. Persistent storage actually only contains the base system itself and each package you install. On startup, the system is loaded into a tmpfs and all your packages are loaded on top of it. I've successfully created a desktop install using this method, it boots off a USB stick and the only persistent partition is /home. I find the cleanliness of this extremely impressive.
IIRC, it only works this way if you don't use the official installer, which wants to make a persistent rootfs. I feel like Alpine has shown me "true level" [0] and I feel dirty using any distro with a persistent rootfs... in fact it's the single largest reason why I haven't felt motivated to try Linux in a while (aside from KISS since it was interesting enough).
There are no other distros like this, so the fact that it uses musl is a little disappointing if I want to use it as a desktop (which I know it's not designed for).
NixOS comes close, but is fully declarative and I don't really want to learn a new DSL today. I should probably just settle and go with Arch or something.
Boot off of something (eg, usb drive), it loads the first layer (ro) into tmpfs, then the 2nd-X layers (also ro) over that, and finally a read/write layer of your saves (/home, config changes under /etc, ...), remove boot medium, eventually do a save to some medium.
which redirects to
That being said, flatseal is amazing, and I wish I could use it for everything. If this is the first time you're hearing about flatseal, check it out! It's a dashboard or control-center for each app you've installed via flatpak, and it features granular control as far as what facilities and resources that specific program can access on your machine.
Flatpaks don't use any shared libraries, that's why. Every app has its own copy of everything, including glibc. That's why flatpak can be used to run glibc apps on MUSL distributions like Alpine.
OSTree is absolutely awesome, and for me it definitely seems to fill a niche between total anarchy and total NixOS. I could just rebase into Kinoite from my existing Silverblue installation, and then boot right back into Silverblue once I was done trying it.
I gotta say, GNOME (Silverblue) was a much better experience for me than KDE Plasma (Kinoite), even though it's Wayland. I'm not sure why I remembered Plasma so fondly, but it looks terrible on my 4K display and has all sorts of issues. The last I had used it was in 2017 on a 1080p screen, so maybe my standards were just low back then, but GNOME has definitely spoiled me, especially with how great its trackpad support is.
Additionally, getting Nvidia acceleration on my cheap laptop was darn simple, just install a single package and add a few kargs and boom.
Silverblue feels like it has a lot of the same benefits as Alpine without any of the downsides, although the layered packages have to be compiled into an image before they can be used, instead of being applied at boot time. It's only one command, but it takes quite some time on my hexa-core i7-10750H - maybe it'd be faster if I were running it off my internal NVMe SSD.
I feel like if I were to switch to Linux desktop it would probably be Silverblue. It's just really good and I'm glad I finally got around to trying it.
I personally found it difficult to get Nvidia drivers & Steam working. The latter worked with flatpaks, but Nvidia is always annoying.
Yes. You may laugh at me for trying to use Linux on a computer that was not built for it.
Without shared linking, in your example you end up with a copy of glibc and whatever else in every process. Without some fancy page deduplication scheme (that would come with its own set of problems), the kernel cannot know that all these pages in all these processes are the same. And they might not even be, because different versions and just the process of static linking itself might make an arbitrary number of them look slightly different.
Not every program needs all of glibc, so not all of it will be paged in, but still, it looks like you will pollute your CPU caches with many copies of essentially the same thing.
I thought about whether there was some quick evidence already, but nothing comes to mind (maybe someone's less blind to it than me now).
Maybe you could take some self-building Linux distribution like Gentoo, and hack it such that it links everything statically? Compare that against an equivalent unhacked Gentoo-installation by doing a few tasks, measuring wall clock for a good first estimate?
No idea how hard that would be in practice, especially with people mentioning that glibc does not really support that. So maybe it's actually easier with one of the BSDs, e.g. OpenBSD, which is also feasible to build completely from source because it is very self-contained, depending on how that stomachs static linking for everything.
I'd also not do it in a VM. While that's not necessarily completely invalid, it does seem to skew things pretty significantly, what with at least one whole other OS running as the hypervisor and all that.
You know, I would love to see an "Alpnix" in the future -- all of Alpine's speed and lightness, all of NixOS's hermetic and reproducible build capabilities...
Can the Nix package manager not be added to Alpine?
I guess you'd have to replace apk?
Alpine is cancer.