Bug 748149 - pygrub fails to boot Fedora 16 PV guest using MSDOS partition table and GRUB2
pygrub fails to boot Fedora 16 PV guest using MSDOS partition table and GRUB2
Status: CLOSED DUPLICATE of bug 746602
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.8
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Xen Maintainance List
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-22 09:40 EDT by Pasi Karkkainen
Modified: 2011-10-24 00:36 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-24 00:36:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Pasi Karkkainen 2011-10-22 09:40:23 EDT
Description of problem:

F16 Final TC2 (Test Compose 2) and later versions allow creating normal old-style MSDOS partition tables (instead of new GPT) by using the anaconda installer "nogpt" boot/cmdline option. F16 TC2 installs fine as Xen PV domU when using "nogpt", but pygrub fails to boot the installed guest.

Version-Release number of selected component (if applicable):
RHEL 5.7 Xen pygrub.

How reproducible:
Always.

Steps to Reproduce:
1. Install RHEL 5.7 x64 Xen dom0.
2. Install F16 TC2 x64 Xen PV domU.
3. virt-install -d -n f16test64 -r 1024 --vcpus=2 -f /dev/VolGroup00/f16test64 --vnc -p -l "http://web.server.tld/fedora/mount-f16-final-tc2-x64/" -x "nogpt"
  
Actual results:
After installation is complete and the guest is being restarted, pygrub fails to boot the guest and gives an error.

Expected results:
F16 domU boots OK.

Additional info:

Guest installation complete... restarting guest.

Sat, 22 Oct 2011 16:28:18 ERROR    POST operation failed: xend_post: error from xen daemon: (xend.err "Error creating domain: Boot loader didn't return any data!")
Domain installation may not have been
 successful.  If it was, you can restart your domain
 by running 'virsh start f16test64'; otherwise, please
 restart your installation.
Sat, 22 Oct 2011 16:28:18 ERROR    POST operation failed: xend_post: error from xen daemon: (xend.err "Error creating domain: Boot loader didn't return any data!")
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 895, in ?
    main()
  File "/usr/sbin/virt-install", line 777, in main
    dom.create()
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 333, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err "Error creating domain: Boot loader didn't return any data!")


# sfdisk -d /dev/VolGroup00/f16test64
# partition table of /dev/VolGroup00/f16test64
unit: sectors

/dev/VolGroup00/f16test64p1 : start=     2048, size=  1024000, Id=83, bootable
/dev/VolGroup00/f16test64p2 : start=  1026048, size= 61888512, Id=8e
/dev/VolGroup00/f16test64p3 : start=        0, size=        0, Id= 0
/dev/VolGroup00/f16test64p4 : start=        0, size=        0, Id= 0

# kpartx -l /dev/VolGroup00/f16test64
f16test64p1 : 0 1024000 /dev/VolGroup00/f16test64 2048
f16test64p2 : 0 61888512 /dev/VolGroup00/f16test64 1026048

# kpartx -a /dev/VolGroup00/f16test64
# mount -o /dev/mapper/f16test64p1 /mnt/
# ls /mnt
config-3.1.0-0.rc10.git0.1.fc16.x86_64  grub2                                          initrd-plymouth.img  System.map-3.1.0-0.rc10.git0.1.fc16.x86_64
grub                                    initramfs-3.1.0-0.rc10.git0.1.fc16.x86_64.img  lost+found           vmlinuz-3.1.0-0.rc10.git0.1.fc16.x86_64

# cat /mnt/grub2/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
true
}

set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.0-0.rc10.git0.1.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root fefec5ec-dabc-45be-818f-96559fdd857e
        echo    'Loading Linux 3.1.0-0.rc10.git0.1.fc16.x86_64 ...'
        linux   /vmlinuz-3.1.0-0.rc10.git0.1.fc16.x86_64 root=/dev/mapper/vg_f16test64-lv_root ro rd.md=0 rd.dm=0 quiet SYSFONT=latarcyrheb-sun16 rhgb  KEYTABLE=fi rd.luks=0 rd.lvm.lv=vg_f16test64/lv_swap rd.lvm.lv=vg_f16test64/lv_root LANG=en_US.UTF-8
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-3.1.0-0.rc10.git0.1.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-0.rc10.git0.1.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root fefec5ec-dabc-45be-818f-96559fdd857e
        echo    'Loading Linux 3.1.0-0.rc10.git0.1.fc16.x86_64 ...'
        linux   /vmlinuz-3.1.0-0.rc10.git0.1.fc16.x86_64 root=/dev/mapper/vg_f16test64-lv_root ro single rd.md=0 rd.dm=0 quiet SYSFONT=latarcyrheb-sun16 rhgb  KEYTABLE=fi rd.luks=0 rd.lvm.lv=vg_f16test64/lv_swap rd.lvm.lv=vg_f16test64/lv_root LANG=en_US.UTF-8
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-3.1.0-0.rc10.git0.1.fc16.x86_64.img
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###



The related Fedora 16 pygrub GPT bug:
https://bugzilla.redhat.com/show_bug.cgi?id=746602
Comment 1 Miroslav Rezanina 2011-10-24 00:36:35 EDT
This is caused by problem with parsing grub2 cfg file. Fix for this issue is part o the BZ 746602 fix.

*** This bug has been marked as a duplicate of bug 746602 ***

Note You need to log in before you can comment on or make changes to this bug.