From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Uz9QI-0007Pt-OL for mharc-grub-devel@gnu.org; Tue, 16 Jul 2013 13:52:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz9QD-0007JQ-TW for grub-devel@gnu.org; Tue, 16 Jul 2013 13:52:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz9QC-0008Ay-HX for grub-devel@gnu.org; Tue, 16 Jul 2013 13:52:21 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:42266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz9QC-00089b-3f for grub-devel@gnu.org; Tue, 16 Jul 2013 13:52:20 -0400 Received: by mail-wi0-f173.google.com with SMTP id hq4so4456295wib.0 for ; Tue, 16 Jul 2013 10:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=HNZxqxEmBt/59GQvY+njBJtLqdfPR2ZveAYrcznXMmg=; b=Wd2+wB6jAA1gDmiqjdf0buNWrDU1rqBHWkldqMqlIqoCyluBHTEZECgHgqVTrDmUYJ RmUY04nwFz2HAMGwL0Se5yxq/ce8bf6nSVJt/4/gI1ylSSU/DmoGH+hKDatfJpwVR19q E9vywnrpQc06BdZRhvi3z2/rL3NgzWb1jJiwn032LxR75GErMrbIN9A9DKWue+F0n5Km 4cz/+yPnGUqtYNPd5qcewEBhx3E8NMJiSeYFSs/RGTNl5cWECqnZaBgwh0BBMI1/X2B0 vHBce213qO0zx4ffluFrLofusTwtGdkBqzNYkRPIjOiJQWT5P1RElqCjd1uI/GbmbKHf ZEsw== X-Received: by 10.180.98.4 with SMTP id ee4mr13212760wib.41.1373997138640; Tue, 16 Jul 2013 10:52:18 -0700 (PDT) Received: from [192.168.42.127] (240-236.197-178.cust.bluewin.ch. [178.197.236.240]) by mx.google.com with ESMTPSA id a6sm4061096wib.10.2013.07.16.10.52.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Jul 2013 10:52:18 -0700 (PDT) Message-ID: <51E5882F.8090105@gmail.com> Date: Tue, 16 Jul 2013 19:51:43 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: Issue in grub-probe when boot device is located on device mapper partition. References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22d X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2013 17:52:23 -0000 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 >