[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future of installing GRUB to LVM volumes (and loop devices)

From: Jordan Uggla
Subject: Re: Future of installing GRUB to LVM volumes (and loop devices)
Date: Fri, 15 May 2015 20:47:38 -0700

On Fri, May 15, 2015 at 3:42 AM, Sebastian Pipping
<address@hidden> wrote:
> Hello Andrei,
> On 05/15/2015 11:34 AM, Andrei Borzenkov wrote:
>> On Fri, May 15, 2015 at 12:28 PM, Sebastian Pipping
>> <address@hidden> wrote:
>>> 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.)
>> It comes from Open Firmware part. May be it should be downgraded to
>> Info. But as long as it happens in grub-probe only it is OK.
> my point was more about the text of the error message.
>>>>>> 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:
>> Could you please describe your exact configuration that does not work
>> (including all devices and their relationships) and what does not
>> work? Sorry if you did it already but I somehow lost track here.
> Sure.
> The setup is a single plain partition in an LVM volume.
> The following commands reproduce the setup (in RAM if /tmp is tmpfs).
> With a plain LVM volume, the error is the same tough.
>   # tmpfile="$(mktemp)"
>   # echo "${tmpfile}"
>   # truncate --size=$((100*1024**2)) "${tmpfile}"
>   # loop_device_2="$(losetup --show -f "${tmpfile}")"
>   # echo "${loop_device_2}"
>   # vgcreate vg "${loop_device_2}"
>   # lvcreate --name lv -l 100%free vg
>   # sleep 1
>   # parted /dev/vg/lv --script mklabel msdos
>   # parted /dev/vg/lv --script mkpart primary ext4 4m 100%
>   # sleep 1
>   # mkfs.ext4 /dev/mapper/vg-lv1
>   # mkdir /mnt/lv-root
>   # mount /dev/mapper/vg-lv1 /mnt/lv-root
>   # mkdir /mnt/lv-root/boot
>   # grub-install --boot-directory=/mnt/lv-root/boot /dev/mapper/vg-lv ;

That is a nonsensical grub-install command.

You're telling grub-install that you want grub's boot sector and
core.img to be installed to a device that cannot possibly be accessed
by your BIOS (unless you have a BIOS that understands LVM). It may be
that it should be failing with a better error message, or that there
is a better example of what should be working that isn't, but I would
never expect this command to work. I'm not even sure what semantics
you would expect from this command, and if it happened to do what you
wanted it to do in the past I can only imagine that that was a "lucky"
quirk of the implementation.

Jordan Uggla (Jordan_U on

reply via email to

[Prev in Thread] Current Thread [Next in Thread]