All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enable /dev/mapper/dm-[0-9]-* scanning
@ 2018-05-10 13:32 Oleg Solovyov
  2018-05-10 19:35 ` Daniel Kiper
  0 siblings, 1 reply; 8+ messages in thread
From: Oleg Solovyov @ 2018-05-10 13:32 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1605 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-29 14:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 13:32 [PATCH] Enable /dev/mapper/dm-[0-9]-* scanning Oleg Solovyov
2018-05-10 19:35 ` Daniel Kiper
2018-05-11 11:32   ` Oleg Solovyov
2018-05-14 17:13     ` Daniel Kiper
2018-05-29 11:57       ` Oleg Solovyov
2018-05-29 13:50         ` Vladimir 'phcoder' Serbinenko
2018-05-29 13:55           ` Oleg Solovyov
2018-05-29 14:31             ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.