diff --git a/mkosi/Readme.md b/mkosi/Readme.md new file mode 100644 index 0000000..da6b0c6 --- /dev/null +++ b/mkosi/Readme.md @@ -0,0 +1,151 @@ +``` +/ +/mkosi.skeleton/ oder mkosi.skeleton.tar +/mkosi.extra/ oder mkosi.extra.tar +/mkosi.nspawn +/mkosi.cache/ +/mkosi.builddir/ +/mkosi.rootpw +/mkosi.passphrase +/mkosi.crt +/mkosi.key +/mkosi.output/ +/mkosi.credentials/ +/mkosi.repart/ +/mkosi.repart/*.conf +/mkosi.conf +/mkosi.presets/ +``` +--- +``` +mkosi.conf +``` +```ini +[Match] +Distribution= +Release= +PathExists= +ImageId= +ImageVersion= +Bootable= +Format= +SystemdVersion= + +[Preset] +Preset= +Dependencies= + +[Distribution] +Distribution=fedora|debian|ubuntu|arch|opensuse|mageia|centos|openmandriva|rocky|alma +Release= +Architecture=alpha|arc|arm|arm64|ia64|loongarch64|mips64-le|mips-le|parisc|ppc|ppc64|ppc64-le|riscv32|riscv64|s390|s390x|tilegx|x86|x86-64 +Mirror= +LocalMirror= +RepositoryKeyCheck= +Repositories= +CacheOnly= + +[Output] +Format=directory|tar|cpio|disk|uki|none +ManifestFormat=json|changelog +Output= +CompressOutput=yes|no|xz|zstd +OutputDirectory=mkosi.output/ +WorkspaceDirectory=mkosi.workspace/ +CacheDirectory=mkosi.cache/ +BuildDirectory=mkosi.builddir/ +ImageVersion= +ImageId= +SplitArtifacts= +RepartDirectories=mkosi.repart/ +SectorSize= +Overlay= +UseSubvolumes=auto|yes|no +Seed=(uuid)|random +SourceDateEpoch= + +[Content] +Packages= +BuildPackages= +WithDocs= +BaseTrees= +SkeletonTrees=mkosi.skeleton/ +PackageManagerTrees= +ExtraTrees=mkosi.extra/|mkosi.extra.tar +RemovePackages= +RemoveFiles= +CleanPackageMetadata=yes|no|auto +PrepareScript= +BuildScript= +PostInstallationScript= +FinalizeScript= +BuildSources= +Environment= +WithTests=yes|no +WithNetwork=yes|no +Bootable=yes|no|auto +Bootloader=none|systemd-boot|uki|grub +BiosBootloader=none|grub +Initrds= +KernelCommandLine= +KernelModulesInclude= +KernelModulesExclude= +KernelModulesInitrd=yes|no +KernelModulesInitrdInclude= +KernelModulesInitrdExclude= +Locale= +LocaleMessages= +Keymap= +Timezone= +Hostname= +RootShell= +RootPassword= (mkosi.rootpw (hashed:)) +Autologin=yes|no +MakeInitrd= +Ssh= + +[Validation] +SecureBoot= +SecureBootKey= +SecureBootCertificate= +SecureBootSignTools=sbsign|pesign|auto +VerityKey= +VerityCertificate= +SignExpectedPCR=yes|no|auto +Passphrase= +Checksum= +Sign= +Key= + +[Host] +Incremental= +NSpawnSettings= (mkosi.nspawn) +ExtraSearchPaths= +QemuGui=yes|no +QemuSmp=2 +QemuMem=1G +QemuKvm=yes|no|auto +QemuVsock=yes|no|auto +QemuSwtpm=yes|no|auto +QemuCdrom=yes|no +QemuFirmware=uefi|bios|linux|auto +QemuKernel= +QemuArgs= +Ephemeral= +Credentials=key=value key2=value2 +KernelCommandLineExtra= +Acl=yes|no +ToolsTree= (mkosi.tools/) +ToolsTreeDistribution= +ToolsTreeRelease= +ToolsTreePackages= +RuntimeTrees= +``` +--- +``` +mkosi.nspawn +``` +``` + +``` +--- \ No newline at end of file diff --git a/mkosi/mkosi.conf b/mkosi/mkosi.conf new file mode 100644 index 0000000..d996609 --- /dev/null +++ b/mkosi/mkosi.conf @@ -0,0 +1,14 @@ +# Initrd +[Distribution] +Distribution=arch + +[Output] +ImageId=initrd +Format=cpio +ManifestFormat= +Compress=zstd +Cache=mkosi.cache +OutputDirectory=mkosi.output + +[Content] +Packages=systemd,systemd-udev,bash,less,libfido2,p11-kit,tpm2-tss \ No newline at end of file diff --git a/mkosi/mkosi.conf.d/arch.conf b/mkosi/mkosi.conf.d/arch.conf new file mode 100644 index 0000000..41df7d6 --- /dev/null +++ b/mkosi/mkosi.conf.d/arch.conf @@ -0,0 +1,8 @@ +# [Match] +# Distribution=arch + +[Content] +Packages= + +[Output] +Format= \ No newline at end of file diff --git a/mkosi/mkosi.default b/mkosi/mkosi.default new file mode 100644 index 0000000..68ca51f --- /dev/null +++ b/mkosi/mkosi.default @@ -0,0 +1,15 @@ +[Match] +Distribution=fedora +Release=24 + +[Output] +Format=raw btrfs +Bootable=yes +# SecureBoot=yes +# Verity=yes + +[Packages] +# The packages to appear in both the build and the final image +Packages=openssh-clients httpd +# The packages to appear in the build image, but absent from the final image +BuildPackages=make gcc libcurl-devel \ No newline at end of file diff --git a/mkosi/run.sh b/mkosi/run.sh new file mode 100644 index 0000000..3cdb43e --- /dev/null +++ b/mkosi/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash +mkosi -t raw btrfs --bootable -o ArchOS.raw +systemd-nspawn -bi ArchOS.raw +qemu-kvm -m 512 -smp 2 -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -drive format=raw,file=ArchOS.raw +mkosi -d fedora -t raw_squashfs --checksum -xz --package=openssh-clients --package=emacs +######################### +mkosi [--force] [--directory=] \ No newline at end of file