Skip to content
Snippets Groups Projects
Commit 43786f05 authored by Steve McIntyre's avatar Steve McIntyre
Browse files

Import changes for the 2.06-8.1 NMU

Thanks for tracking this down Antoine!
parent a3b9f421
No related merge requests found
grub2 (2.06-8.1) experimental; urgency=medium
* Non-maintainer upload.
* Fix an issue where a logical volume rename would lead grub to fail to
boot (Closes: #987008)
-- Antoine Beaupré <anarcat@debian.org> Sat, 25 Feb 2023 15:16:55 -0500
grub2 (2.06-8) unstable; urgency=medium grub2 (2.06-8) unstable; urgency=medium
[ Steve McIntyre ] [ Steve McIntyre ]
......
Description: fix renamed LV detection
It looks like the detection of the LVM logical volumes fails in
certain edge conditions. In particular, it was reported that
renaming an LV will make grub fail to boot from the system as it
cannot properly detect it anymore.
.
I have looked at the code surrounding the patch and cannot claim to
understand the entire function here, as it is huge and quite
cryptic. But it seems sane: the `ptr` we're inspecting here starts
at the `rlocn->offset`, but we were adding `mda_size` to the
(somewhat) unrelated metadatabuf instead. Now we're marking the
`mda_end` correctly, based on the rlocn->offsite and ->size.
.
I have not tested this myself as the test setup is quite involved,
but it seems others (e.g. "Hoyer, David" <David.Hoyer@netapp.com>)
have tested the patch and confirmed it worked.
Author: Rogier <rogier777@gmail.com>
Origin: other
Bug: https://savannah.gnu.org/bugs/index.php?61620
Bug-Debian: https://bugs.debian.org/987008
Forwarded: https://savannah.gnu.org/bugs/index.php?61620
Reviewed-By: Antoine Beaupré
Last-Update: 2023-02-25
--- grub2-2.06.orig/grub-core/disk/lvm.c
+++ grub2-2.06/grub-core/disk/lvm.c
@@ -290,7 +290,7 @@ grub_lvm_detect (grub_disk_t disk,
p = q = (char *)ptr;
- if (grub_add ((grub_size_t)metadatabuf, (grub_size_t)mda_size, &ptr))
+ if (grub_add (ptr, (grub_size_t)grub_le_to_cpu64 (rlocn->size), &ptr))
goto error_parsing_metadata;
mda_end = (char *)ptr;
...@@ -114,3 +114,4 @@ arm64_remove_magic_number_check.patch ...@@ -114,3 +114,4 @@ arm64_remove_magic_number_check.patch
grub_mkconfig_restore_umask.patch grub_mkconfig_restore_umask.patch
ignore_checksum_seed_incompat_feature.patch ignore_checksum_seed_incompat_feature.patch
ignore_the_large_dir_incompat_feature.patch ignore_the_large_dir_incompat_feature.patch
987008-lvrename-boot-fail.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment