After a long three years of development, carbonOS is finally ready for its alpha release! It has been a huge learning experience for me, and I’m ready to share my early work to the community.
What is carbonOS?
carbonOS is a Linux distribution that focuses on UX and system design more than it does on compatibility with Linux tradition.
Like Fedora Silverblue or openSUSE MicroOS, carbonOS is an atomic distribution. This means that the system is laid out in such a way that there will never be a situation where it is caught between versions. An update is either fully successful or fully failed. carbonOS is also immutable. That means that the system files of the OS are all protected and read-only. It also means that every copy of carbonOS is identical. This makes the system much more stable, less prone to bugs, and more secure.
Unlike other atomic distros, carbonOS does not attempt to keep around
traditional package management functionality. There is no package manager.
In many ways, carbonOS is like a mobile OS: it’s an all-in-one platform that
is streamlined to run your apps. This makes the design of the system much
simpler. That said, carbonOS is not locked down. The user is always in full control of
the system. The immutability can be unlocked, there is full read-write access to
/usr/local
, and full administrator privileges are available to the user. This
is still very much Linux and I do not intend on taking away the user’s ultimate
control.
Instead of a package manager, carbonOS uses various container technologies to provide your software. Flatpak is used to provide the primary GUI app-focused experience. I fully expect casual users to only use Flatpak. For more advanced workflows, nsbox provides a well-integrated pet container where you can use a traditional Linux distro like Arch Linux or Debian. In future versions, I plan on including podman for compatibility with Docker containers (issue).
carbonOS’s end goal is to be a distro that uses Linux’s unique capabilities to provide a secure, stable, and robust environment for users’ apps. I want it to be a general-purpose OS that the user doesn’t have to think about. Users should be able to game on it, work on it, program on it, and do whatever else they want without worrying about any of the technical details going on behind the scenes.
About Me
I think big part of understanding a project is knowing a little about its creator. So: Hello, I’m Adrian! I’m currently a second-year computer science student at The Ohio State University. I’ve been programming for about a decade, and I’ve been doing open source work for the last 7 years. I believe that Free software is an incredible good for society. Thus, FOSS needs to be adopted more widely by the public. To that end, I started working on carbonOS three years ago with the vision of making Linux user-friendly and robust enough that it can be brought to a general audience.
The history of carbonOS
I started my Linux journey, as many people do, with Ubuntu. I didn’t like Unity very much, so I daily-drove Ubuntu GNOME. It was generally a great experience, but I ran into issues whenever I tried to upgrade my system. Full distro upgrades tended to fail and leave the system in a broken, half-updated state. I usually managed to fix it, but it was a hassle and the system would never work 100% correctly after that anyway. After a couple of botched upgrades, the system was at the point where I really just had to reinstall it.
So I took the opportunity to do some research and find something better. I found NixOS, learned about it, and installed it. It became my new daily-driver OS. I think NixOS is a great project, but it’s not very user-friendly. This bothered me as I used it. I loved its features—most notably its system stability—so I wanted it to be accessible to more users. And I felt most users wouldn’t be willing to learn a new programming language to get some system stability benefits.
So, carbonOS was born. It was supposed to be a set of tools and configuration for NixOS that made it intuitive to use. I was going to purpose-build a DE (carbonSHELL) for NixOS that hides all the underlying complexity and gives the user a seamless UX.
Over time, however, I started feeling like I’m fighting against NixOS’s model. I’d have to generate Nix code on the fly, and overall my solutions would have to end up being hacks. I started questioning whether or not I should continue mangling NixOS’s system into something it wasn’t designed to be, or should I just write me own? So, I did some more research, found libostree, and shifted the focus of carbonOS. It was now going to be its own distro—based on the Freedesktop SDK and OSTree—that gives many of NixOS’s system stability benefits with a good UX and none of the underlying complexity. I made my own shell-script-based build system and got to work. I had a booting OS on Christmas 2018. Not long after, I had carbonSHELL running on my new base system.
Fast-forward a year. Work is happening at a steady pace, but the most frustrating thing about it is the build system and the Freedesktop SDK base. It wasn’t very maintainable. The build system worked poorly and had no automation. Also, I’d end up fighting with incompatibilities between the SDK and my own packages. Eventually I had enough, so I found BuildStream and read through LFS a couple of times. After some careful consideration, I decided it would be best to rewrite carbonOS’s build scripts and make it a fully independent distro.
I wrote up a proposal to my high school, and got approved for funding through the Strnad Program. I used the money to build a computer with enough CPU power to quickly build the OS (~1hr, at the time), and got to work porting. Not long after, the BuildStream rewrite was booting, then had carbonSHELL running on it. This rewrite surpassed the functionality of the old system quickly.
In 2020, I generated my first bootable ISO. This became the first, “Pre-Alpha”
release of carbonOS: 2020.1
. I don’t have access to this ISO at the moment due
to issues with AWS and autopay, but I’d like to get it back eventually!
Now, another year later, I’m ready to release the first Alpha! I think this is the first point where it’s actually possible to daily-drive the OS, though I wouldn’t recommend doing that just yet.
Changelog
carbonOS has evolved significantly since 2020.1! Here’s an explanation of some of the changes:
- Complete restructuring of the source code: Prior to
2021.1
, packages were split across a few arbitrary categories. In practice, however, that didn’t make much sense; most packages didn’t clearly fit into just one category. So, I restructured the whole project to make it more maintainable - Build-time options: carbonOS has now enabled various security- and performance-related C compiler flags
- Remove debugging information: Previously carbonOS would ship massive binaries with all of their debug information included. This data has now been stripped out
- nsbox command environment: Provides a well-integrated container where the user can install a traditional distribution like Arch Linux or Debian and use for advanced workloads (i.e. compiling software)
- Btrfs: carbonOS now defaults to the Btrfs filesystem
- Compression: carbonOS enables Btrfs’s transparent compression where appropriate. This reduces the size of logs, caches, and OS files. Simultaneously, it increases drive longevity.
- Out-Of-Memory Handling: carbonOS can now gracefully handle OOM scenarios,
using
systemd-oomd
andswap-on-zram
technology. Instead of using a traditional swap partition or swapfile on your disk, carbonOS will compress the pages that the kernel swaps out. This is much faster an can almost double the amount of memory available to the system before it starts killing processes - Replace sudo with doas: carbonOS doesn’t need all the features of
sudo
, so a simpler tool and a smaller implementation should suffice - Replace PulseAudio with PipeWire: This significantly improves the reliability of audio on carbonOS
- os-updated: Provides carbonOS’s system update functionality. Built on top
of
libostree
. At upgrade time, it combines a kernel with an OS image - Graphite Desktop: carbonSHELL has been renamed to “Graphite Desktop
Environment” (GDE). Also, it has been significantly improved:
- Brand-new login screen
- Settings app
- Support for configuring your displays
- Various bug fixes
- Graphical Installer: carbonOS now has a graphical installer and initial-setup program, making it easier than ever to get up and running
- Bug fixes all throughout the system, and many other small changes! This was a massive release, and it’s impossible to list all the little tweaks that happened.
Future
A lot of work needs to be done before carbonOS is ready for prime time. For the next release, I’m planning on focusing on these areas:
- System Integrity & Data Protection: Using technologies like Secure Boot, TPM, dm-integrity, systemd-homed, and potentially dm-verity, carbonOS will verify every bit of system binaries and data at boot and during runtime. carbonOS will also fully encrypt all user data, including /var, /etc, and all the home directories. Of course, disabling secure boot in your firmware will allow modifications to be made to the system, however it will force carbonOS to behave more like a traditional full-disk-encrypted Linux distro (i.e. prompt for a password at boot)
- Graphite Desktop: Various parts of GDE still need to be implemented, like the overview screen. Also, missing/broken features like screen recording and configurable keyboard shortcuts will be corrected
- Build Improvements: There’s lots of small improvements that can be done to the build system to make the build process faster and overall better, including (but not limited to) redesigning debuginfo stripping, bootstrapping the Rust and Go compilers from source, and splitting out the whole-system bootstrap into its own module.
For more detail on these changes and to track progress, check out the milestone on GitLab!
Contributing
I don’t have much of a structure set up for getting contributions yet. However, I’d be happy to accept some help! If you’d like to test out carbonOS, you can download it here. If you’d like to contribute, check out the source code and join the development channel: #carbonOS on Matrix. Thank you!