{"id":26792948,"url":"https://github.com/osbuild/bib-kickstart-demo","last_synced_at":"2025-03-29T16:18:19.408Z","repository":{"id":251254338,"uuid":"836857270","full_name":"osbuild/bib-kickstart-demo","owner":"osbuild","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-06T09:40:08.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T01:09:00.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osbuild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-01T17:45:29.000Z","updated_at":"2024-08-06T09:40:08.000Z","dependencies_parsed_at":"2024-08-05T22:12:14.991Z","dependency_job_id":null,"html_url":"https://github.com/osbuild/bib-kickstart-demo","commit_stats":null,"previous_names":["achilleas-k/bib-kickstart-demo","osbuild/bib-kickstart-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbuild%2Fbib-kickstart-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbuild%2Fbib-kickstart-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbuild%2Fbib-kickstart-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbuild%2Fbib-kickstart-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osbuild","download_url":"https://codeload.github.com/osbuild/bib-kickstart-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207503,"owners_count":20740723,"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":[],"created_at":"2025-03-29T16:18:18.708Z","updated_at":"2025-03-29T16:18:19.387Z","avatar_url":"https://github.com/osbuild.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo: Custom kickstarts in ISOs built using bootc-image-builder\n\n\u003e 2024-08-05\n\nRecently we added the ability to inject a custom kickstart file into an ISO build using bootc-image-builder.  This kickstart file can be used to configure any part of the installation process, except the deployment of the payload.  In the case of ISOs with bootc container payloads, this means that users can use a kickstart file to configure anything except the `ostreecontainer` command.\n\nEven more recently (not yet released), we added the ability for users to configure the Anaconda installer by enabling or disabling specific udev modules.  I wont go into all the details of what each module is for, but this becomes important when user creation comes into play.  More on that later.\n\n## Part 0: bootc-image-builder\n\nI'll be using a bootc-image-builder image that I built myself to include the aforementioned installer module configuration:\n```\nquay.io/achilleas/bootc-image-builder:demo\n```\n\nThis feature should be available in the upstream (`centos-bootc`) image soon.\n\n## Part 1: Partial kickstart file\n\nSource: [`01-partial`](01-partial)\n\nWe'll make an ISO with a kickstart file that takes care of locales etc but is not enough for a fully automated installation.  Some interaction will be required.\n\n\n```toml\n[customizations.installer.kickstart]\ncontents = \"\"\"\nlang en_GB.UTF-8\nkeyboard uk\ntimezone CET\n\"\"\"\n```\n\nThis kickstart is missing two important configurations for a fully automated installation:\n- Partitioning\n- User creation\n\nThe ISO should contain two kickstart files with the following contents:\n\n`osbuild.ks`\n```\n%include /run/install/repo/osbuild-base.ks\nlang en_GB.UTF-8\nkeyboard uk\ntimezone CET\n```\n\n`osbuild-base.ks`\n```\nostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification\n```\n\n## Part 2: Fully unattended kickstart file\n\nSource: [`02-full`](02-full)\n\nLet's fully automate the installation by adding user creation and partition instructions.\n\n```toml\n[customizations.installer.kickstart]\ncontents = \"\"\"\nlang en_GB.UTF-8\nkeyboard uk\ntimezone CET\n\nuser --name achilleas --password password42 --plaintext --groups wheel\nsshkey --username achilleas \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqEtsCdSozq0DT8sOazpizsBP65Ni6SMqrQA85Wnfs1 achilleas\"\nrootpw --lock\n\nzerombr\nclearpart --all --initlabel\nautopart --type=plain\nreboot --eject\n\"\"\"\n```\n\nThe ISO should contain two kickstart files with the following contents:\n\n`osbuild.ks`\n```\n%include /run/install/repo/osbuild-base.ks\nlang en_GB.UTF-8\nkeyboard uk\ntimezone CET\n\nuser --name achilleas --password password42 --plaintext --groups wheel\nsshkey --username achilleas \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqEtsCdSozq0DT8sOazpizsBP65Ni6SMqrQA85Wnfs1 achilleas\"\nrootpw --lock\n\nzerombr\nclearpart --all --initlabel\nautopart --type=plain\nreboot --eject\n```\n\n`osbuild-base.ks`\n```\nostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification\n```\n\n## Part 3: Fully unattended kickstart file without user\n\nSource: [`03-full-no-user`](03-full-no-user)\n\nThis configuration is also fully automated, but doesn't create a user.  The Anaconda users module will not allow an installation to continue if there is no admin user (or root password).  If our base image contains a user already, or if we plan to provision a user later using, for example, cloud-init or similar, then we need to disable the users module so we can perform a fully unattended installation.\n\n```toml\n[customizations.installer.modules]\ndisable = [\"org.fedoraproject.Anaconda.Modules.Users\"]\n\n[customizations.installer.kickstart]\ncontents = \"\"\"\nlang en_GB.UTF-8\nkeyboard uk\ntimezone CET\n\nzerombr\nclearpart --all --initlabel\nautopart --type=plain\nreboot --eject\n\"\"\"\n```\n\nThe ISO should contain two kickstart files with the following contents:\n\n`osbuild.ks`\n```\n%include /run/install/repo/osbuild-base.ks\nlang en_GB.UTF-8\nkeyboard uk\ntimezone CET\n\nzerombr\nclearpart --all --initlabel\nautopart --type=plain\nreboot --eject\n```\n\n`osbuild-base.ks`\n```\nostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification\n```\n\n# Notes\n\n- Use the [`./build.sh`](build.sh) script with a config directory (e.g. `./build.sh ./01-partial`) to build a specific configuration.  The output will be under the config directory.\n- Use the [`./boot.sh`](boot.sh) script with a config directory (e.g. `./boot.sh ./01-partial`) to create a disk image and boot the ISO for that config.\n- Use the [`./catks.sh`](catks.sh) script with a config directory (e.g. `./catks.sh ./01-partial`) to mount the ISO for that config and print the embedded kickstart files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosbuild%2Fbib-kickstart-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosbuild%2Fbib-kickstart-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosbuild%2Fbib-kickstart-demo/lists"}