From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Yq2wI-0007ts-6T for mharc-grub-devel@gnu.org; Wed, 06 May 2015 13:16:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq2wF-0007tO-U4 for grub-devel@gnu.org; Wed, 06 May 2015 13:16:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq2wD-00005S-6o for grub-devel@gnu.org; Wed, 06 May 2015 13:16:51 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:36277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq2wC-00005H-U6 for grub-devel@gnu.org; Wed, 06 May 2015 13:16:49 -0400 Received: by lagv1 with SMTP id v1so12458348lag.3 for ; Wed, 06 May 2015 10:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=ajfOQavBfBFl26NuMR9OZ3T/e80r9izdltoYe2hiqXg=; b=elJ7IAzn9nWTF9YC6hOUtG9sWKlxKhsEhJGBe7GjtBPMmTmw+oZ6g0E+2xVI0beWcg mHB3/u5/pfdfqPKTg1ZZWNw4FOy6aY1p5qoAK2fSNZwZztMr5nZUkHSB74meRJlReqFi /Joqht96LsEZm5Ysk4lsFdeEztcIn7SxTf720aeTsAyufEqi2FnOD62KzwbVo/o2rCb7 FbhWSO7l1eqfrw6KnKEdIo6sMoKSp/6pJl58+O3qeBszh4c56Y9ksqc2oSVhBSQf2oik QBavQvRybkW/5jiWHXjFae9uhn7Zx5Xwg2ol18Zu+51sKhF3arBoFRak8ZF8hqZuw8YF XKeA== X-Received: by 10.152.182.167 with SMTP id ef7mr6388252lac.109.1430932608024; Wed, 06 May 2015 10:16:48 -0700 (PDT) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id si3sm486781lbb.32.2015.05.06.10.16.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 May 2015 10:16:47 -0700 (PDT) Date: Wed, 6 May 2015 20:16:45 +0300 From: Andrei Borzenkov To: Sebastian Pipping Subject: Re: Future of installing GRUB to LVM volumes (and loop devices) Message-ID: <20150506201645.492f1743@opensuse.site> In-Reply-To: <554A0948.9050301@pipping.org> References: <5548F5AB.4080305@pipping.org> <20150505203836.30e66cbc@opensuse.site> <554A0948.9050301@pipping.org> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.27; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22f Cc: grub-devel@gnu.org 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: Wed, 06 May 2015 17:16:53 -0000 =D0=92 Wed, 06 May 2015 14:30:00 +0200 Sebastian Pipping =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 >=20 > Nevertheless, let's get good old >=20 > grub-install --boot-directory=3D... /dev/... >=20 > fixed, please. It did work previously. How do we proceed? >=20 > Best, >=20 >=20 >=20 > Sebastian >=20 >=20 > PS: I have not tested any from-within-chroot cases yet. Those have > given different results to some extent in the past, at least. >=20 >=20 > [1] In the the shell: >=20 > # grub-install --boot-directory=3D/mnt/loop-root/boot '(hd0)' ; echo $? > /usr/sbin/grub-probe: error: cannot find a GRUB drive for > /dev/mapper/loop0p1. Check your device.map. 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>=20 bor@opensuse:~/build/grub> /usr/sbin/losetup --help ... -P, --partscan create a partitioned loop device ... > 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=3D"/mnt/loop-root/boot/grub/device.map" > --target=3Dfs -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. 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. > (rw,relatime,user_xattr,barrier=3D1,data=3Dordered) > # cat /mnt/loop-root/boot/grub/device.map > (hd0) /dev/loop0 >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel