Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,22 @@ No kernel that shim would refuse is ever left installed. With Secure Boot
enforcing, `--install` requires the key set, the sbsign tools and a key
that is enrolled or queued (`secure_boot_preflight`, before dpkg; the app
checks the same in `install_blocker` and refuses up front). If signing
then fails, the just-installed packages are purged again
(`rollback_install`) and the run fails. A queued key is fine: the kernel
then fails, `rollback_and_die` undoes the install and the run fails: new
packages are purged, a leftover `/lib/modules/<kver>` removed and their
boot entry removed (`remove_boot_entry`: no postrm hook removes a
systemd-boot entry); a version that was installed before (its
`/boot/vmlinuz-<kver>` is there; a rebuild, maybe of the running kernel) is
never purged: its kernel, System.map, config and modules are kept before
dpkg (`keep_installed_kernel`, hard links), its initramfs copied when
`/boot` has room (else generated again on restore), and moved back. The
copy is taken after the package lock wait and the interrupted-run repair.
Any other stop once `dpkg -i` has really run (`KEEP_ARMED`, set in
`dpkg_install`) and before the install finished puts it back too
(`kept_kernel_on_exit`, the EXIT trap); a stop before that only drops the
copy, and a stop by a signal (TERM, HUP, INT) never restores: the kept files
stay and their paths are logged. A restore that fails part way leaves the
rest where it was kept and names the paths. Everything the steps after dpkg need (an initramfs tool,
kernel-install or kernelstub) is checked before dpkg. A queued key is fine: the kernel
boots once MOK Manager enrolls it.

## Kernel signing
Expand Down Expand Up @@ -299,6 +313,12 @@ boots once MOK Manager enrolls it.
before 2.2.3) gets its package reinstalled, which puts the
distribution's copy back. A failed reinstall only logs. Never from the
apt hook, which runs inside dpkg.
- systemd-boot entries are looked for on the ESP and then on the XBOOTLDR
partition (`bootctl --print-boot-path`, `KERNEL_POP_XBOOTLDR` in tests);
the paths in an entry are relative to the partition it is on
(`sdboot_entry_root`). After an install the ESP copy is refreshed whether
or not the kernel was signed (the package hook copied the initramfs from
before DKMS) and every file the entry names must exist.
- `prune_esp_initrds <esp> <kver>`: after every kernel-install add and at the
end of a systemd-boot install, initramfs files ("initrd", "initrd.img-*")
in the entry's ESP directory that the entry does not name are removed
Expand All @@ -310,8 +330,12 @@ boots once MOK Manager enrolls it.
- shim in front of systemd-boot (`setup_shim_chain`, from
`do_setup_signing` when `detect_bootloader` says systemd-boot): the
layout of Ubuntu's systemd-boot postinst `install_shim` (shim/fb/mm in
`EFI/<os-release ID>/`, shim at `EFI/BOOT/BOOTX64.EFI`, UCS-2LE
`BOOTX64.CSV` byte-identical to install_shim's, firmware entry
`EFI/<os-release ID>/`, shim at `EFI/BOOT/BOOTX64.EFI` only over a
fallback loader that is ours (`fallback_is_ours`: none, shim, or
systemd-boot; never Windows' or another distribution's, and then no
fbx64 either; copied before `EFI/<vendor>`, so a run that fails part way
still sees it as ours next time), UCS-2LE `BOOTX64.CSV` (written tmp + mv)
byte-identical to install_shim's, firmware entry
`<Vendor>` = `EFI/<vendor>/shimx64.efi` with load option
`\EFI\systemd\systemd-bootx64.efi \0`), done by the script itself so it
also works while GRUB's packages are installed (install_shim returns
Expand Down Expand Up @@ -356,7 +380,11 @@ boots once MOK Manager enrolls it.
run `finish_interrupted_dpkg` first: with files in
`/var/lib/dpkg/updates` or any `dpkg --audit` output (a run cut off by a
crash or power cut), `dpkg --configure -a`, `apt-get install -f`, and
`--reinstall` of packages whose status has the reinst-required flag.
`--reinstall` of packages whose status has the reinst-required flag. Every
apt repair (`install -f`, that `--reinstall`, the `install -f` after a failed
`dpkg -i`) is simulated first (`apt_removals`: `Remv` and `Purg` lines) and
not run when it would remove a package (after a failed `dpkg -i`, only the
new packages themselves may go, and only when they replaced nothing).

## Build process

Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ One `## <version> — <date>` heading per released version, newest first. A rele
carries its section as written, and the AppStream `<releases>` list is generated from these
headings.

