All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Pipping <sebastian@pipping.org>
To: grub-devel@gnu.org
Subject: Re: Future of installing GRUB to LVM volumes (and loop devices)
Date: Wed, 06 May 2015 14:30:00 +0200	[thread overview]
Message-ID: <554A0948.9050301@pipping.org> (raw)
In-Reply-To: <20150505203836.30e66cbc@opensuse.site>

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 <bug-grub@gnu.org>
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



  reply	other threads:[~2015-05-06 12:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 16:54 Future of installing GRUB to LVM volumes (and loop devices) Sebastian Pipping
2015-05-05 17:38 ` Andrei Borzenkov
2015-05-06 12:30   ` Sebastian Pipping [this message]
2015-05-06 17:16     ` Andrei Borzenkov
2015-05-12 10:41       ` Sebastian Pipping
2015-05-12 11:41         ` Andrei Borzenkov
2015-05-15  9:28           ` Sebastian Pipping
2015-05-15  9:34             ` Andrei Borzenkov
2015-05-15 10:42               ` Sebastian Pipping
2015-05-16  3:47                 ` Jordan Uggla
2015-05-16 14:10                   ` Sebastian Pipping
2015-05-16 23:33                     ` Jordan Uggla
2015-05-17  8:14                 ` Andrei Borzenkov
2015-05-21 21:41                   ` Sebastian Pipping
2015-05-21 21:44                     ` Vladimir 'phcoder' Serbinenko
2015-05-21 21:48                       ` Sebastian Pipping
2015-05-21 22:17                         ` Vladimir 'phcoder' Serbinenko
2015-05-21 22:20                           ` Sebastian Pipping
2015-05-22  2:25                           ` Andrei Borzenkov
2015-05-07  9:35     ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-05-12  9:16       ` Sebastian Pipping

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554A0948.9050301@pipping.org \
    --to=sebastian@pipping.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.