]> git.proxmox.com Git - pve-kernel-meta.git/log
pve-kernel-meta.git
5 weeks agobump version to 7.4-12 pve-kernel-5.15
Thomas Lamprecht [Fri, 29 Mar 2024 14:47:51 +0000 (15:47 +0100)]
bump version to 7.4-12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agobump version to 7.4-11
Thomas Lamprecht [Thu, 8 Feb 2024 18:33:38 +0000 (19:33 +0100)]
bump version to 7.4-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 months agobump version to 7.4-10
Thomas Lamprecht [Tue, 23 Jan 2024 14:07:02 +0000 (15:07 +0100)]
bump version to 7.4-10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agobump version to 7.4-9
Thomas Lamprecht [Fri, 1 Dec 2023 14:08:30 +0000 (15:08 +0100)]
bump version to 7.4-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agobump version to 7.4-8
Thomas Lamprecht [Thu, 9 Nov 2023 09:30:54 +0000 (10:30 +0100)]
bump version to 7.4-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agobump version to 7.4-7
Thomas Lamprecht [Tue, 3 Oct 2023 17:23:28 +0000 (19:23 +0200)]
bump version to 7.4-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agobump version to 7.4-6
Thomas Lamprecht [Tue, 29 Aug 2023 14:42:21 +0000 (16:42 +0200)]
bump version to 7.4-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agobump version to 7.4-5
Wolfgang Bumiller [Mon, 21 Aug 2023 11:58:22 +0000 (13:58 +0200)]
bump version to 7.4-5

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 months agobump version to 7.4-4
Thomas Lamprecht [Mon, 19 Jun 2023 14:06:43 +0000 (16:06 +0200)]
bump version to 7.4-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 7.4-3
Thomas Lamprecht [Wed, 10 May 2023 11:04:14 +0000 (13:04 +0200)]
bump version to 7.4-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agobump version to 7.4-2
Thomas Lamprecht [Thu, 20 Apr 2023 11:43:00 +0000 (13:43 +0200)]
bump version to 7.4-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agobump version to 7.4-2
Thomas Lamprecht [Thu, 20 Apr 2023 11:42:55 +0000 (13:42 +0200)]
bump version to 7.4-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobump version to 7.4-1
Thomas Lamprecht [Wed, 29 Mar 2023 16:06:25 +0000 (18:06 +0200)]
bump version to 7.4-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobump version to 7.3-3
Thomas Lamprecht [Tue, 14 Mar 2023 15:50:57 +0000 (16:50 +0100)]
bump version to 7.3-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobump version to 7.3-2
Thomas Lamprecht [Wed, 1 Feb 2023 16:25:12 +0000 (17:25 +0100)]
bump version to 7.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 7.3-1
Thomas Lamprecht [Thu, 15 Dec 2022 15:23:24 +0000 (16:23 +0100)]
bump version to 7.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 7.2-14
Thomas Lamprecht [Mon, 14 Nov 2022 19:39:22 +0000 (20:39 +0100)]
bump version to 7.2-14

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobump version to 7.2-13
Thomas Lamprecht [Thu, 13 Oct 2022 14:49:09 +0000 (16:49 +0200)]
bump version to 7.2-13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
19 months agobump version to 7.2-12
Thomas Lamprecht [Tue, 4 Oct 2022 15:03:58 +0000 (17:03 +0200)]
bump version to 7.2-12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
19 months agobump version to 7.2-11
Thomas Lamprecht [Tue, 20 Sep 2022 09:11:53 +0000 (11:11 +0200)]
bump version to 7.2-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
19 months agoavoid upload of helpers package from non-master
Thomas Lamprecht [Wed, 7 Sep 2022 13:12:39 +0000 (15:12 +0200)]
avoid upload of helpers package from non-master

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agobump version to 7.2-10
Thomas Lamprecht [Mon, 29 Aug 2022 16:23:24 +0000 (18:23 +0200)]
bump version to 7.2-10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agobump version to 7.2-9
Thomas Lamprecht [Tue, 9 Aug 2022 13:08:14 +0000 (15:08 +0200)]
bump version to 7.2-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agobump version to 7.2-8
Thomas Lamprecht [Wed, 27 Jul 2022 12:27:37 +0000 (14:27 +0200)]
bump version to 7.2-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agobuildsys: ignore irrelevant lintian overrides
Thomas Lamprecht [Thu, 21 Jul 2022 06:31:49 +0000 (08:31 +0200)]
buildsys: ignore irrelevant lintian overrides

