Commit Graph

81 Commits

Author SHA1 Message Date
Thomas Lamprecht
40cfed49af bump version to 6.0-11 with ABI 5.3.7-1-pve
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 19:44:35 +02:00
Thomas Lamprecht
1a72195a29 followup: code cleanup
* add some spaces for separation, increasing readability
* do not use the non-existent variable x as replacement, but an actual
  empty string ""
* don't use the "truth-y action" at end to make awk print the line ($0)
  but explicitly print $0 after the gsub, makes it easier to get for
  people with not much awk background

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-17 07:44:52 +02:00
Oguz Bektas
86cdbeb5aa fix #2403: exclude initrd entries from /proc/cmdline
if we fallback to /proc/cmdline, it can include the booted initrd.

to avoid loader entries with initrd 'options' lines, we have to parse
them out.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-10-17 07:25:15 +02:00
Thomas Lamprecht
1533d98534 bump version to 6.0-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-02 08:42:21 +02:00
Thomas Lamprecht
015b1e852f bump version to 6.0-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-30 09:47:22 +02:00
Thomas Lamprecht
6b9b98085f d/control: adapt to lintian change regarding empty-binary-package
Previously, mentioning "virtual package" in the package long
description was enough to supress the "empty-binary-package" linitian
tag[0]. That changed, so let's use "metapackage", which is suggested
as one of the replacement options.

[0]: https://lintian.debian.org/tags/empty-binary-package.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-30 09:47:22 +02:00
Thomas Lamprecht
3cfa335dc3 bump version to 6.0-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-05 15:38:00 +02:00
Thomas Lamprecht
8d0eb48179 bump version to 6.0-7 with ABI 5.0.21-1-pve
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-08-21 09:44:38 +02:00
Stefan Reiter
d156f6aa14 Add efiboot refresh hook to update-initramfs
As explained in [0], we can add a hook script that will be called after
update-initramfs did its job (and thus, a new initrd has been created).

We can use this to automatically sync the ESPs using 'pve-efiboot-tool
refresh', if update-initramfs was called manually (on kernel upgrade we
already have a hook that does this).

[0]: https://kernel-team.pages.debian.net/kernel-handbook/ch-update-hooks.html

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-08-05 13:26:08 +02:00
Fabian Grünbichler
27d9325195 efiboot refresh: check --hook parameter
against list of default hook scripts.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-08-05 13:26:08 +02:00
Stefan Reiter
6e829c9b0a Add parameter '--hook' to 'refresh' command
Mostly to avoid calling hooks directly in other scripts, future-proofing.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-08-05 12:06:52 +02:00
Thomas Lamprecht
82a85499c3 bump version to 6.0-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 16:47:37 +02:00
Thomas Lamprecht
46aeff56bc bump version to 6.0-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-15 15:08:59 +02:00
Thomas Lamprecht
992c689e1b pve-efiboot-tool: accept also 'kernel' for the 'kernels' command
As all operations are done on a single or no version, thus "kernel"
fits minimally better, IMO. But just accept both, for convenience

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-15 15:07:42 +02:00
Thomas Lamprecht
f43873b2be zz-efiboot: output ESP_LIST fn quoted, to avoid copying the !
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-15 15:06:01 +02:00
Thomas Lamprecht
d0519968fa pve-efiboot-tool: small output hints and cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-15 15:02:31 +02:00
Thomas Lamprecht
f879b0405d zz-pve-efiboot: make loader title product dependent
default to "Proxmox Virtual Environment", and if the
proxmox-mailgateway package is installed (we simply check the docs
path) use "Proxmox Mailgateway" instead

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-15 14:36:03 +02:00
Fabian Grünbichler
4f11dd6347 efiboot: guard against grep returning non-zero
which would trigger 'set -e', instead of continuing with correct (empty)
strings.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
e0bda4e7b3 efiboot: only keep last two series metapackages
namely, the current/latest and previous one, for which we also keep the
last kernel installed and synced.

