Commit Graph

4 Commits

Author SHA1 Message Date
Stoiko Ivanov
dc3e3e5ca7 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>
2021-06-24 14:21:01 +02:00
Thomas Lamprecht
c2395dd2d4 reword update-grup warnign slighty
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 13:28:56 +02:00
Stoiko Ivanov
72ed875819 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>
2021-04-23 13:28:56 +02:00
Stoiko Ivanov
ff28956d40 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>
2021-04-23 13:28:56 +02:00