it would be nice to get a proxmox-boot-tool man page though, so keep
that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agobump version to 7.2-7
Thomas Lamprecht [Thu, 21 Jul 2022 05:37:06 +0000 (07:37 +0200)]
bump version to 7.2-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agobump version to 7.2-6
Thomas Lamprecht [Thu, 23 Jun 2022 12:04:19 +0000 (14:04 +0200)]
bump version to 7.2-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agobump version to 7.2-5
Thomas Lamprecht [Fri, 17 Jun 2022 13:52:24 +0000 (15:52 +0200)]
bump version to 7.2-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agobump version to 7.2-4
Thomas Lamprecht [Thu, 2 Jun 2022 12:44:31 +0000 (14:44 +0200)]
bump version to 7.2-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.2-3
Thomas Lamprecht [Wed, 4 May 2022 14:55:29 +0000 (16:55 +0200)]
bump version to 7.2-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.2-2
Thomas Lamprecht [Wed, 27 Apr 2022 17:08:55 +0000 (19:08 +0200)]
bump version to 7.2-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: add reinit subcommand
Stoiko Ivanov [Fri, 11 Mar 2022 19:05:40 +0000 (20:05 +0100)]
proxmox-boot: add reinit subcommand

to iterate over all configured ESPs and refresh the boot-loader
installations.

the init function was changed to not run refresh directly - to prevent
refresh from running once for each ESP

currently reinit does not imply refresh

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agorename pve-efiboot-manual-kernels to proxmox-boot-manual-kernels
Stoiko Ivanov [Fri, 11 Mar 2022 19:05:39 +0000 (20:05 +0100)]
rename pve-efiboot-manual-kernels to proxmox-boot-manual-kernels

was forgotten during the general renaming of pve-efiboot ->
proxmox-boot.

follows commit 8c0a22adfe15dc00cf2194647bb254201d8d187b

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agop-b-t: pinning: output hint on next-boot only pinning
Thomas Lamprecht [Tue, 26 Apr 2022 10:40:03 +0000 (12:40 +0200)]
p-b-t: pinning: output hint on next-boot only pinning

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agop-b-t: pinning: prompt for auto-refresh on interactive seesion
Thomas Lamprecht [Tue, 26 Apr 2022 09:37:53 +0000 (11:37 +0200)]
p-b-t: pinning: prompt for auto-refresh on interactive seesion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: fix #3729 add --graceful to bootctl invocation
Stoiko Ivanov [Mon, 25 Apr 2022 16:33:01 +0000 (18:33 +0200)]
proxmox-boot: fix #3729 add --graceful to bootctl invocation

The version of systemd boot in bullseye, tries writing an efivar which
is not writeable on certain (broken) UEFIs (HP thin clients).

The issue was not present in the version in buster (the variable
simply did not get written) and can be worked around by adding
--graceful to the `bootctl install` command.

see also:
https://github.com/systemd/systemd/issues/13603

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agod/copyright: update years
Thomas Lamprecht [Fri, 22 Apr 2022 10:15:57 +0000 (12:15 +0200)]
d/copyright: update years

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.2-1
Thomas Lamprecht [Fri, 22 Apr 2022 09:39:26 +0000 (11:39 +0200)]
bump version to 7.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-14
Thomas Lamprecht [Tue, 29 Mar 2022 13:48:33 +0000 (15:48 +0200)]
bump version to 7.1-14

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-13
Thomas Lamprecht [Sat, 12 Mar 2022 14:39:52 +0000 (15:39 +0100)]
bump version to 7.1-13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoboot tool: seletive usage help message
Thomas Lamprecht [Fri, 4 Mar 2022 10:08:07 +0000 (11:08 +0100)]
boot tool: seletive usage help message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agokernel pinning: note when overriding previous pin
Thomas Lamprecht [Fri, 4 Mar 2022 10:05:23 +0000 (11:05 +0100)]
kernel pinning: note when overriding previous pin

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agokernel pinning: output possible kversions on bad usage
Thomas Lamprecht [Fri, 4 Mar 2022 10:04:54 +0000 (11:04 +0100)]
kernel pinning: output possible kversions on bad usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoboot-tool: shellcheck lint fixes
Thomas Lamprecht [Tue, 22 Feb 2022 16:28:34 +0000 (17:28 +0100)]
boot-tool: shellcheck lint fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: add pin/unpin functionality for non-p-b-t systems
Stoiko Ivanov [Fri, 11 Feb 2022 15:15:44 +0000 (16:15 +0100)]
proxmox-boot: add pin/unpin functionality for non-p-b-t systems

