mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
grub-probe: Don't skip /dev/mapper/dm-* devices
This patch ensures that grub-probe will find the root device placed in /dev/mapper/dm-[0-9]+-.* e.g. device named /dev/mapper/dm-0-luks will be found and grub.cfg will be updated properly, enabling the system to boot. Signed-off-by: Oleg Solovyov <mcpain@altlinux.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
b66e364f13
commit
6d28b3bd26
1 file changed
+5
-2
@@ -428,8 +428,11 @@ grub_find_device (const char *dir, dev_t dev)
|
|||||||
{
|
{
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
/* Skip device names like /dev/dm-0, which are short-hand aliases
|
/* Skip device names like /dev/dm-0, which are short-hand aliases
|
||||||
to more descriptive device names, e.g. those under /dev/mapper */
|
to more descriptive device names, e.g. those under /dev/mapper.
|
||||||
if (ent->d_name[0] == 'd' &&
|
Also, don't skip devices which names start with dm-[0-9] in
|
||||||
|
directories below /dev, e.g. /dev/mapper/dm-0-luks. */
|
||||||
|
if (strcmp (dir, "/dev") == 0 &&
|
||||||
|
ent->d_name[0] == 'd' &&
|
||||||
ent->d_name[1] == 'm' &&
|
ent->d_name[1] == 'm' &&
|
||||||
ent->d_name[2] == '-' &&
|
ent->d_name[2] == '-' &&
|
||||||
ent->d_name[3] >= '0' &&
|
ent->d_name[3] >= '0' &&
|
||||||
|
|||||||
Reference in new issue
Block a user