From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YtBvp-0004g8-2f for mharc-grub-devel@gnu.org; Fri, 15 May 2015 05:29:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtBvm-0004fd-Ct for grub-devel@gnu.org; Fri, 15 May 2015 05:29:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtBvj-000512-4k for grub-devel@gnu.org; Fri, 15 May 2015 05:29:22 -0400 Received: from smtprelay01.ispgateway.de ([80.67.31.24]:38720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtBvi-00050t-Qq for grub-devel@gnu.org; Fri, 15 May 2015 05:29:19 -0400 Received: from [217.92.161.189] (helo=[192.168.42.88]) by smtprelay01.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1YtBvg-0003c3-Aq for grub-devel@gnu.org; Fri, 15 May 2015 11:29:16 +0200 Message-ID: <5555BC53.9030308@pipping.org> Date: Fri, 15 May 2015 11:28:51 +0200 From: Sebastian Pipping User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Future of installing GRUB to LVM volumes (and loop devices) References: <5548F5AB.4080305@pipping.org> <20150505203836.30e66cbc@opensuse.site> <554A0948.9050301@pipping.org> <20150506201645.492f1743@opensuse.site> <5551D8CF.8080905@pipping.org> <20150512144143.6f4713d0@opensuse.site> In-Reply-To: <20150512144143.6f4713d0@opensuse.site> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Df-Sender: aGFydHdvcmtAYmluZXJhLmRl X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.67.31.24 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: Fri, 15 May 2015 09:29:23 -0000 On 05/12/2015 01:41 PM, Andrei Borzenkov wrote: > That's what mean - this is direct parent-child. But consider > > bor@opensuse:~/build/grub> echo 0 2048 linear /dev/loop0 0 | sudo dmsetup create whole > bor@opensuse:~/build/grub> echo 0 59392 linear /dev/loop0 2048 | sudo dmsetup create part > > At this point /dev/mapper/part refers to partition of /dev/mapper/whole > but there is not direct relationships between two that you can > easily discover > > bor@opensuse:~/build/grub> sudo dmsetup ls --tree > whole (254:5) > └─ (7:0) > part (254:6) > └─ (7:0) > > and > > bor@opensuse:~/build/grub> sudo ./grub-probe -t hints_string -m device.map /mnt > ./grub-probe: warning: unknown device type loop0 > . > > bor@opensuse:~/build/grub> cat device.map > (hd0) /dev/mapper/whole > > but > > bor@opensuse:~/build/grub> sudo ./grub-probe -t hints_string -m device.map /mnt > ./grub-probe: warning: unknown device type loop0 > . > --hint='hd0,msdos1' > bor@opensuse:~/build/grub> cat device.map > (hd0) /dev/loop0 > > So in common cases it will work and is better as nothing, but there will be corner cases that may fail. Thanks for that explanation. I understand that some relations may be hard to impossible to detect. The cases that I have are plain parent-child relations, though. It would rock the house to get these cases covered again. (On a side note, text "unknown device type loop0" looks like a bug to me since "loop0" is not a type.) >>> Half working solution would be to assume that it is always child map. >>> >>> Or you can take shortcut and assume that /dev/mapper/XXXXpY is >>> partition of /dev/mapper/XXX but you still will need to verify it. >>> >>> Patches are welcome. >> >> I am still wondering: how come it was working in GRUB 2.00 but now >> longer is? >> > > But by you said in previous message that HEAD works? Not sure how > though :) That referred to the '(hd0)'-parameter-with-device-map case, only. This patch to grml-debootstrap says best what has stopped working: https://github.com/hartwork/grml-debootstrap/commit/a705ff45c2d053b0d90ec51700e2d25a760106f3 Best, Sebastian