While running `update-grub` directly in this case is a divergence from
the semantics of the command when p-b-t handles booting it makes the
cleanup in the `next-boot` case a bit tidier.

fetching the next-boot version explicitly again before setting the
provided version is to cover the sequence:
p-b-t kernel pin <ver1> --next-boot ; p-b-t kernel pin <ver2>

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: add --next-boot option kernel pin command
Stoiko Ivanov [Fri, 11 Feb 2022 15:15:43 +0000 (16:15 +0100)]
proxmox-boot: add --next-boot option kernel pin command

by setting the desired version in a dedicated file, which is used
by the systemd service as condition for removing it and refreshing
upon reboot.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3761: proxmox-boot: add pin/unpin for kernel-version
Stoiko Ivanov [Fri, 11 Feb 2022 15:15:42 +0000 (16:15 +0100)]
fix #3761: proxmox-boot: add pin/unpin for kernel-version

The 2 commands follow the mechanics of p-b-t kernel add/remove in
writing the desired abi-version to a config-file in /etc/kernel and
actually modifying the boot-loader configuration upon p-b-t refresh.

A dedicated new file is used instead of writing the version (with some
kind of annotation) to the manual kernel list to keep parsing the file
simple (and hopefully also cause fewer problems with manually edited
files)

For systemd-boot we write the entry into the loader.conf on the ESP(s)
instead of relying on the `bootctl set-default` mechanics (bootctl(1))
which write the entry in an EFI-var. This was preferred, because of a
few reports of unwriteable EFI-vars on some systems (e.g. DELL servers
have a setting preventing writing EFI-vars from the OS). The rationale
in `Why not simply rely on the EFI boot menu logic?` from [0] also
makes a few points in that direction.

For grub the following choices were made:
* write the pinned version (or actually the menu-path leading to it)
  to a snippet in /etc/default/grub.d instead of editing the grub.cfg
  files on the partition. Mostly to divert as little as possible from
  the grub-workflow I assume people are used to.
* the 'root-device-id' part of the menu-entries is parsed from
  /boot/grub/grug.cfg since it was stable (the same on all ESPs and in
  /boot/grub), saves us from copying the part of "find device behind
  /, mangle it if zfs/btrfs, call grub_probe a few times" part of
  grub-mkconfig - and seems a bit more robust

Tested with a BIOS and an UEFI VM with / on ZFS.

[0] https://systemd.io/BOOT_LOADER_SPECIFICATION/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: return empty if file does not exist in get_first_line
Stoiko Ivanov [Fri, 11 Feb 2022 15:15:41 +0000 (16:15 +0100)]
proxmox-boot: return empty if file does not exist in get_first_line

makes using this helper shorter in most cases

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-12
Thomas Lamprecht [Mon, 14 Feb 2022 14:13:10 +0000 (15:13 +0100)]
bump version to 7.1-12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agohelpers postinst: fixup initrd onetime after update
Thomas Lamprecht [Mon, 14 Feb 2022 14:08:28 +0000 (15:08 +0100)]
helpers postinst: fixup initrd onetime after update

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoinitrd modules: use simplefb
Thomas Lamprecht [Mon, 14 Feb 2022 14:07:24 +0000 (15:07 +0100)]
initrd modules: use simplefb

while it's the legacy variant it actually works over simpledrm with
amdgpu (glitches) and nvidia (complete breakage)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-11
Thomas Lamprecht [Tue, 8 Feb 2022 11:31:16 +0000 (12:31 +0100)]
bump version to 7.1-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoship config to always include simpledrm module in initrd
Thomas Lamprecht [Fri, 11 Feb 2022 15:28:24 +0000 (16:28 +0100)]
ship config to always include simpledrm module in initrd

