From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ys7dM-0001mL-32 for mharc-grub-devel@gnu.org; Tue, 12 May 2015 06:41:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys7dI-0001lQ-Vs for grub-devel@gnu.org; Tue, 12 May 2015 06:41:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ys7dD-0003eB-VN for grub-devel@gnu.org; Tue, 12 May 2015 06:41:52 -0400 Received: from smtprelay02.ispgateway.de ([80.67.31.40]:34818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys7dD-0003dg-Pl for grub-devel@gnu.org; Tue, 12 May 2015 06:41:47 -0400 Received: from [217.92.161.189] (helo=[192.168.42.63]) by smtprelay02.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1Ys7dC-0007kj-PI for grub-devel@gnu.org; Tue, 12 May 2015 12:41:46 +0200 Message-ID: <5551D8CF.8080905@pipping.org> Date: Tue, 12 May 2015 12:41:19 +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: The development of GNU GRUB 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> In-Reply-To: <20150506201645.492f1743@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.40 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, 12 May 2015 10:41:54 -0000 On 05/06/2015 07:16 PM, Andrei Borzenkov wrote: > bor@opensuse:~/build/grub> findmnt /mnt > TARGET SOURCE FSTYPE OPTIONS > /mnt /dev/loop0p1 ext2 rw,relatime > bor@opensuse:~/build/grub> sudo ./grub-probe -t fs /mnt > ext2 > bor@opensuse:~/build/grub> sudo ./grub-probe -t partmap /mnt > msdos > bor@opensuse:~/build/grub> > > bor@opensuse:~/build/grub> /usr/sbin/losetup --help > ... > -P, --partscan create a partitioned loop device > ... Thanks for introducing me to --partscan. It's too young for Debian wheezy, though. >> Auto-detection of a filesystem of /dev/mapper/loop0p1 failed. >> Try with --recheck. >> If the problem persists please report this together with the output of >> "/usr/sbin/grub-probe --device-map="/mnt/loop-root/boot/grub/device.map" >> --target=fs -v /mnt/loop-root/boot/grub" to >> 1 >> # mount | fgrep /mnt/loop-root >> /dev/mapper/loop0p1 on /mnt/loop-root type ext4 > > There is no feasible way to map this device back to contained device, > short of scanning all maps, finding all partition labels on them and > matching maps against labels. Why not? lsblk manages to detect that /dev/mapper/loop0p1 is a child of /dev/loop0: # lsblk | fgrep loop | sed 's| \{23\}||' loop0 7:0 0 100M 0 loop └─loop0p1 (dm-9) 254:9 0 96M 0 part /mnt/loop-root > 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? Best, Sebastian