A helper script for completing a one-off ucore installation

Hi! I recently developed a small interactive helper script called turnkey that generates a butane and ignition file and outputs helpful information for completing a ucore rebase during a coreos installation. It’s intended to be run in a container right in the CoreOS bare metal installation environment to provide the most familiar “Linux distro installation” experience I can without fundamentally deviating from ucore and coreos’s design.

It’s kinda like archinstall but wayy more simple and less automated.

It’s also designed for a one-off home server installation; the kind where you don’t really care about keeping the butane file around for future use. However, since it’s meant to be run in a container, it can also be run on your main system to generate the butane file that you can then tweak and keep around if you want to have a sort of “declarative” installation experience in the case that you ever need to reinstall your home server. Basically, you can still go down the rabbit hole, but hopefully this script removes the friction introduced by an unfamiliar installation method for anyone wishing to try ucore.

I’d love any feedback/suggestions for improvement!

4 Likes

I’ve been thinking of trying uCore on a home server. Thank you for making this!

1 Like

Heh, this is awesome. You’ve kicked off some ideas in my brain…

One of the interesting side effects of being desktop focused is that it brings in new eyes. CoreOS/ucore style Linuxes have always had this automation-first design. These things were designed to run Kubernetes, and be invisible, in this work the OS is very invisible, the same thing we’re striving to do on the desktop.

So if you’re an infrastructure nerd, this is fine. Right now these are very much “if you know what you are looking for you will find it.” We explicitly keep these scoped small and expect the user to understand how to ignition. Though traditional linux nerds are probably confused.

But I am lazy, and I think there is a “market” for an easy to use CoreOS/uCore. Universal Blue just isn’t going to be the one to make that. 15 minutes after we make this we’d end up helping people with plex and jellyfin all weekend. I have nervously made a few prototypes and it’s not as hard now as it was when I made it.

But I wish someone else would make one!

Because it would be good. I need an OS and linuxserver.io for my house and I am a happy camper. :smiley:

So I think a good way to open this up for a bunch of people is to take the existing bootc-image-builder action: GitHub - osbuild/bootc-image-builder: A container for deploying bootable container images.

Just make an ISO that is the anaconda installer (with tui perhaps) that just installs a ucore image. Then “normal” home users can install ucore. It would also be trivial to build Fedora CoreOS builds this way too. Then you’d have your traditional installer with a solid core.

Ship Cockpit for UI management and that makes for a compelling thing at home, especially with the automated updates, etc. I experimented a bit with Portainer, but there’s tons of those container dashboards out there, lots of options, etc.

4 Likes

Yeah. For whatever its worth, based on the tool by @dabe and @pauldoo’s helpful comments in the other recent ucore thread I’ve gotten my setup working nicely.

In the end I decided not to do my config by running an interactive tool on the target machine. I tried that and it worked! But I wanted to eventually keep my machine config in git for possible future use.

Instead I made a nasty little tool/script that does the following (all on my development computer, not my target machine):

  • pick a uCore dist
  • set a username, login key info
  • fetch the required ISOs or qcow2 files (as appropriate)
  • create a root (20GB - based on my guess?) and /var (rest of the disk) as btrfs filesystems
  • expand the /boot volume to something more reasonable for today (2GB) (ugh: this isn’t correct yet)
  • keep a local copy of the (nicely readable/human modifiable) butane file for future use
  • generate a customized ISO based on the release ISO, butane file and user specified boot volume. To program a target machine just boot that ISO
  • optionally run the image locally in a VM to test it with either
    a) a fast test under QEMU (qcow2 based)
    b) a more accurate test by using the ISO image

I don’t know if it is useful for others, if so I can clean it up a little and send ya’ll a github link. Currently it is still a little hardwired for my needs.

2 Likes

I think my current hang up is that the gap for a traditional linux nerd to just get a ucore install going is so small that I’m not sure I want to sink the time in to figure out how to make a bootc ISO for it. Turnkey took me like an hour or 2 to make because I knew exactly how I’d do it, and it covers the small gap like 90% of the way in my view. Problem is, it’s such a small tool, it’ll probably be hard to discover before someone gives up on figuring out how to install ucore, or just fully figures out ignition and does it themselves.

I’ll definitely add figuring out how to make an easy installer for ucore to my rabbit holes list, though. I agree with you in that I just want a home server OS based on coreos/ucore! It feels perfect for the niche.

1 Like

That sounds like a cool tool! I’d definitely be interested in messing around with it

1 Like

hmm. Possibly if it was part of the regular ucore github repo instead. Then the README could say something like:

If you’d like to install this interactively on a bare-metal machine, we have a small network accessible service for this. Just boot a coreos ISO (link - no need to run packages to generate) and then at the shell prompt on the new device type “sh <(curl -L https://ucore-boot.universal-blue.org )”

I know for me: I noped-out many times on trying ucore because the README was scary “if I just wanted to try this I need to first learn butane and this ignition thing?”

If instead right at the top it had very easy instructions of, burn this ISO, put it in a machine and then type <30 characters it would really help noob adoption. Bonus points if it leaves the generated butane file on the now-running machine (in /etc/os-config.butane or somesuch?)

With an easier adoption path ucore might be really great for home servers (because nice container focused design). Probably better for many than ‘ubuntu or dietpi’ OS loads.

2 Likes

ok - I’ll clean it up this week and send you a link!

I don’t know if you came across this, but there was actually a flaw in turnkey where if you created a user other than core, it wouldn’t be in the wheel group and therefore you wouldn’t have sudo privileges on any accessible user. I just pushed an update that fixes this :smiley:

1 Like

thanks I did. But by that point your spiffy tool had taught me enough that I decided ‘fuck it, I’m generating a butane file on my desktop’ :wink:

LOL exactly. It does feel like this tool is really just a gateway to more quickly get people hooked on doing things the “proper” way and making their own butane files XD

Ok I finally had time to try this IRL, this is so cool! Good call adding Fedora CoreOS too, so it’s useful for everybody! Maybe you should let them know, this could be useful for lots of folks!

1 Like