to ensure the newly switched on SYS_FB kconfig doesn't breaks the
using the fb for the kernel, e.g., via fbcon

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: add get_first_line_from_file helper and use it
Stoiko Ivanov [Mon, 31 Jan 2022 17:59:15 +0000 (18:59 +0100)]
proxmox-boot: add get_first_line_from_file helper and use it

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: drop unused potential_esps function
Stoiko Ivanov [Mon, 31 Jan 2022 17:59:14 +0000 (18:59 +0100)]
proxmox-boot: drop unused potential_esps function

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agobump version to 7.1-10
Thomas Lamprecht [Fri, 4 Feb 2022 05:58:28 +0000 (06:58 +0100)]
bump version to 7.1-10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-9
Thomas Lamprecht [Mon, 31 Jan 2022 11:10:07 +0000 (12:10 +0100)]
bump version to 7.1-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-8
Thomas Lamprecht [Tue, 11 Jan 2022 12:45:52 +0000 (13:45 +0100)]
bump version to 7.1-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-7
Thomas Lamprecht [Tue, 14 Dec 2021 20:29:03 +0000 (21:29 +0100)]
bump version to 7.1-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3781: add Provides: wireguard-modules to control.in
Stoiko Ivanov [Mon, 13 Dec 2021 14:52:15 +0000 (15:52 +0100)]
fix #3781: add Provides: wireguard-modules to control.in

without this line `apt install wireguard` pulls in Debian's kernel +
firmware which confilcts with pve-firmware - forcing users to install
via `apt install --no-install-recommends wireguard-tools` in order to
get the userspace utils.

Plain debian has the 'Provides' in the meta-package[0]
(linux-image-amd64), so following this add it to pve-kernel-$MAJ.$MIN

versioned dependency added since wireguard has a versioned dependency
on wireguard-modules.

[0] https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/templates/control.image.meta.in

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agod/control.in: Provide linux-image/linux-headers
Stoiko Ivanov [Mon, 13 Dec 2021 14:52:14 +0000 (15:52 +0100)]
d/control.in: Provide linux-image/linux-headers

pve-kernel-$MAJ.$MIN (e.g. pve-kernel-5.15) is the equivalent
to linux-image-amd64 for plain debian systems (similarly
pve-headers-$MAJ.$MIN).

Providing the plain debian meta-packages should improve the user
experience, for example when users install DKMS packages, which have a
dependency on linux-headers-amd64.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: drop useless assignment to self
Thomas Lamprecht [Tue, 30 Nov 2021 18:01:32 +0000 (19:01 +0100)]
proxmox-boot: drop useless assignment to self

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: handle /etc/kernel/cmdline without any newline
Thomas Lamprecht [Tue, 30 Nov 2021 17:53:55 +0000 (18:53 +0100)]
proxmox-boot: handle /etc/kernel/cmdline without any newline

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-6
Thomas Lamprecht [Tue, 30 Nov 2021 15:43:30 +0000 (16:43 +0100)]
bump version to 7.1-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-5
Thomas Lamprecht [Tue, 30 Nov 2021 12:30:39 +0000 (13:30 +0100)]
bump version to 7.1-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: esp config: align options argunment vertically
Thomas Lamprecht [Thu, 11 Nov 2021 10:11:23 +0000 (11:11 +0100)]
proxmox-boot: esp config: align options argunment vertically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: read only first line of /etc/kernel/cmdline
Stoiko Ivanov [Wed, 10 Nov 2021 15:25:10 +0000 (16:25 +0100)]
proxmox-boot: read only first line of /etc/kernel/cmdline

following the commit of removing the wrong indentation of the linux
and initrd lines - this commit strips empty lines (and leading
trailing whitespace) in /etc/kernel/cmdline.

I managed to reproduce the issue reported in the forum [0] by adding
empty lines to /etc/kernel/cmdline) - without this - systemd-boot
booted quite happily even with the indentation.

considered using perl -pe with multiline matching but thanks to
Thomas' suggestion went with the shell-builtin read.

