38d2eced721af738a1bdad6bb73e7dec6cf3dbfa — наб 3 months ago 9daa92b
Add uninstallation sexions to manpage and README
3 files changed, 23 insertions(+), 3 deletions(-)

M man/index.txt
M man/klapki.md
M README.md => README.md +13 -0
@@ 40,6 40,19 @@ will work on x86_64 and i686.
See the [repository README](//debian.nabijaczleweli.xyz/README) for more information.

## Uninstallation

Remove the variable corresponding to the host under the klapki GUID (`a8a9ad3a-f831-11ea-946d-674ccd7415cc`).

For example, on Linux, with host "zoot":
chattr -i /sys/firmware/efi/efivars/zoot-a8a9ad3a-f831-11ea-946d-674ccd7415cc
rm        /sys/firmware/efi/efivars/zoot-a8a9ad3a-f831-11ea-946d-674ccd7415cc

This will abandon any previously-managed entries by removing all state, so either run `{delkernel ver}` for all versions you had registered beforehand,
or remove the entries and files later with [`efibootmgr(8)`](//manpages.debian.org/buster/efibootmgr/efibootmgr.8.en.html)/EFI shell/the firmware UI.

## Reporting bugs

There's [the tracker](//todo.sr.ht/~nabijaczleweli/klapki), but also see the list below.

M man/index.txt => man/index.txt +0 -1
@@ 2,7 2,6 @@ klapki(8)          klapki.8.ronn

SHA1(3ssl)         https://manpages.debian.org/buster/libssl-doc/SHA1.3ssl.en.html
efibootmgr(8)      https://manpages.debian.org/buster/efibootmgr/efibootmgr.8.en.html
efivar(1)          https://manpages.debian.org/buster/efivar/efivar.1.en.html
execl(3)           https://manpages.debian.org/buster/manpages-dev/execl.3.en.html
gethostname(2)     https://manpages.debian.org/buster/manpages-dev/gethostname.2.en.html
memfd_create(2)    https://manpages.debian.org/buster/manpages-dev/memfd_create.2.en.html

M man/klapki.md => man/klapki.md +10 -2
@@ 17,8 17,8 @@ Care is taken to only write what is needed and only when it's needed –
files and wanted entries are hashed with SHA1(3ssl) and only updated on mismatch;
foreign entries are never touched, and klapki(8) prefers to abandon entries it doesn't understand than to accidentally mangle them.

Minimal state is stored, and it's only supplementary.
This means that removing all instances of a kernel boot entry with tools such as efibootmgr(8), efivar(1),
Minimal state is stored, and it's only supplementary (see [UNINSTALLATION][]).
This means that removing all instances of a kernel boot entry with tools such as efibootmgr(8), the EFI Shell,
or the platform UI will make klapki(8) forget about the kernel entirely, after minor complaints.

klapki(8)'s entries *can* be moved across `BootNNNN` entries, however, so long as they are kept identical.

@@ 152,6 152,14 @@ The simplest `/etc/klapki/description` would be a link to `/bin/echo`.
A simple `cmdline` is a `/bin/sh` shebang + `echo` command.
A cursed `cmdline` would be a `/bin/sh` shebang and an `awk '{gsub(/initrd=[^ ]+ ?/, ""); print}' /proc/cmdline` command.


Remove the EFI variable corresponding to the host (see [ENVIRONMENT][]) under klapki's GUID (a8a9ad3a-f831-11ea-946d-674ccd7415cc).
This will purge the state for the host and hence abandon any entries left over, which remain bootable;
to remove all klapki entries run `{delkernel}` first (see [OPS][]), or remove them manually from the ESP and firmware afterward.

On Linux this involves running `chattr -i`, then `rm` on `/sys/firmware/efi/efivars/{KLAPKI_HOST}-a8a9ad3a-f831-11ea-946d-674ccd7415cc`.


    1 - error reading configuration,