# References
* [Primary mkosi git repository on GitHub](https://github.com/systemd/mkosi/)
-* [mkosi — A Tool for Generating OS Images](http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html) indroductory blog post by Lennart Poettering
+* [mkosi — A Tool for Generating OS Images](http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html) introductory blog post by Lennart Poettering
* [The mkosi OS generation tool](https://lwn.net/Articles/726655/) story on LWN
# Building a custom initrd and using it in a mkosi image
Building an image with a mkosi-built initrd is a two step process, because you will build two images - the initrd and your distribution image.
-1. Build an initrd image using the `cpio` output format with the same target distribtution as you want to use for your distribution image. mkosi compresses the `cpio` output format by default.
+1. Build an initrd image using the `cpio` output format with the same target distributions as you want to use for your distribution image. mkosi compresses the `cpio` output format by default.
```
[Output]
Format=cpio
with complete_step("Running build script…"), mount_build_overlay(state):
# Bubblewrap creates bind mount point parent directories with restrictive permissions so we create
- # the work directory outselves here.
+ # the work directory ourselves here.
state.root.joinpath("work").mkdir(mode=0o755)
bwrap: list[PathString] = [
package_env.mkdir(exist_ok=True)
self.ebuild_sh_env_dir.mkdir(exist_ok=True)
- # apply whatever we put in mkosi_conf to runs invokation of emerge
+ # apply whatever we put in mkosi_conf to runs invocation of emerge
package_env.joinpath("mkosi.conf").write_text("*/* mkosi.conf\n")
# we use this so we don't need to touch upstream files.
def excepthook(exctype: Type[BaseException], exc: BaseException, tb: Optional[TracebackType]) -> None:
- """Attach to sys.excepthook to automically format exceptions with a RemoteException attached correctly."""
+ """Attach to sys.excepthook to automatically format exceptions with a RemoteException attached correctly."""
if isinstance(exc.__cause__, RemoteException):
print(exc.__cause__, file=sys.stderr)
else: