Reproducer:

#!/bin/bash
  
device_to_disk () {
    echo "$1" | \
        sed 's:\(/dev/[a-z]\+\).*:\1:'
}

device_to_disk /dev/mapper/vgubuntu-root

So device_to_disk() is doing what it is supposed to do and there was NO
CHANGE to it (as it appears).

I guess using grub-install at /dev/vda was allowed before (instead of
the LVM PV ?), so there wasn't a need to use /dev/mapper/vgubuntu-root
as the argument for grub-installer.

It is either that OR the "/dev/mapper" section of this same script,
related to:

case $prefix in
...
    /dev/mapper)
    disc_offered_devfs=...
...

couldn't deal with virtio disks on top of LVM (my next task here) as it
should.

Simply using:

----

#!/bin/bash

device_to_disk () {
    echo "$1" | \
        sed 's:\(/dev/mapper/.*\+\|/dev/[a-z]\+\).*:\1:'
}

device_to_disk /dev/mapper/vgubuntu-root
device_to_disk /dev/something/else

$ ./temp.sh 
/dev/mapper/vgubuntu-root
/dev/something
----

instead, keeps the same behavior for everything else AND fixes usage
case where device is "/dev/mapper/XXXXX". This is ONE WAY of fixing
this, BUT I guess the /dev/mapper section should also work for LVM w/
virtio disks, as stated in the script, so I'm investigating this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1838525

Title:
  LVM setup fails to install grub on virtio storage

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1838525/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to