## 2.6.0 — 2026-11-18

- **A kernel that could not be signed under Secure Boot no longer leaves a broken boot entry.** On
systemd-boot, the rollback now removes the boot menu entry too, so the machine does not try the
removed kernel by default on the next start.
- **Reinstalling a kernel version you already have is safe under Secure Boot.** If the new build
cannot be signed, the kernel that was installed before (even the running one) is put back
instead of being removed.
- On systemd-boot and Pop!_OS, the kernel's copy on the EFI partition now always gets the final
initramfs, with the DKMS modules (such as the NVIDIA driver) built in, also without kernel
signing set up. The install checks that every file the boot entry names is there.
- Kernel Pop no longer lets apt remove packages unasked: when repairing an interrupted update or a
failed install would remove packages, it stops and tells you what would go.
- The install checks for an initramfs tool and the boot loader's tools before it installs
anything, instead of failing halfway.
- Removing a kernel now always notices when that would also remove Ubuntu's kernel metapackages.
- Set Up Signing repairs an earlier failed copy of a signed kernel to the EFI partition, and keeps
the systemd-boot on the EFI partition up to date when it was signed before.
- Set Up Signing leaves the fallback boot loader alone on an EFI partition shared with Windows or
another distribution.
- Systems with a separate `/boot` boot partition (XBOOTLDR) are supported for systemd-boot
entries.
- DKMS modules are re-signed on systems with DKMS 2, and for modules whose dkms.conf uses single
quotes or names no module.
- Closing the window while the build summary is open closes it at once and deletes the prepared
source tree.
- Tarballs whose members start with `./` can be built.
- A download that fails on its last write (a full disk) is retried and leaves no partial file.

## 2.5.2 — 2026-11-16

- **The window takes your desktop's accent colour.** On GNOME, KDE Plasma and COSMIC, primary
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kernel-pop"
version = "2.5.2"
version = "2.6.0"
edition = "2021"
rust-version = "1.100"
description = "Kernel Pop — GUI that builds kernel.org kernels for this machine and installs them"
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ VFS-panics on boot. This app is built around not letting that happen:
System tab, once signing is set up
- With Secure Boot on, a kernel that could not boot is never installed:
the install is refused until signing is set up, and a kernel whose
signing fails is removed again
signing fails is removed again, boot menu entry included (a rebuild of a
version already installed puts the one from before back instead)
- Optional kernel signing: a one-time Set Up Signing step creates Kernel
Pop's own signing key, signs the installed kernels, puts shim in front of
systemd-boot where the firmware starts it directly, and queues the key
Expand Down Expand Up @@ -275,7 +276,9 @@ absent:
put back by reinstalling the package that ships it
- copies shim, MOK Manager and the fallback loader to the ESP, puts shim at
the fallback path `EFI/BOOT/BOOTX64.EFI`, and writes the `BOOTX64.CSV`
that restores the entry after a firmware reset
that restores the entry after a firmware reset. On an ESP shared with
Windows or another distribution whose loader sits at that path, it is
left alone: the firmware entry below is what starts this system
- adds a firmware entry named after the distribution that starts shim with
systemd-boot as what it loads, then removes the "Linux Boot Manager"
entries `bootctl` adds, which skip shim. Every copy to the ESP must
Expand Down Expand Up @@ -319,8 +322,11 @@ signed with a key that is enrolled or waiting for enrollment:
before anything changes, and the app points you to Set Up Signing.
- If signing the new kernel fails, or the copy on the ESP that systemd-boot
or kernelstub starts does not carry the signature, its packages are
removed again, so no kernel that shim would refuse is left in the boot
menu.
removed again, with its systemd-boot entry, so no kernel that shim would
refuse is left in the boot menu. A rebuild of a version that was already
installed (the running kernel, say) is never removed: the kernel and
modules from before are put back with its initramfs. The same happens when
the install stops for any other reason before it has finished.
- If the key is still waiting for enrollment, the kernel is installed and
signed, and the install reminds you to confirm the enrollment at the MOK
Manager screen on the next reboot; skip that and it will not boot.
Expand Down
1 change: 1 addition & 0 deletions data/io.github.labj1987.KernelPop.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<category>System</category>
</categories>
<releases>
<release version="2.6.0" date="2026-11-18"/>
<release version="2.5.2" date="2026-11-16"/>
<release version="2.5.1" date="2026-11-16"/>
<release version="2.5.0" date="2026-11-16"/>
Expand Down
Loading