Skip to content

Allow installer to use different backends #941

Description

@nikodunk

Problem

The current installer uses libdistinst to 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 (or debootstrap?), do something like:

sudo dd if=Elementary_build_x86-64.raw of=/dev/sdX bs=4M status=progress conv=fsync

under the hood. Then reboot into the new image, as it does now.

We could even reuse the current live-build live 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)

Activity

  1. added theissue type on Jul 30, 2026
  2. jumpyvi commented on Jul 30, 2026

    @jumpyvi
    Member

    I think we can use systemd-repart (cli) to setup the disk + flash the disk using user-provided options for encryption

  3. nikodunk commented on Jul 30, 2026

    @nikodunk
    SponsorAuthor

    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.

  4. nikodunk commented on Jul 31, 2026

    @nikodunk
    SponsorAuthor
  5. nikodunk commented on Aug 1, 2026

    @nikodunk
    SponsorAuthor

    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 ?

  6. ryonakano commented on Aug 2, 2026

    @ryonakano
    Member

    I'm sorry, I'm not familiar around here……

  7. moved this to Needs Discussion in OS 9on Aug 2, 2026
  8. nikodunk commented on Aug 7, 2026

    @nikodunk
    SponsorAuthor

    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 environment

    jumpyvi

    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)

  9. moved this to Needs Discussion in OS Upgradeson Aug 15, 2026
  10. self-assigned this
    on Sep 29, 2026
  11. vjr commented on Sep 29, 2026

    @vjr
    Member

    Assigning myself for now, want to take a stab at solving this :-)

  12. vjr commented on Oct 5, 2026

    @vjr
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority: WishlistNot a bug, an enhancement or new feature

Projects

  • Status
    Needs Discussion
  • Status
    Needs Discussion

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions