summaryrefslogtreecommitdiff
path: root/mkosi.presets/20-final
Commit message (Collapse)AuthorAgeFilesLines
* mkosi: Drop squashfs dropinDaan De Meyer2023-05-151-2/+0
| | | | | | This accidentally got pulled into a commit even though it was only for local testing, let's drop it again so we correctly use erofs when building local images.
* mkosi: Install tmux in the final imageDaan De Meyer2023-05-151-0/+1
| | | | | | | We currently have to resort to SSH to get more than one interactive terminal in a mkosi qemu VM. Let's increase our options by installing tmux in the final image, which can multiplex the serial console into many unique terminal sessions.
* mkosi: Package a erofs usr partition with signed verityDaan De Meyer2023-05-1313-7/+58
| | | | | | | | | | | | | | Let's start moving towards a more involved partitioning setup to test our stuff more when using mkosi. The root partition is generated on boot with systemd-repart. CentOS supports neither erofs nor btrfs so we use squashfs and xfs instead. We also enable SecureBoot= locally for additional coverage. This and the use of verity means users need to run `mkosi genkey` once to generate the keys necessary to do secure boot and verity.
* mkosi: Store /etc under /usr/share/factory/mkosiDaan De Meyer2023-05-132-0/+7
| | | | | | | | | If we're making a /usr only image, we still want to populate /etc fully on first boot. To make that possible, let's copy /etc to /usr/share/factory/mkosi in a finalize script, which runs after all changes to the image have been made. Let's also add a tmpfiles snippet that merges /usr/share/factory/mkosi with /etc on boot to populate /etc.
* mkosi: Use initrd symlink without format/compressionDaan De Meyer2023-05-121-1/+1
| | | | | This way, we can change the compression (and even the output format) in the future without having to modify the final preset.
* mkosi: Install apt in Debian/Ubuntu imagesDaan De Meyer2023-05-111-0/+1
|
* mkosi: Add back accidentally removed .gdbinit fileDaan De Meyer2023-05-111-0/+3
|
* mkosi: Replace root password setting with a credentialDaan De Meyer2023-05-111-1/+0
|
* mkosi: Look for mkosi.kernel/ in the top level directoryDaan De Meyer2023-05-048-211/+8
| | | | | Let's make this slightly easier to use by looking for mkosi.kernel/ in the top level directory instead of in mkosi.presets/20-final/.
* mkosi: Use kernel-kvmsmall package on opensuseDaan De Meyer2023-05-031-1/+1
| | | | | Let's save on image size by using the kernel build for KVM from opensuse.
* mkosi: Switch to use mkosi presets with prebuilt initrdsDaan De Meyer2023-05-0122-0/+692
Instead of building the initrds for the mkosi images with dracut, let's switch to using mkosi presets to build the initrd with mkosi as well. This commit splits up our single image build into three separate mkosi presets: 1. The "base" preset. This image contains systemd and all its runtime dependencies. The sole purpose of this image is to serve as a base image for the initrd and the final image. It's also responsible for building systemd from source with the build script. The results are installed into the base image. Note that we install the systemd and udev packages into this image as well to prevent package managers from overriding the systemd we built from source with the distro packaged systemd if it's pulled in as a dependency by another package from the initrd or final profiles. 2. The "initrd" preset. This image provides the initrd. It's trivial and does nothing more than packaging the base image up as a zstd compressed initramfs and adds /init and /etc/initrd-release symlinks to the image. 3. The "final" preset. This image builds on top of the base image and adds a kernel and extra packages that are useful for testing and debugging. We also split out the optional kernel build into a separate set of config files that are only included if a kernel to build is actually provided. Note that this commit doesn't really change anything about how mkosi is used. The commands remain the same, except that mkosi will now build all the presets in order. "mkosi summary" will show the summary of all the presets. "mkosi qemu, boot, shell" will always boot the final preset. With "-f", all presets will be built and the final one is booted. "-i" makes a cache of each preset. The only thing to keep in mind is that specifying config via the mkosi CLI will apply to each of the presets. e.g. any extra packages added with "-p" will be installed in both the initrd and the final image. To apply local configuration to a single preset, create a file 00-local.conf in mkosi.presets/<profile>/mkosi.conf.d and put all the preset specific configuration in there.