View Issue Details

IDProjectCategoryView StatusLast Update
0007191CentOS-7anacondapublic2014-06-17 17:06
Reportersandersr Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformKVM  
Summary0007191: Installation fails on EFI system during boot loader setup
DescriptionAnaconda fails during boot loader installation no KVM virtual machine with EFI.
Steps To Reproduce1) Add efi firmware repository:

/etc/yum.repos.d/qemu_firmware.repo
[qemu-firmware-jenkins]
name=firmware for qemu, built by jenkins, fresh from git repos
baseurl=http://www.kraxel.org/repos/jenkins/
metadata_expire=5m
enabled=1
gpgcheck=0

[qemu-firmware-manual]
name=firmware for qemu, built manually, not so fresh from git repos
baseurl=http://www.kraxel.org/repos/manual/
enabled=0
gpgcheck=0

2) create virtual machine

<domain type='kvm'>
  <name>centos7</name>
  <uuid>a5368e21-d746-4d58-8e2f-cefcc380f78d</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-1.6'>hvm</type>
    <loader>/usr/share/edk2.git/ovmf-x64/OVMF-pure-efi.fd</loader>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell</model>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/centos7.qcow2'/>
      <target dev='sda' bus='scsi'/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/home/sandersr/Downloads/boot.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:fa:53:c7'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

3) install from boot.iso
Additional InformationLog file attached.
TagsNo tags attached.
abrt_hash
URL

Relationships

related to 0007167 resolvedkbsingh@karan.org Bootloader can't be installed in UEFI mode in VirtualBox 

Activities

sandersr

sandersr

2014-06-17 14:01

reporter  

log.tar.xz (62,256 bytes)
sandersr

sandersr

2014-06-17 14:02

reporter   ~0019893

FYI - RHEL 7rc installs fine
sandersr

sandersr

2014-06-17 14:21

reporter   ~0019894

I believe it's the same error as ticket #0007167

it looks like it's trying to install grub.cfg into /boot/efi/EFI/fedora but only /boot/efi/EFI/redhat is available.
sandersr

sandersr

2014-06-17 14:22

reporter  

error.png (80,100 bytes)   
error.png (80,100 bytes)   
sandersr

sandersr

2014-06-17 15:10

reporter   ~0019896

Looking at the anaconda sources:
https://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/installclasses there is only fedora (default) or rhel options.

Attached is a patch concept - I don't even know if it's gonna work. I also don't know if you want to keep /boot/efi/EFI/redhat or would you rather prefer /boot/efi/EFI/centos
sandersr

sandersr

2014-06-17 15:10

reporter  

0001-Update-anaconda-to-save-grub-config-file-to-redhat-d.patch (3,178 bytes)   
From 4bd9fe45b7f417603693adc83d726194a3c1ad45 Mon Sep 17 00:00:00 2001
From: Rob Sanders <rob@sandersmail.eu>
Date: Tue, 17 Jun 2014 16:06:57 +0100
Subject: [PATCH] Update anaconda to save grub config file to redhat directory


diff --git a/pyanaconda/installclasses/centos.py b/pyanaconda/installclasses/centos.py
new file mode 100644
index 0000000..e28ea0b
--- /dev/null
+++ b/pyanaconda/installclasses/centos.py
@@ -0,0 +1,66 @@
+f#
+# centos.py
+#
+# Copyright (C) 2010  Red Hat, Inc.  All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from pyanaconda.i18n import N_
+from pyanaconda.installclass import BaseInstallClass
+from pyanaconda.product import productName
+from pyanaconda import network
+from pyanaconda import nm
+
+class InstallClass(BaseInstallClass):
+    # name has underscore used for mnemonics, strip if you dont need it
+    id = "rhel"
+    name = N_("CentOS")
+    sortPriority = 10000
+    if not productName.startswith("CentOS "):
+        hidden = 1
+    defaultFS = "xfs"
+
+    bootloaderTimeoutDefault = 5
+    bootloaderExtraArgs = []
+
+    ignoredPackages = ["ntfsprogs"]
+
+    installUpdates = False
+
+    _l10n_domain = "comps"
+
+    efi_dir = "redhat"
+
+    def configure(self, anaconda):
+        BaseInstallClass.configure(self, anaconda)
+        BaseInstallClass.setDefaultPartitioning(self, anaconda.storage)
+
+    def setNetworkOnbootDefault(self, ksdata):
+        if ksdata.method.method not in ("url", "nfs"):
+            return
+        if network.has_some_wired_autoconnect_device():
+            return
+        # choose the device used during installation
+        # (ie for majority of cases the one having the default route)
+        dev = network.default_route_device()
+        if not dev:
+            return
+        # ignore wireless (its ifcfgs would need to be handled differently)
+        if nm.nm_device_type_is_wifi(dev):
+            return
+        network.update_onboot_value(dev, "yes", ksdata)
+
+    def __init__(self):
+        BaseInstallClass.__init__(self)
diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 1fe192b..dac8097 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -28,7 +28,7 @@ class InstallClass(BaseInstallClass):
     id = "fedora"
     name = N_("_Fedora")
     sortPriority = 10000
-    if productName.startswith("Red Hat "):
+    if productName.startswith("Red Hat ") or productName.startswith("CentOS "):
         hidden = 1
 
     _l10n_domain = "anaconda"
-- 
1.9.3

kbsingh@karan.org

kbsingh@karan.org

2014-06-17 17:06

reporter   ~0019899

thanks for the patch, this should be fixed in todays build. please test once 2014-06-17 tree is available.

Issue History

Date Modified Username Field Change
2014-06-17 14:01 sandersr New Issue
2014-06-17 14:01 sandersr File Added: log.tar.xz
2014-06-17 14:02 sandersr Note Added: 0019893
2014-06-17 14:21 sandersr Note Added: 0019894
2014-06-17 14:22 sandersr File Added: error.png
2014-06-17 15:10 sandersr Note Added: 0019896
2014-06-17 15:10 sandersr File Added: 0001-Update-anaconda-to-save-grub-config-file-to-redhat-d.patch
2014-06-17 16:09 toracat Relationship added related to 0007167
2014-06-17 17:06 kbsingh@karan.org Note Added: 0019899
2014-06-17 17:06 kbsingh@karan.org Status new => resolved
2014-06-17 17:06 kbsingh@karan.org Resolution open => fixed