the check for existance of 'root=' in the resulting CMDLINE was added,
since my test-system had an empty line in the beginning, which again
rendered it unbootable.

quickly tested on a VM.

[0]: https://forum.proxmox.com/threads/problem-with-proxmox-boot-tool.99043/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: esp config: avoid leading whitespace in initrd/linux options
Oguz Bektas [Wed, 10 Nov 2021 13:07:46 +0000 (14:07 +0100)]
proxmox-boot: esp config: avoid leading whitespace in initrd/linux options

Not an actual issue, the systemd parser just skips those
whitespaces[0], but it may confuse people and lead to false-positive
conclusions about a culprit for loader issues, so fix that up.

[0]: https://github.com/systemd/systemd/blob/main/src/boot/efi/boot.c#L1064

diff before -> after:
 version  5.11.22-7-pve
 options   root=ZFS=rpool/ROOT/pve-1 boot=zfs iommu=pt
-    linux    /EFI/proxmox/5.11.22-7-pve/vmlinuz-5.11.22-7-pve
-    initrd   /EFI/proxmox/5.11.22-7-pve/initrd.img-5.11.22-7-pve
+linux    /EFI/proxmox/5.11.22-7-pve/vmlinuz-5.11.22-7-pve
+initrd   /EFI/proxmox/5.11.22-7-pve/initrd.img-5.11.22-7-pve

