Repository navigation
Allow installer to use different backends #941
Description
Activity
- addedPriority: WishlistNot a bug, an enhancement or new featureNot a bug, an enhancement or new featureNeeds DesignWaiting for input from the UX teamWaiting for input from the UX team
on Jul 30, 2026 I think we can use systemd-repart (cli) to setup the disk + flash the disk using user-provided options for encryption
- removedNeeds DesignWaiting for input from the UX teamWaiting for input from the UX team
on Jul 30, 2026 I think we can use systemd-repart (cli) to setup the disk + flash the disk using user-provided options for encryption
@jumpyvi interesting prior art (now that I'm filling in the template above) at https://invent.kde.org/kde-linux/kde-linux/-/blob/master/build.sh#L203
The resulting file is both a valid GPT disk image and a bootable El Torito ISO.
Current distinst backend: https://github.com/elementary/installer/blob/main/daemon/DistinstBackend.vala#L181
Hey, we might not need a new backend. Elementary OS uses libdistinst, which takes a squashfs and puts it onto the disk.
@jumpyvi if we can create that squashfs with the new method, the installer will be able to copy it to disk IMO. Did I understand that correctly @ryonakano ?
I'm sorry, I'm not familiar around here……
For posterity and to not leave this ticket in a confusing state, @danirabbit @jumpyvi and I discussed in discord, and we said:
danirabbit
If we can replace distinst with some calls to systemd I think that would be considered a win personally
Is there a dbus API for systemd repart?nikodunk
i dont think there is. Can vala do subprocess?
danirabbit
Yes and we already have a priveleged process in installer for other disk operations so I can write a backend for this
Is there a good way to check if we’re on a mkosi image vs a livebuild image? Right now we check for Casper to see if we’re in a live environmentjumpyvi
From what I've seen from gnome/kde, it's a different UKI for live/real
nikodunk
i think we check for uki for mkosi image (vs casper for livebuild image)
Reacted by Danielle ForéReacted by Vishal RaoAssigning myself for now, want to take a stab at solving this :-)
Assigning myself for now, want to take a stab at solving this :-)
Made some progress with #959 to add a new backend for
systemd-repart(with rough UI updates to choose either backend during install and also showing new options like TPM encrypt) but just now again saw #941 (comment) so I'll also try re-using distinst if it saves effort for things like custom installs, otherwise the new repart backend might be good as a clean slate for modern installs dropping distinst dep eventually.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNeeds Discussion
- StatusShow more project fieldsNeeds Discussion
Problem
The current installer uses
libdistinstto install elementary OS packages to disk I believe. Thanks to @jumpyvi we now have a mkosi/systemd sysupdate PR that can generate an elementary OS 9 image, and then update it forever from there (even over major OS release versions 8=>9=>10!). We need a way to initially copy this image to the users' disk though.Proposal
@danirabbit suggested I open a ticket here to start a discussion on the installer supporting different backends.
The installer could work the same as it does now, but on the last step instead of copying packages with
libdistinst(ordebootstrap?), do something like:sudo dd if=Elementary_build_x86-64.raw of=/dev/sdX bs=4M status=progress conv=fsyncunder the hood. Then reboot into the new image, as it does now.
We could even reuse the current
live-buildlive iso generation, but simply copy the elementary OS image to that iso and then have the installer run the above command to the desired disk.Prior Art (Optional)