Commit Graph

255 Commits

Author SHA1 Message Date
Thomas Lamprecht
2ee7e81327 buildsys: add PDM to upload target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-03-04 16:34:34 +01:00
Thomas Lamprecht
ee3237c657 bump version to 8.1.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-03-04 16:05:37 +01:00
Thomas Lamprecht
715ad9b4f2 zz-proxmox-boot: update wording slightly for EFI bootloader check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-03-04 16:04:52 +01:00
Fabian Grünbichler
f344b8087c zz-proxmox-boot: check removable status of EFI fallback bootloader
if a fallback bootloader is installed, but the Grub packages are not set
up to manage it, inform the user about it. this setup is problematic if
the fallback bootloader is used as boot option (now or in the future),
so it's best to fix it up before a problem occurs.

for proxmox-boot-tool managed ESPs, we always install both when
(re)initing the ESPs, this only affects setup with a regular,
always-mounted, single ESP, such as ext4 on top of LVM.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-03-04 16:03:54 +01:00
Thomas Lamprecht
7007b33cbb bump version to 8.1.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 13:56:34 +01:00
Thomas Lamprecht
ace1048105 Revert "drop auto-adding the simplefb module to initramfs"
This reverts commit 9c41f94826 as it
seems there are quite a few systems where only the simplefb is
available, so even though this sometimes causes issues it seems less
problematic if present than not.
And the issues are mostly restricted to passthrough and the host
grabbing the GPU through that module, with workarounds possible.

Update the filename while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 13:13:08 +01:00
Thomas Lamprecht
06ddd1258f bump version to 8.0.9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 21:24:08 +01:00
Stoiko Ivanov
db0e565a97 add dedicated removable installation
seems adding `--removable` makes grub install ignore most other
information - e.g. the bootloader-id (guessed based on [0]).
add dedicated call with out `--removable` in addition

Seems that's the reason why our installer also 'rolls its own
removable' [1]

minimally tested with an ISO with this installed and an install with
ZFS on / (RAID1).

