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: Fri, 15 May 2015 11:28:51 +0200	[thread overview]
Message-ID: <5555BC53.9030308@pipping.org> (raw)
In-Reply-To: <20150512144143.6f4713d0@opensuse.site>

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



  reply	other threads:[~2015-05-15  9:29 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
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 [this message]
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=5555BC53.9030308@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.