This code was modified because the original code skips any device
with basename starts with dm-[0-9]
e.g. if the root device path is /dev/mapper/dm-0-luks it
won't be detected by grub-probe and "root=" parameter in grub.cfg
will be empty and the system will be unbootable unless you manually
edit grub.cfg
BUG: https://savannah.gnu.org/bugs/?53697
diff --git
a/grub/grub-core/osdep/unix/getroot.c
b/grub/grub-core/osdep/unix/getroot.c
index 4bf37b0..2964dcd 100644
--- a/grub/grub-core/osdep/unix/getroot.c
+++ b/grub/grub-core/osdep/unix/getroot.c
@@ -433,7 +433,8 @@ grub_find_device (const char *dir, dev_t dev)
ent->d_name[1] == 'm' &&
ent->d_name[2] == '-' &&
ent->d_name[3] >= '0' &&
- ent->d_name[3] <= '9')
+ ent->d_name[3] <= '9' &&
+ ent->d_name[4] == '\0')
continue;
#endif
PS
I don't know what to do in case of /dev/dm-[0-9]+$ yet
|