[0] https://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c#n1142
[1] https://git.proxmox.com/?p=pve-installer.git;a=blob;f=Proxmox/Install.pm;h=8825699416475b1934527531db4fbb40e9473ce8;hb=HEAD#l608

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-21 21:21:29 +01:00
Thomas Lamprecht
c74a79e7d7 bump version to 8.0.8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 18:05:01 +01:00
Stoiko Ivanov
9bf8552858 grub-install: provide --removable to grub-install
noticed while installing with secure-boot enabled on ZFS RAID1:
The system has no entry to boot from in the efi-vars and
the entry for the first disk simply does not boot (I assume OVMF tries
the default bootx64.efi.

Since `proxmox-boot-tool init` should only be done for ESPs, which are
dedicated to proxmox products I don't think that this will cause many
regressions

For comparison - our installer has done the manual equivalent of the
--removable option for installs on ext4 for quite a while.

minimally tested on a VM during install.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-21 18:03:20 +01:00
Thomas Lamprecht
61422549fe bump version to 8.0.7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 09:18:57 +01:00
Fabian Grünbichler
d7166478f4 grub-wrapper: don't fail on reinit/refresh error
these can happen for example if the system
- is set up to boot using systemd-boot
- but grub updates trigger a call to "grub-install"
- and systemd-boot is not installed

in this case, "proxmox-boot-tool reinit" will fail because of the lack of
"systemd-boot", and the upgrade triggering the grub-install call would error
out.

all the error messages/warnings are still printed and hopefully noticed.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-11-21 09:16:08 +01:00
Thomas Lamprecht
0f4d066f1c bump version to 8.0.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-20 18:13:19 +01:00
Fabian Grünbichler
8f4a6e6b8c kernel lists: add/handle -signed variant
only the package name is different, the file paths are identical and they are
not co-installable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-20 17:27:20 +01:00
Fabian Grünbichler
31371b734e grub-install: trigger re-init and refresh on EFI
and add shim- to the list of packages that are allowed to trigger.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-20 17:27:20 +01:00
Fabian Grünbichler
8ca56e880f add support for grub-on-esp (re)init
init has to be explicit, re-init is auto-detected based on presense of
'proxmox' Grub EFI binary on ESP.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-20 17:27:20 +01:00
Thomas Lamprecht
a2d5a4fb45 bump version to 8.0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-16 16:28:55 +01:00
Thomas Lamprecht
9c41f94826 drop auto-adding the simplefb module to initramfs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-16 15:08:07 +01:00
Thomas Lamprecht
2253efc4f4 bump version to 8.0.4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-06 18:00:29 +01:00
Thomas Lamprecht
c502021f3a rework no-grub-efi package warning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-06 17:58:47 +01:00
Stoiko Ivanov
f3581c94fe proxmox-boot-tool: check if correct grub metapackage is installed
this part of the hook applies only to systems not using pbt for
bootmangement.

Currently our ISO installs grub-pc unconditionally - and never the
conflicting grub-efi-amd64. Both packages are responsible for
running grub-install (for the appropriate disks) upon an upgrade of
grub.

This results in grub currently not getting updated on uefi-booted
systems (which do not use proxmox-boot-tool).

The patch causes a warning to be printed to notify the user.

Also considered putting the check+warning in d/postinst - but this way
it will get triggered more often (upon every
kernel-upgrade/update-initramfs, instead of only on
proxmox-kernel-helper updates, which are less often), increasing the
chances of being noticed.

checking for the changelog-presence was chosen, over `dpkg-query` for
the status, for consistency with the similar patch for pve7to8 (and
potentially a small speed-gain).

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Friedrich Weber <f.weber@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
2023-11-06 17:41:34 +01:00
Stoiko Ivanov
7594ff098e proxmox-boot-tool: do not exit early in kernel-hook
update_esps is called first in the actual execution below - exiting
early does not work for systems that don't use proxmox-boot-tool if a
check added later needs to work there too.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Friedrich Weber <f.weber@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
2023-11-06 17:41:34 +01:00
Fabian Grünbichler
2eb62618f6 bump version to 8.0.3
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-08-01 12:25:32 +02:00
Fabian Grünbichler
afa65c0a12 pve-kernel -> proxmox-kernel rename
following the rename in our kernel packaging, otherwise the scripts here
wouldn't pick up the new kernels (except if currently booted).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-07-18 10:42:09 +02:00
Hannes Laimer
a6a8d3fd27 boot tool: fix grep misinterpretation of arguments starting with a hyphen
`proxmox-boot-tool kernel remove --help`, or any version agrument
that started with a '-', lead to the grep usage message being written
into /etc/kernel/proxmox-boot-manual-kernels. The problem was `grep`
interpreted the kernel version agrument as an option since it starts
with '-'.
2023-06-29 07:53:30 +02:00
Thomas Lamprecht
9778a17731 proxmox boot: avoid double quotes for printf format text
most shells interpret the ! contained in "double quotes" as event and
try to resolve that, luckily dash doesn't do that but still simply
dangerous to do such stuff..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 08:48:43 +02:00
Thomas Lamprecht
915f1742c9 bump version to 8.0.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 08:37:32 +02:00
Thomas Lamprecht
895491a831 boot tool: always check first if hookfile exists
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 08:37:11 +02:00
Thomas Lamprecht
6e5fc91ebf boot tool: ignore unreachable commands
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 08:34:22 +02:00
Thomas Lamprecht
29a1f822ef bump version to 8.0.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 17:33:16 +02:00
Thomas Lamprecht
d8b73c911f d/control: downgrade systemd-boot dependency to suggests
by default recommends get pulled in on upgrades, at least if the user
did not disable this or used the respective CLI switch, so go for a
suggests instead:

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 17:27:51 +02:00
Stoiko Ivanov
7f5c500dc0 d/control: add Recommends on systemd-boot
systemd-boot is a separate binary package, and proxmox-boot-tool needs
it in the uefi-case as boot-loader for the ESPs

Not adding as Depends, because it is not strictly necessary for
proxmox-boot-tool (pinning is independent as is its use on legacy-boot
systems)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 17:27:51 +02:00
Stoiko Ivanov
53398c5c92 proxmox-boot: warn on missing systemd-boot package
With the shipping of systemd-boot as separate package, we cannot rely
on `bootctl` being present in all systems (e.g. currently all systems
upgraded from PVE 7 will not automatically pull systemd-boot in.

This patch adds a check for existence + warning with an explanation to
the only invocation of bootctl in the boot-tool codebase

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 17:27:51 +02:00
Stoiko Ivanov
a3c1ce92db boot-tool: disarm upstream systemd-boot hookscripts
With Debian Bookworm systemd-boot is a separate binary-package,
instead of part of the main systemd package.
Since it's not installed by default, Debian-upstream has added
hook-scripts to the package, which manage kernel copying to the esp
(kernel-install).

The hookscripts print a warning if the ESP is not mounted at
$SYSTEMD_ESP_PATH or /boot/efi, /efi or /boot - through `bootctl
is-installed --quiet` [0,1].

This patch adds a function, which disables the hookscripts from
upstream if /etc/kernel/proxmox-boot-uuids is present.
It adds an explanation as marker and 'exit 0' on top of the script, so
that users know why the scripts were touched (e.g. when a new
systemd-boot hookscript version from upstream asks what to do with the
local modifications)

While editing shell-script hooks from other packages is quite brittle
it still seems like the best option, to support most use-cases
(including users, who don't use proxmox-boot-tool, but want to
manually install systemd-boot).
Alternatives considered:
* dpkg-divert for all hookscripts - sadly the Debian policy manual
  warns against this
* adding Replaces: systemd-boot to d/control - afaict this would need
  systemd-boot to also declare this for proxmox-kernel-helper [3]

Tested on 2 VMs installed with the 8.0 ISO (once with legacy once with
uefi boot)

[0]
8a38b62f37/src/shared/find-esp.c (L503)
[1]
8a38b62f37/src/boot/bootctl.c (L90)
[2] https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html
[3] https://www.debian.org/doc/debian-policy/ch-relationships.html

Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
 [T: avoid potential false exit code, use if ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 17:27:51 +02:00
Thomas Lamprecht
47b6607049 debian: wrap-and-sort -tkn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:43:31 +02:00
Thomas Lamprecht
e85e4e03c5 bump version to 8.0.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
7a8e3a1b22 d/control: raise standards version compliance to 4.6.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
8681f03666 d/control: define compat level via build-depends and raise to 13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
0d11976f49 add .gitignore file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
90a43e7da8 buildsys: derive upload dist automatically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
5999d616f8 separate packaging and source build system
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
7aafa94cb8 d/control: drop build-dependencies on essential sed package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
4d10f407ed buildsys: add DSC & sbuild convenience target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
d0c5b67baa buildsys: make build-dir generation atomic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Thomas Lamprecht
e326e68560 makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 14:26:25 +02:00
Fabian Grünbichler
bc43d6955b bump version to 7.4-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-03-20 14:23:26 +01:00
Fabian Grünbichler
96fa4a98ef rename /usr/share/pve-kernel-helper
and ensure upgrades that also involve a kernel install/uninstall/upgrade still
work by symlinking the old path to the new one.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-03-16 12:56:32 +01:00
Fabian Grünbichler
f6ca90855c rename binary package
and B+R+P old name.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-10 16:26:49 +01:00
Fabian Grünbichler
7828df4616 remove meta package(s)
this repository now only contains the kernel helper/boot tool.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-10 16:15:40 +01:00
Thomas Lamprecht
3107293799 bump version to 7.3-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-10 10:36:04 +01:00