{"id":18073278,"url":"https://github.com/geekobiloba/preseeder","last_synced_at":"2025-04-05T18:16:41.909Z","repository":{"id":259687923,"uuid":"879110496","full_name":"geekobiloba/preseeder","owner":"geekobiloba","description":"Trivial Debian preseed templater","archived":false,"fork":false,"pushed_at":"2025-01-20T12:59:25.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T15:29:35.890Z","etag":null,"topics":["automated-installation","debian","preseed","unattended-installation"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geekobiloba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-27T02:17:31.000Z","updated_at":"2025-01-20T12:59:27.000Z","dependencies_parsed_at":"2024-10-27T11:07:15.789Z","dependency_job_id":"7bcd8b8c-cedd-4ceb-a63c-7ae934118735","html_url":"https://github.com/geekobiloba/preseeder","commit_stats":null,"previous_names":["geekobiloba/preseeder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekobiloba%2Fpreseeder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekobiloba%2Fpreseeder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekobiloba%2Fpreseeder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekobiloba%2Fpreseeder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekobiloba","download_url":"https://codeload.github.com/geekobiloba/preseeder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378141,"owners_count":20929296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-installation","debian","preseed","unattended-installation"],"created_at":"2024-10-31T10:05:46.909Z","updated_at":"2025-04-05T18:16:41.878Z","avatar_url":"https://github.com/geekobiloba.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"#   Trivial Debian preseed templater\n\nTo simplify Debian automated installation\nwith [preseed](https://wiki.debian.org/DebianInstaller/Preseed),\nand to make it more manageable,\nthis is my personal, trivial, and definitely ugly, tiny tool.\n\nIt helps me to manage multiple preseed templates,\neach belongs to a host group.\nHopefully, it can help you, too.\n\n##  How-to\n\n1.  Create a new template for your host group,\n\n    ```shell\n    ./preseeder -t homelab\n    ```\n\n2.  That will generate two template files:\n\n    -   `tmpl/homelab/preseed.cfg.tmpl`\n    -   `tmpl/homelab/latecmd.sh.tmpl`\n\n    Edit them to match your needs.\n\n3.  Extract all variables used in those template files,\n\n    ```shell\n    ./preseeder -e homelab\n    ```\n\n4.  That will generate a starter variable file `vars/homelab/var`.\n\n    Copy or rename it to match your planned installation, _e.g._,\n\n    ```shell\n    mv vars/homelab/var vars/homelab/host-01\n    ```\n\n5.  Edit the variable file to match your infrastructure, _e.g._,\n\n    ```shell\n    DOMAIN=\"home.lab\"\n    HOSTNAME=\"host-01\"\n    FULLNAME=\"Debian Admin\"\n    GH_USERNAME=\"geekobiloba\"\n    KEYBOARD=\"us\"\n    LOCALE=\"id_ID.utf8\"\n    TIMEZONE=\"Asia/Jakarta\"\n    MIRROR_COUNTRY=\"Indonesia\"\n    PACKAGES=\"build-essential git curl jq htop vim ripgrep bat\"\n    FILESYSTEM=\"ext4\"\n    USERNAME=\"geekobiloba\"\n    PASSWD_HASH_USER='$6$RXZ9ccXz07zIlcWK$Q5HMTePavdX9L9HBQWrQtQLcaD6Qz8494CdCBsaPqtfJJVebrGspSYeAFx15X5RzBhdg0rGywEuiqgn4LQ.kW0'\n    PASSWD_HASH_ROOT='$6$RXZ9ccXz07zIlcWK$Q5HMTePavdX9L9HBQWrQtQLcaD6Qz8494CdCBsaPqtfJJVebrGspSYeAFx15X5RzBhdg0rGywEuiqgn4LQ.kW0'\n    NTP_SERVER=\"time.bmkg.go.id\"\n    LATECMD_URL=\"http://192.168.111.111:8000/homelab/host-01/latecmd.sh\"\n    ```\n\n    You can create hashed passwords with `openssl passwd -6`.\n\n6.  Optionally,\n    copy and edit the variable file for other hosts under the same group,\n    each file for a single host.\n\n7.  Then, make preseed files for the whole host group.\n\n    ```shell\n    ./preseeder -p homelab\n    ```\n\n    Your final directory structure should resemble this,\n\n    ```text\n    .\n    ├── preseed\n    │   └── homelab\n    │       ├── host-01\n    │       │   ├── latecmd.sh\n    │       │   └── preseed.cfg\n    │       └── host-02\n    │           ├── latecmd.sh\n    │           └── preseed.cfg\n    ├── preseeder\n    ├── tmpl\n    │   ├── default\n    │   │   ├── latecmd.sh.tmpl\n    │   │   └── preseed.cfg.tmpl\n    │   └── homelab\n    │       ├── latecmd.sh.tmpl\n    │       └── preseed.cfg.tmpl\n    └── vars\n        └── homelab\n            ├── host-01\n            └── host-02\n    ```\n\n### Using the preseed\n\nThe straightforward way is to deliver them via HTTP.\n\n1.  Serve the preseed directory with Python,\n\n    ```shell\n    python3 -m http.server -d preseed\n    ```\n\n2.  Run an ordinary Debian installer,\n    choose **Advanced options**,\n    then **Automated install**.\n\n    Wait until a prompt\n    titled **Download debconf preconfiguration file** appears,\n    then enter `http://${WEB_SERVER_IP}:8000/homelab/host-01/preseed.cfg`.\n\n    The installer will continue unattendedly to finish,\n    unless there's an error, of course.\n\nOther options\nare listed [here](https://www.debian.org/releases/stable/i386/apbs02.en.html),\nor using a [DHCP server](https://www.growse.com/2023/05/05/automated-debian-installs-with-preseeding-from-dhcp.html).\n\n##  FAQs\n\n-   _Why bother with preseed when there's Ansible?_\n\n    Ansible runs post-installation,\n    and it can't give answers to the installer.\n    Besides, preseed is there with every Debian installer since like forever.\n\n-   _Why not cloud-init?_\n\n    Then I'll have to use the Debian cloud images,\n    which give me only a few architectures.\n\n-   _How do you use this mostly?_\n\n    Automating Debian installation on niche archs,\n    like ARMv7 or MIPSel,\n    mostly on QEMU,\n    to compile stuff for embedded devices,\n    usually runs OpenWrt.\n\n-   _Is there any caveats_\n\n    Yes.\n    This tool doesn't check preseed files validity.\n    You should know what you're doing when authoring them.\n\n    Read the [official docs](https://www.debian.org/releases/stable/amd64/apb.en.html)\n    and\n    [partition recipe](https://salsa.debian.org/installer-team/debian-installer/-/blob/master/doc/devel/partman-auto-recipe.txt)\n    to learn more.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekobiloba%2Fpreseeder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekobiloba%2Fpreseeder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekobiloba%2Fpreseeder/lists"}