# mkosi Changelog
+## v20
+
+- During the image build we now install UKIs/kernels/initrds to `/boot`
+ instead of `/efi`. While this will generally not be noticeable, users
+ with custom systemd-repart ESP partition definitions will need to add
+ `CopyFiles=/boot:/` along with the usual `CopyFiles=/efi:/` to their
+ ESP partition definitions. By installing UKIs/kernels/initrds to
+ `/boot`, it becomes possible to use `/boot` to populate an XBOOTLDR
+ partition which wasn't possible before. Note that this is also safe to
+ do before `v20` so `CopyFiles=/boot:/` can unconditionally be added to
+ any ESP partition definition files.
+
## v19
- Support for RHEL was added!
with config.open("a") as f:
f.write('if [ "${grub_platform}" == "efi" ]; then\n')
- for uki in (state.root / "efi/EFI/Linux").glob("*.efi"):
+ for uki in (state.root / "boot/EFI/Linux").glob("*.efi"):
f.write(
textwrap.dedent(
f"""\
menuentry "{uki.stem}" {{
- chainloader /{uki.relative_to(state.root / "efi")}
+ chainloader /{uki.relative_to(state.root / "boot")}
}}
"""
)
token = find_entry_token(state)
- dst = state.root / "efi" / token
+ dst = state.root / "boot" / token
with umask(~0o700):
dst.mkdir(exist_ok=True)
]
initrds += [Path(shutil.copy2(kmods, kdst / "kmods"))]
- image = Path("/") / kimg.relative_to(state.root / "efi")
+ image = Path("/") / kimg.relative_to(state.root / "boot")
cmdline = " ".join(state.config.kernel_command_line)
initrds = " ".join(
- [os.fspath(Path("/") / initrd.relative_to(state.root / "efi")) for initrd in initrds]
+ [os.fspath(Path("/") / initrd.relative_to(state.root / "boot")) for initrd in initrds]
)
f.write(
token = find_entry_token(state)
if roothash:
_, _, h = roothash.partition("=")
- boot_binary = state.root / f"efi/EFI/Linux/{token}-{kver}-{h}{boot_count}.efi"
+ boot_binary = state.root / f"boot/EFI/Linux/{token}-{kver}-{h}{boot_count}.efi"
else:
- boot_binary = state.root / f"efi/EFI/Linux/{token}-{kver}{boot_count}.efi"
+ boot_binary = state.root / f"boot/EFI/Linux/{token}-{kver}{boot_count}.efi"
microcode = build_microcode_initrd(state)
[Partition]
Type=esp
Format=vfat
+ CopyFiles=/boot:/
CopyFiles=/efi:/
SizeMinBytes={"1G" if bios else "512M"}
SizeMaxBytes={"1G" if bios else "512M"}