Your message dated Sat, 7 Sep 2019 19:50:45 +0200
with message-id <[email protected]>
and subject line Pygrub bug fixed in Xen 4.7 upstream
has caused the Debian Bug report #745419,
regarding xen-utils-4.1: Pygrub fails to boot from LVM LV when something
installed in the volume boot record
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
745419: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745419
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: xen-utils-4.1
Version: 4.1.4-3+deb7u1
Severity: important
When an LVM LV that serves as the root disk for a Xen DomU contains a boot
loader (or possibly other data) in its volume boot record, pygrub fails to boot
it, printing "Error: boot loader didn't return any data" before exiting.
I think this is because of the function "is_disk_image" on line 45 of
/usr/lib/xen-4.1/bin/pygrub: it should return false on LVM LV's because they
are not disk images but virtual devices, but it returns true because of certain
bytes in the first block of 512 bytes being set. This causes
get_partition_offsets to seek fruitlessly for a partition instead of simply
returning [0], causing the bootloader not to find the right partition.
Detailed steps to reproduce:
We have a domU called blup.kassala.de, it is running Jessie, its root disk is
a LVM LV at /dev/vpsdisks/blup.kassala.de-disk. The first 512 bytes are null:
# dd if=/dev/vpsdisks/blup.kassala.de-disk bs=1 count=512 | hexdump -C
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
"xm create -c blup.kassala.de.cfg" shows the machine boots fine. After boot, we
log in and "apt-get install grub2". During the installation, we say to install
the bootloader to /dev/xvda2, the root disk. We then halt the system. The first
512 bytes are now non-null:
# dd if=/dev/vpsdisks/blup.kassala.de-disk bs=1 count=512 | hexdump -C
00000000 eb 63 90 00 00 00 00 00 00 00 00 00 00 00 00 00 |.c..............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000050 00 00 00 00 00 00 00 00 00 00 00 80 80 12 46 00 |..............F.|
00000060 00 00 00 00 ff fa 90 90 f6 c2 80 74 05 f6 c2 70 |...........t...p|
[snip]
00000180 7d e8 2e 00 cd 18 eb fe 47 52 55 42 20 00 47 65 |}.......GRUB .Ge|
00000190 6f 6d 00 48 61 72 64 20 44 69 73 6b 00 52 65 61 |om.Hard Disk.Rea|
000001a0 64 00 20 45 72 72 6f 72 0d 0a 00 bb 01 00 b4 0e |d. Error........|
000001b0 cd 10 ac 3c 00 75 f4 c3 00 00 00 00 00 00 00 00 |...<.u..........|
000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
We try to boot the DomU again:
# xm create -c blup.kassala.de.cfg
Using config file "./blup.kassala.de.cfg".
Error: Boot loader didn't return any data!
We write 512 nullbytes to the disk and retry booting the domU:
# dd if=/dev/zero of=/dev/vpsdisks/blup.kassala.de-disk bs=1 count=512
# xm create -c blup.kassala.de.cfg
The pyGRUB menu appears normally and the machine boots.
-- System Information:
Debian Release: 7.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xen-utils-4.1 depends on:
ii e2fslibs 1.42.5-1.1
ii libc6 2.13-38+deb7u1
ii libgnutls26 2.12.20-8+deb7u1
ii libncurses5 5.9-10
ii libpci3 1:3.1.9-6
ii libtinfo5 5.9-10
ii libuuid1 2.20.1-5.3
ii libxen-4.1 4.1.4-3+deb7u1
ii libxenstore3.0 4.1.4-3+deb7u1
ii python 2.7.3-4+deb7u1
ii python2.7 2.7.3-6+deb7u2
ii xen-utils-common 4.1.4-3+deb7u1
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages xen-utils-4.1 recommends:
ii bridge-utils 1.5-6
ii qemu-keymaps 1.1.2+dfsg-6a+deb7u1
ii qemu-utils 1.1.2+dfsg-6a+deb7u1
ii xen-hypervisor-4.1-amd64 [xen-hypervisor-4.1] 4.1.4-3+deb7u1
Versions of packages xen-utils-4.1 suggests:
pn xen-docs-4.1 <none>
-- no debconf information
--- End Message ---
--- Begin Message ---
fixed 745419 4.8.0~rc3-0exp1
thanks
The patch that fixed the issue ended up in the upstream 4.7 release. So,
choosing first upload after that to mark it fixed.
K
--- End Message ---