Please let me know if there is already an accepted way to do this.

Early in the install process, you’d have a field to type a hostname of a local machine that you’d like to install like. The installer would download an “Install facts” file and install the new machine like the model machine.

The “install facts” file is created at install time. it contains things like timezone, language, percentage of disk space for each partition (to handle disk space of differing sizes) Optional files selected, username/password for root and for first user - anything needed to make the install a two click operation.

Note that this would be a full new install - not a clone of a machine that has been in use for a while.

  • NightFantom@slrpnk.net
    link
    fedilink
    arrow-up
    2
    ·
    8 hours ago

    Who’s going to say what is to be reset in a “full new install” and what is kept? I don’t think the line is as clear as you think.

    For example, the disk space. Maybe one partition was made to be a flat amount, and another gets what’s left, maybe it’s a percentage split. Who’s to say?

    What if the rest of the hardware is significantly different? Maybe your old amd setup needed no third party drivers, but your new nvidia setup is broken without the third party drivers?

    I don’t think copying the username / password is a good idea either, ever, by the way.

    I think the gray area between cloning and just doing a fresh install without copying anything is a little too personal (and/or hardware-specific) to really manage well this way.

  • WasPentaliveOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    12 hours ago

    I guess if you write a set of declarations for NixOS you can copy that same file to the new machine. Thanks for the pointers. What about the “install facts” being just a byproduct of the first install? You don’t even have to write a script… anyway. It seems there are ways to do this already, Thanks!

  • jutty@blendit.bsd.cafe
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    17 hours ago

    For Debian there’s Preseed, for Arch there’s archinstall, for a Fedora/RHEL there’s Kickstart, for Alpine there’s setup scripts, for distros with fully manual installs, you could just write a script?

    Automating your install is something any sysadmin and mainly any distro developer will quickly reach towards, so it is something almost certain to exist.

    Though, if I understand you, you’d want that to be “sourced” from an existing system, yes? I can see the use of that… NixOS is likely the closest to what you want, since you are always defining a full declaration of your system.

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 hours ago

    This is not really a highly requested feature, so I’m not sure that it exists. You’d probably be better off writing a simple cloud-init config and using that.