* Issue in grub-probe when boot device is located on device mapper partition.
@ 2013-07-16 12:56 Eldar Yusupov
2013-07-16 17:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Eldar Yusupov @ 2013-07-16 12:56 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]
Hi,
I've hit an issue when trying to reinstall grub on my system.
My /boot partition is located on /dev/mapper/pdc_djabadcbjep1 device.
However, when grub-install executes grub-probe -t fs /boot, and the latter
one starts probing the filesystem, it incorrectly tries to open
hostdisk//dev/mapper/pdc_djabadcbje device instead
of hostdisk//dev/mapper/pdc_djabadcbje,msdos1.
Here's verbose output of grub-probe:
# grub2-probe -v -t fs /boot/
grub2-probe: info: cannot open `/boot/grub2/device.map': No such file or
directory.
grub2-probe: info: Looking for /dev/mapper/pdc_djabadcbjep1.
grub2-probe: info: /dev/mapper/pdc_djabadcbje is a parent of
/dev/mapper/pdc_djabadcbjep1.
grub2-probe: info: Looking for /dev/mapper/pdc_djabadcbjep1.
grub2-probe: info: /dev/mapper/pdc_djabadcbje is a parent of
/dev/mapper/pdc_djabadcbjep1.
grub2-probe: info: Looking for /dev/mapper/pdc_djabadcbjep1.
grub2-probe: info: /dev/mapper/pdc_djabadcbje is a parent of
/dev/mapper/pdc_djabadcbjep1.
grub2-probe: info: opening hostdisk//dev/mapper/pdc_djabadcbje.
grub2-probe: info: the size of hostdisk//dev/mapper/pdc_djabadcbje is
1953124992.
grub2-probe: error: unknown filesystem.
I think that the issue is in util/get_root.c
in convert_system_partition_to_system_disk() function - it does not seem to
determine if the device is partition or not for device-mapper case.
The following change seems to fix the issue, however I'm not really
familiar with device mapper and can't be sure if it's correct:
/* Counter-intuitively, device-mapper refers to the disk-like
device containing a DM-RAID partition device as a "child" of
the partition device. */
child = dm_tree_next_child (&handle, node, 0);
if (! child)
{
grub_util_info ("%s has no DM children", path);
goto devmapper_out;
}
child_uuid = dm_tree_node_get_uuid (child);
if (! child_uuid)
{
grub_util_info ("%s child has no DM uuid", path);
goto devmapper_out;
}
else if (strncmp (child_uuid, "DMRAID-", 7) != 0)
{
grub_util_info ("%s child is not DM-RAID", path);
goto devmapper_out;
}
child_name = dm_tree_node_get_name (child);
if (! child_name)
{
grub_util_info ("%s child has no DM name", path);
goto devmapper_out;
}
mapper_name = child_name;
+ *is_part = 1;
--
--
Regards,
Eldar Yusupov.
[-- Attachment #2: Type: text/html, Size: 3406 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Issue in grub-probe when boot device is located on device mapper partition.
2013-07-16 12:56 Issue in grub-probe when boot device is located on device mapper partition Eldar Yusupov
@ 2013-07-16 17:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-07-16 17:51 UTC (permalink / raw)
To: The development of GNU GRUB
Please always try latest version (bzr trunk) before reporting any bug.
This particular one was fixed quite some time ago.
On 16.07.2013 14:56, Eldar Yusupov wrote:
> Hi,
>
> I've hit an issue when trying to reinstall grub on my system.
> My /boot partition is located on /dev/mapper/pdc_djabadcbjep1 device.
> However, when grub-install executes grub-probe -t fs /boot, and the
> latter one starts probing the filesystem, it incorrectly tries to open
> hostdisk//dev/mapper/pdc_djabadcbje device instead
> of hostdisk//dev/mapper/pdc_djabadcbje,msdos1.
>
> Here's verbose output of grub-probe:
> # grub2-probe -v -t fs /boot/
> grub2-probe: info: cannot open `/boot/grub2/device.map': No such file or
> directory.
> grub2-probe: info: Looking for /dev/mapper/pdc_djabadcbjep1.
> grub2-probe: info: /dev/mapper/pdc_djabadcbje is a parent of
> /dev/mapper/pdc_djabadcbjep1.
> grub2-probe: info: Looking for /dev/mapper/pdc_djabadcbjep1.
> grub2-probe: info: /dev/mapper/pdc_djabadcbje is a parent of
> /dev/mapper/pdc_djabadcbjep1.
> grub2-probe: info: Looking for /dev/mapper/pdc_djabadcbjep1.
> grub2-probe: info: /dev/mapper/pdc_djabadcbje is a parent of
> /dev/mapper/pdc_djabadcbjep1.
> grub2-probe: info: opening hostdisk//dev/mapper/pdc_djabadcbje.
> grub2-probe: info: the size of hostdisk//dev/mapper/pdc_djabadcbje is
> 1953124992.
> grub2-probe: error: unknown filesystem.
>
> I think that the issue is in util/get_root.c
> in convert_system_partition_to_system_disk() function - it does not seem
> to determine if the device is partition or not for device-mapper case.
>
> The following change seems to fix the issue, however I'm not really
> familiar with device mapper and can't be sure if it's correct:
>
> /* Counter-intuitively, device-mapper refers to the disk-like
> device containing a DM-RAID partition device as a "child" of
> the partition device. */
> child = dm_tree_next_child (&handle, node, 0);
> if (! child)
> {
> grub_util_info ("%s has no DM children", path);
> goto devmapper_out;
> }
> child_uuid = dm_tree_node_get_uuid (child);
> if (! child_uuid)
> {
> grub_util_info ("%s child has no DM uuid", path);
> goto devmapper_out;
> }
> else if (strncmp (child_uuid, "DMRAID-", 7) != 0)
> {
> grub_util_info ("%s child is not DM-RAID", path);
> goto devmapper_out;
> }
> child_name = dm_tree_node_get_name (child);
> if (! child_name)
> {
> grub_util_info ("%s child has no DM name", path);
> goto devmapper_out;
> }
>
> mapper_name = child_name;
> + *is_part = 1;
>
> --
> --
> Regards,
> Eldar Yusupov.
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-16 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 12:56 Issue in grub-probe when boot device is located on device mapper partition Eldar Yusupov
2013-07-16 17:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).