bug-grub
[Top][All Lists]
Advanced

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

[bug #55656] grub fails to read LVM LV with qemu sata drive on some LVM


From: Chris Bainbridge
Subject: [bug #55656] grub fails to read LVM LV with qemu sata drive on some LVM layouts
Date: Wed, 6 Feb 2019 12:52:38 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?55656>

                 Summary: grub fails to read LVM LV with qemu sata drive on
some LVM layouts 
                 Project: GNU GRUB
            Submitted by: bain
            Submitted on: Wed 06 Feb 2019 05:52:36 PM UTC
                Category: Filesystem
                Severity: Major
                Priority: 5 - Normal
              Item Group: Software Error
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: 2.02
         Reproducibility: Every Time
         Planned Release: None

    _______________________________________________________

Details:

Run attached "go" script. This creates a VM with:


qemu-img create -q -f qcow2 -o preallocation=metadata ${vm}.qcow2 80G

virt-install --name test --ram 2048 --disk path=test.qcow2,bus=sata \
  --vcpus 1 --os-type linux --os-variant centos7.0 \
  --location http://mirror.bytemark.co.uk/centos/7.6.1810/os/x86_64 \
  --extra-args "ks=file:/test.ks console=ttyS0" \
  --console pty,target_type=serial --initrd-inject test.ks --graphics none \
  --check disk_size=off


After kickstart install, anaconda will reboot, and then grub will fail to load
the kernel from LVM LV. The issue appears to be the "bus=sata" which causes
virt-install to run qemu like:


qemu-system-x86_64 -enable-kvm -cpu host -m 2G -nographic \
  -device ahci,id=sata0,bus=pci.0,addr=0x5 \
  -drive file=~/test.qcow2,format=qcow2,if=none,id=drive-sata0-0-0 \
  -device ide-hd,bus=sata0.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1


Manually running qemu with "... -hda test.qcow2" (instead of the above) works
ok (sda appears as SCSI drive).
Using "virt-install --disk path=test.qcow2,bus=virtio" also works ok (vda
appears as virtio drive).

This seems to be sensitive to the particular LVM layout - not creating the
extra 2 logical volumes works ok. Maybe the changes in LVM layout causes grub
to attempt reading bytes beyond some limit, which fails.

The easy workaround appears to be to remove "virt-install ... bus=sata"
argument (and use default SCSI) or use "bus=virtio".




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 06 Feb 2019 05:52:36 PM UTC  Name: test.ks  Size: 2KiB   By: bain

<http://savannah.gnu.org/bugs/download.php?file_id=46192>
-------------------------------------------------------
Date: Wed 06 Feb 2019 05:52:36 PM UTC  Name: go  Size: 496B   By: bain

<http://savannah.gnu.org/bugs/download.php?file_id=46193>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55656>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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