From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YpyTJ-0003qk-Mf for mharc-grub-devel@gnu.org; Wed, 06 May 2015 08:30:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpyTG-0003qW-F1 for grub-devel@gnu.org; Wed, 06 May 2015 08:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpyTC-00025L-BD for grub-devel@gnu.org; Wed, 06 May 2015 08:30:38 -0400 Received: from smtprelay06.ispgateway.de ([80.67.31.104]:46877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpyTB-000254-V1 for grub-devel@gnu.org; Wed, 06 May 2015 08:30:34 -0400 Received: from [217.92.161.189] (helo=[192.168.42.51]) by smtprelay06.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1YpyTA-0005aG-09 for grub-devel@gnu.org; Wed, 06 May 2015 14:30:32 +0200 Message-ID: <554A0948.9050301@pipping.org> Date: Wed, 06 May 2015 14:30:00 +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> In-Reply-To: <20150505203836.30e66cbc@opensuse.site> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Df-Sender: aGFydHdvcmtAYmluZXJhLmRl X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.67.31.104 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 12:30:39 -0000 Hello Andrei, On 05/05/2015 07:38 PM, Andrei Borzenkov wrote: > bor@opensuse:~/build/grub> cat boot/grub/device.map > (hd0) /dev/system/docker > bor@opensuse:~/build/grub> sudo pkgdatadir=$PWD ./grub-install -d grub-core --boot-directory $PWD/boot --grub-mkdevicemap /tmp/device.map '(hd0)' > Installing for i386-pc platform. > Installation finished. No error reported. > > Yes, device.map is *still* useful :) many thanks for your quick reply and this valuable workaround! I have tested the echo -e "(hd0)\tY" > X/grub/device.map grub-install --boot-directory=X '(hd0)' approach with all combinations of * Git HEAD, Debian wheezy (1.99), Debian jessie (2.02~beta2) * a loop device, an LVM volume by now. Of those * the only one that fails is loop device on Debian wheezy [1] (I welcome a workaround for that, too!) and * the only one requiring manual symlink resolution (e.g. passing /dev/dm-9 rather than /dev/mapper/vg-lv) is again Debian wheezy. So that approach should allow me to patch future releases grml-debootstrap for jessie, stretch and sid. Nevertheless, let's get good old grub-install --boot-directory=... /dev/... fixed, please. It did work previously. How do we proceed? Best, Sebastian PS: I have not tested any from-within-chroot cases yet. Those have given different results to some extent in the past, at least. [1] In the the shell: # grub-install --boot-directory=/mnt/loop-root/boot '(hd0)' ; echo $? /usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/mapper/loop0p1. Check your device.map. 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 (rw,relatime,user_xattr,barrier=1,data=ordered) # cat /mnt/loop-root/boot/grub/device.map (hd0) /dev/loop0