the pipe to 'head' has the added bonus of guarding against 'grep'
returnin non-zero and triggering 'set -e'

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
c2c2229764 pve-efiboot-tool: also refresh autoremove config
especially after modifying the manually selected kernels list, we don't
want this to be skipped.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
401a69c9ed zz-pve-efiboot: use loop_esp_list helper
to loop over list of ESPs, like in pve-efiboot-tool

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
2d7389fb02 pve-efiboot-tool: add 'kernels list' subcommand
to list custom and automatically selected kernel versions that are synced to configured ESPs

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
427fba7112 efiboot: add manual kernel list
with 'kernels <add|remove>' command in pve-efiboot-tool to add/remove
kernels to/from manual kernel list, and honor it when generating lists
of kernels to not autoremove/sync to ESPs

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
0956bd22cb pve-efiboot-tool: add clean command
to remove outdated entries from the ESP list

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
2955b2b7fe pve-efiboot-tool: add and use list file helpers
in preparation of adding another file for custom kernels with the same semantics

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
4bd56b83e1 efiboot: add loop_esp_list helper
that calls the passed-in function+args for each UUID

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Fabian Grünbichler
e0379dcf06 efiboot: actually sync last kernel of old series
and not just keep it from being autoremoved

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-15 14:28:21 +02:00
Thomas Lamprecht
7979ef4599 bump version to 6.0-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 18:35:53 +02:00
Fabian Grünbichler
420039cdb3 pve-efiboot-tool: initialize in mount namespace
by re-executing the whole 'pve-efiboot-tool init' command inside a new mount namespace

Co-Developed-By: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-11 18:27:06 +02:00
Fabian Grünbichler
cfb0e459ea zz-pve-efiboot: re-exec in mount namespace
to avoid affecting the running system negatively, e.g. because the
target paths for mounting the ESPs have been modified via symlinks or
similar attacks.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-11 18:27:06 +02:00
Fabian Grünbichler
7800310ce5 efiboot: add new mount namespace helper
to re-execute the currently running script in an unshared mount name
space.

Co-Developed-By: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-11 18:27:06 +02:00
Thomas Lamprecht
58487bcb45 bump version to 6.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 21:13:08 +02:00
Thomas Lamprecht
425f328334 rename pveesptool to pve-efiboot-tool
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 21:11:28 +02:00
Thomas Lamprecht
0b99d576b6 pveesptool: document 'help' command in usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 20:34:02 +02:00
Fabian Grünbichler
7b2efc96c3 add B=R on proxmox-ve << 6.0-2~
since we took over the efiboot files from there.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Fabian Grünbichler
c2f02a98c9 efiboot: call on kernel removal as well
but don't pass in newly 'installed' kernel version

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Fabian Grünbichler
a8dad4e801 efiboot: always exit cleanly
otherwise the whole apt process stops.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Fabian Grünbichler
5b03b1fdb5 efiboot: be less verbose if UUID file does not exist
this is the default for upgraded systems after all.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Fabian Grünbichler
2d87fee570 efiboot: move kernel CMDLINE check
from global scope to where it is actually used, otherwise this gets
called/printed too often/early.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Fabian Grünbichler
e39283780b esptool: move more variables to functions
which is sourced by all scripts anyway.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Stoiko Ivanov
b3d47d2de2 pve-kernel-helper: add new package
with (sh) pveesptool to format, initialize and refresh synced ESPs, as
well as the hooks previously shipped via proxmox-ve.

pveesptool based on a never-released version written in perl by Stoiko
Ivanov.

Co-Developed-By: Stoiko Ivanov <s.ivanov@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-10 20:17:53 +02:00
Stoiko Ivanov
050577f6b6 buildsys: minor cleanups 2019-07-10 20:17:53 +02:00
Stoiko Ivanov
c657cb3523 zz-pve-efiboot: remove unmount warning
it is printed everytime (also on clean exit) and distracting
2019-07-10 20:17:53 +02:00
Stoiko Ivanov
0b3c3df641 zz-pve-efiboot: adapt to static list of ESPs
read a list of vfat UUIDs from /etc/kernel/pve-efiboot-uuids instead of
taking all blockdevices with vfat and the proper partition type

Otherwise all guests having an ESP would get it mounted and potentially
modified
2019-07-10 20:17:53 +02:00
Stoiko Ivanov
3a3a4843ba zz-pve-efiboot: remove outdated comments 2019-07-10 20:17:53 +02:00
Stoiko Ivanov
fbf55ac2f2 efiboot: adapt includepaths to new package 2019-07-10 20:17:53 +02:00
Stoiko Ivanov
b17a1cf33b add efiboot and autoremoval hooks
moved from proxmox-ve, in order to provide one package which contains all
relevant helper functions for pve-kernels
2019-07-10 20:17:53 +02:00
Thomas Lamprecht
6b7e047219 bump version to 6.0-2 with ABI 5.0.15-1-pve
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-03 12:55:03 +02:00
Thomas Lamprecht
28981a83cd bump version to 6.0-1 with ABI 5.0.12-1-pve
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-18 08:00:19 +02:00
Thomas Lamprecht
0eaa95fee2 bump version to 6.0-0+2 wit ABI 5.0.8-2-pve
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-25 19:57:34 +02:00