Linux Fu: Atomic Power

People are well aware of the power of virtual machines. If you want to do something dangerous — say, hack on the kernel — you can create a virtual machine, snapshot it, screw it up a few times, restore it, and your main computer never misses a beat. But sometimes you need just a little shift in perspective, not an entire make belive computer. For example, you are building a new boot disk and you want to pretend it is the real boot disk and make some updates. For that there is chroot, a Linux command that lets you temporarily open processes that think the root of the filesystem is in a different place than the real root. The problem is, it is hard to manage a bunch of chroot environments which is why they created Atoms.

The system works with several common distributions and you install it via Flatpak. That means you can launch, for example, a shell that thinks it is running Gentoo or Centos Linux under Ubuntu.

Creating an atom is easy

Using the tool is easy enough.  A simple screen lets you choose a few options. The first time you use a particular image it will take a few minutes to download everything.

Eventually, you’ll wind up with a list of all your chroot environments. Selecting one of them (initially, the only one) will give you a screen where you can browse files, expose a few mount points, change the chroot’s name, or wipe it out. You can also open a console into the selected environment directly.

You can perform many actions on an atom from the GUI

From the main screen there is a “hamburger” menu that allows you to do a few global things like set preferences. You can move where things are stored, for example. You can also delete images you aren’t planning to use again.

Is this something you can’t do from the command line? Of course, not. But it is a nice way to keep a lot of chroot environments for specific distributions nicely organized.

We were hoping you could create custom chroot atoms for yourself easily but if that’s there, we didn’t see it. Of course, the whole thing is on GitHub, so you can probably figure out how to do that if you were really motivated. We also noted that you do not have control over how most of the underlying host file system is mapped to the atom, other than a few simple choices. There are cases where you might want other things mapped and it wasn’t clear how you could accomplish that.

If you need more isolation, consider containers. If you want quick development docker images, we talked about that, too.

12 thoughts on “Linux Fu: Atomic Power

  1. Have used qemu with read_only image(s) to run just the needed stuff for that specific job.

    One for XP+Delphi, BP.v7, XP+MVCPP.v60, XP+SDCC.240, XP+SDCC.280, DOS+BP.v7 and even one for FireFox works great and fast on a i7+32Mb labtop.
    *No* shutdown just “kill -9”.
    XP (-sp3 Embeded) image is only 235 MB.

    1. I’ve sort of done the same – though not quite. The image was read-only in the sense all changes made by the VM guest were non-persistent, as the disk image was loaded entirely into RAM (back when I had a functional workstation with enough ram to make that a plausible experiment). Even Windoze actually can perform well when its “disk” is so damn speedy!

      Qemu KVM stuff is fun to tinker with sometimes, though this tool making chroot easier seems like a nice addition, its going to need some looking at.
      Probably isn’t for me as I prefer fewer abstractions, so I really get comfortable with the lowest level more universal tools and am not stranded on a strange machine I can’t/don’t want to install my usual helpers too.

  2. I can see a Gentoo user running Ubuntu under a virtual machine but I can’t see an Ubuntu user running Gentoo in a vm. The point of Gentoo is performance. Also when you compile everything to optimise it for your processor you don’t want to wait for extra overhead of a vm.

    1. You always want your VM to be as lightweight as possible – the overheads involved in being a VM may be rather small (with the right host hardware and config) but always exist and in many, maybe even most cases the graphics of the VM are entirely handled by CPU rendering, and generally the VM disks image is just a very large file on the host, you can easily start to run out of disk space if your VM’s are bloated.

      So you are far more likely to use a performance oriented streamline linux variation on the VM, unless you have a real need for it to be something else.

  3. Also look into distrobox.

    It’s like a 2 liner to getting a full distro of your choice running on a stable or read-only system (eg steamdeck) without ever using root

    Than you can export bin, services, flatpacks even window manager and use every thing with no hassle on the host

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.