Fixes: 2a8a4b5 ("proxmox-boot: fix #3632 copy kernel+initrd unconditionally")
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
[ Thomas: Clarify that the commit does not fix anything but is still
  good to have ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-4
Thomas Lamprecht [Sat, 6 Nov 2021 14:17:00 +0000 (15:17 +0100)]
bump version to 7.1-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-3
Thomas Lamprecht [Tue, 19 Oct 2021 11:44:20 +0000 (13:44 +0200)]
bump version to 7.1-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-2
Thomas Lamprecht [Fri, 1 Oct 2021 07:15:55 +0000 (09:15 +0200)]
bump version to 7.1-2

only for helper/tool package

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: fix #3632 copy kernel+initrd unconditionally
Stoiko Ivanov [Thu, 23 Sep 2021 08:43:17 +0000 (10:43 +0200)]
proxmox-boot: fix #3632 copy kernel+initrd unconditionally

do not use the -u (update) flag when copying kernel images and inird
from /boot to the ESPs:
* the ESPs are formatted with vfat, which has a 2 second precision for
  mtime (`linux/fs/fat/misc.c` - `fat_truncate_time`)
* cp -u compares the mtimes of source (kernel image in /boot not on
  vfat) and destination - leading to the copy always being carried
  out, if the source files remain the same (and do not happen to have
  a mtime exactly happening on a even second)

as laid out in the bug-report - the case where this leads to an
unbootable system is when a kernel-version is shipped twice (built
with different tool-chains) - e.g. currently the 5.11 kernels in PVE 6
and PVE 7.

tested the behavior of `cp -u` by running opensnopp-bpfcc and copying
a file twice onto ext4 (opened only once) and on vfat (opened twice).

additionally reproduced the issue (by dist-upgrading a PVE 6 VM to 7
with the pve-no-subscription repo) and verified this patch fixes it.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agobump version to 7.1-1
Thomas Lamprecht [Tue, 28 Sep 2021 04:44:30 +0000 (06:44 +0200)]
bump version to 7.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-7
Thomas Lamprecht [Fri, 27 Aug 2021 09:55:36 +0000 (11:55 +0200)]
bump version to 7.0-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoboot-tool: prefer PVE for systemd-boot loader title
Fabian Grünbichler [Mon, 26 Jul 2021 10:18:31 +0000 (12:18 +0200)]
boot-tool: prefer PVE for systemd-boot loader title

like for Grub where this is handled via snippets with PVE > PMG > PBS.

Reported-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump version to 7.0-6
Thomas Lamprecht [Wed, 21 Jul 2021 17:38:44 +0000 (19:38 +0200)]
bump version to 7.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-5
Thomas Lamprecht [Mon, 12 Jul 2021 08:32:57 +0000 (10:32 +0200)]
bump version to 7.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-4
Thomas Lamprecht [Thu, 8 Jul 2021 08:10:26 +0000 (10:10 +0200)]
bump version to 7.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agogrub wrapper: skip if using boot-tool but also booted via EFI
Thomas Lamprecht [Thu, 8 Jul 2021 08:04:58 +0000 (10:04 +0200)]
grub wrapper: skip if using boot-tool but also booted via EFI

From Fabians feedback:
> this could have another guard for whether the system is even booted
> with grub as if the system was booted using EFI, re-initing all
> ESPs is just busy-work

So skip if proxmox-boot-tool and booted with EFI, as then GRUB is out
of the picture anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agogrub wrapper: log on ignore
Thomas Lamprecht [Thu, 8 Jul 2021 07:52:58 +0000 (09:52 +0200)]
grub wrapper: log on ignore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agogrub wrapper: move to simple space indentation and minimal whitespace cleanup
Thomas Lamprecht [Thu, 8 Jul 2021 07:27:15 +0000 (09:27 +0200)]
grub wrapper: move to simple space indentation and minimal whitespace cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox-boot: status: print present kernel versions
Stoiko Ivanov [Wed, 7 Jul 2021 21:09:54 +0000 (23:09 +0200)]
proxmox-boot: status: print present kernel versions

gives a better overview in case the system was switched at one time
from uefi to legacy (or the other way around).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: print current boot mode with status output
Stoiko Ivanov [Wed, 7 Jul 2021 21:09:53 +0000 (23:09 +0200)]
proxmox-boot: print current boot mode with status output

most support questions w.r.t. proxmox-boot-tool do have us
asking for `stat /sys/firmware/efi` output anyways

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: maintscript: change logic whether to add diversion
Stoiko Ivanov [Wed, 7 Jul 2021 21:09:52 +0000 (23:09 +0200)]
proxmox-boot: maintscript: change logic whether to add diversion

Deciding whether or not to add the diversion based on the version
alone fails quite hard in case pve-kernel-helper is in dpkg-state 'rc'
(removed not purged) as reported in our community forum[0]:
* removing pve-kernel-helper removes the diversion of grub-install
* if config-files are still present the preinst script gets called
  with the version of the config-files (the version that got removed)
* if the version was newer than 6.4-1~ then no diversion is added
* unpacking fails, because grub-install would be overwritten leaving
  pve-kernel-helper in state 'ic'

Explicitly checking whether the diversion is in place sounds like a
robust approach here.

downside: documentation on dpkg-divert in maintainer scripts [1] uses
the version approach.

[0] https://forum.proxmox.com/threads/pve-kernel-helper-wont-install.90029/
[1] https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: divert call to grub-install to p-b-t init
Stoiko Ivanov [Wed, 7 Jul 2021 21:09:51 +0000 (23:09 +0200)]
proxmox-boot: divert call to grub-install to p-b-t init

This way all ESPs (in case of a legacy booted system) get an
updated grub installation.

running only once between reboots (the markerfile is in /tmp) should
be enough. Sadly the environment does not provide a hint which version
grub is installed to.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: ignore call to grub-install from grub maintscripts
Stoiko Ivanov [Wed, 7 Jul 2021 21:09:50 +0000 (23:09 +0200)]
proxmox-boot: ignore call to grub-install from grub maintscripts

in certain cases the postinst script of grub-pc runs grub-install on
the disks it gets from debconf. Simply warn and exit with 0 if
grub-install is called by dpkg and from a grub related package

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agoproxmox-boot: redirect stdout in update-grub snippet
Stoiko Ivanov [Thu, 24 Jun 2021 11:20:25 +0000 (13:20 +0200)]
proxmox-boot: redirect stdout in update-grub snippet

update-grub (via grub-mkconfig) generates the grub configuration by
concatenating the output of each snippet (from /etc/grub.d).

We need to redirect the output of `proxmox-boot-tool refresh`
to not end up with a syntactically wrong config in /boot/grub/grub.cfg
(which is not used in any case)

quickly tested with a test-installation of mine

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2 years agobuildsys: change upload dist to bullseye and add pbs
Thomas Lamprecht [Wed, 23 Jun 2021 08:59:22 +0000 (10:59 +0200)]
buildsys: change upload dist to bullseye and add pbs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-3
Thomas Lamprecht [Wed, 23 Jun 2021 08:58:53 +0000 (10:58 +0200)]
bump version to 7.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-2
Thomas Lamprecht [Tue, 1 Jun 2021 15:23:45 +0000 (17:23 +0200)]
bump version to 7.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump debhelper compat to >= 12
Thomas Lamprecht [Wed, 12 May 2021 15:28:38 +0000 (17:28 +0200)]
d/control: bump debhelper compat to >= 12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-1
Thomas Lamprecht [Wed, 12 May 2021 15:27:30 +0000 (17:27 +0200)]
bump version to 7.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/preinst: fix file diversion for package upgrade
Thomas Lamprecht [Fri, 23 Apr 2021 11:14:07 +0000 (13:14 +0200)]
d/preinst: fix  file diversion for package upgrade

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/postrm: use correct version for check
Thomas Lamprecht [Fri, 23 Apr 2021 11:12:54 +0000 (13:12 +0200)]
d/postrm: use correct version for check

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/maintscripts: we will use 6.4-1 as next version
Thomas Lamprecht [Fri, 23 Apr 2021 09:29:00 +0000 (11:29 +0200)]
d/maintscripts: we will use 6.4-1 as next version

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoreword update-grup warnign slighty
Thomas Lamprecht [Fri, 23 Apr 2021 09:28:01 +0000 (11:28 +0200)]
reword update-grup warnign slighty

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoproxmox-boot: run p-b-t refresh on update-grub
Stoiko Ivanov [Fri, 23 Apr 2021 09:04:50 +0000 (11:04 +0200)]
proxmox-boot: run p-b-t refresh on update-grub

If the system seems to be using proxmox-boot, simply run it, in
addition to warning the user about the situation.

Since the warning is only printed when update-grub is not called
by dpkg or proxmoxmox-boot-tool, this should be safe, and potentially
help keeping systems bootable.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoproxmox-boot: add grub-install wrapper
Stoiko Ivanov [Fri, 23 Apr 2021 09:04:49 +0000 (11:04 +0200)]
proxmox-boot: add grub-install wrapper

if a (legacy) system is booted with proxmox-boot-tool, running
`grub-install` without being aware of the fact can render the system
unbootable (e.g. when letting the early stage point to an incompatible
zpool instead of the ESP).

To prevent this we add a dpkg-diversion [0], which simply checks if
`proxmox-boot-tool status` indicates that proxmox-boot is used and
errors out in that case, and runs the actual grub-install else.

Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoproxmox-boot: add grub.cfg header snippet
Stoiko Ivanov [Fri, 23 Apr 2021 09:04:48 +0000 (11:04 +0200)]
proxmox-boot: add grub.cfg header snippet

If the system seems to be booted using proxmox-boot, write a header at
the beginning of the grub.cfg generated when running `update-grub`

Additionally print a warning in case the script is run interactively.
This is determined by checking for DPKG_VERSION, which is set when
running as post-inst task (after a kernel install/removal)
and for PVE_EFIBOOT_UNSHARED, which is set by proxmox-boot-tool when
running `proxmox-boot-tool refresh.`

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoproxmox-boot-tool: handle legacy boot zfs installs
Stoiko Ivanov [Fri, 23 Apr 2021 09:04:47 +0000 (11:04 +0200)]
proxmox-boot-tool: handle legacy boot zfs installs

This patch adds support for booting non-uefi/legacy/bios-boot ZFS
installs, by using proxmox-boot-tool to copy the kernels to the ESP
and then generate a fitting grub config for booting from the vfat ESP:

* grub is installed onto the ESP and the MBR points to the ESP
* after copying/deleting the kernels proxmox-boot-tool bindmounts the
  ESP on /boot (inside the new mount namespace)
* grub-update then manages to generate a fitting config.

Some paths/sanity-checks needed adaptation (to differentiate between
EFI boot and not (based on the existence of /sys/firmware/efi)

The arguments for grub-install are taken from the pve-installer.

The approach is inspired by @avw in our community-forum [0].

[0] https://forum.proxmox.com/threads/zfs-error-no-such-device-error-unknown-filesystem-entering-rescue-mode.75122/post-374799

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>