diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2023-10-27 12:16:59 +0200 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2023-10-27 12:16:59 +0200 |
commit | ca1ecc6b2f16cd42a31c63602e47926a5d40ee98 (patch) | |
tree | 9e3ee9c4b9e7d9672ec8d2c5587f5a9d97d8bd04 | |
download | prepare-lastboot-ca1ecc6b2f16cd42a31c63602e47926a5d40ee98.tar.gz prepare-lastboot-ca1ecc6b2f16cd42a31c63602e47926a5d40ee98.tar.bz2 prepare-lastboot-ca1ecc6b2f16cd42a31c63602e47926a5d40ee98.zip |
Initial commit.
-rw-r--r-- | PKGBUILD | 22 | ||||
-rwxr-xr-x | prepare-lastboot.install | 13 |
2 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..eaf7f70 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Jaron Kent-Dobias <jaron@kent-dobias.com> + +pkgname=prepare-lastboot +pkgver=1.2 +pkgrel=1 +pkgdesc='Support for ZFS fallback to a previous boot' +arch=(any) +license=(GPL2) +url='https://kent-dobias.com/system/prepare-lastboot' +depends=('zfs' 'zfs-utils') +makedepends=() +optdepends=('systemd-ukify: create addon efi executable') +source=(https://git.kent-dobias.com/system/prepare-lastboot/snapshot/prepare-lastboot-${pkgver}.tar.gz) +sha256sums=('d6282aabcaf7e19feee5a7ec9348625795428edf7c15d216f3619b3377743ac0') +install='prepare-lastboot.install' + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + install -Dm 644 "prepare-lastboot@.service" "${pkgdir}/usr/lib/systemd/system/prepare-lastboot@.service" + install -Dm 644 "prepare-lastboot@.timer" "${pkgdir}/usr/lib/systemd/system/prepare-lastboot@.timer" + install -Dm 755 "prepare-lastboot" "${pkgdir}/usr/bin/prepare-lastboot" +} diff --git a/prepare-lastboot.install b/prepare-lastboot.install new file mode 100755 index 0000000..48a20ae --- /dev/null +++ b/prepare-lastboot.install @@ -0,0 +1,13 @@ +post_install() { + echo "For the lastboot EFI entry to boot the correct filesystem," + echo "the kernel command line of the UKI must be amended. If your" + echo "root filesystem is zroot/root/default, you can run" + echo "" + echo "# /usr/lib/systemd/ukify build --cmdline \"root=zfs:zroot/root/lastboot-default\" \\" + echo "# --output=/efi/EFI/Linux/lastboot-default.efi.extra.d/cmdline.addon.efi" + echo "" + echo "and sign the restulting file, if necessary. The service is" + echo "enabled by running" + echo "" + echo "# systemctl enable prepare-lastboot@default.timer" +} |