This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 747102 - Install fails on EFI machine
Install fails on EFI machine
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node (Show other bugs)
6.2
Unspecified Unspecified
high Severity high
: rc
: 6.2
Assigned To: Mike Burns
Virtualization Bugs
:
: 749477 (view as bug list)
Depends On:
Blocks: 729698 749621 773069 824928
  Show dependency treegraph
 
Reported: 2011-10-18 16:05 EDT by Andrew Cathrow
Modified: 2016-04-26 09:40 EDT (History)
16 users (show)

See Also:
Fixed In Version: ovirt-node-2.0.2-0.14.gitb764606.el6
Doc Type: Bug Fix
Doc Text:
Upgrades from beta to GA will result in an incorrect partitioning of the host. GA version must be installed clean. UEFI machines must be set to legacy boot options for RHEV-H to boot successfully after installation.
Story Points: ---
Clone Of:
: 749621 (view as bug list)
Environment:
Last Closed: 2011-12-06 14:29:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch 1 (9.79 KB, patch)
2011-10-26 12:30 EDT, Mike Burns
no flags Details | Diff
Patch 2 (1.40 KB, patch)
2011-10-26 12:31 EDT, Mike Burns
no flags Details | Diff
Screenshot of grub menu booted with grub.efi (198.12 KB, image/png)
2011-10-27 10:36 EDT, Alan Pevec
no flags Details
followup patch (4.06 KB, patch)
2011-10-27 15:26 EDT, Mike Burns
no flags Details | Diff
kernel panic (12.50 KB, image/jpeg)
2011-10-28 01:11 EDT, shaochen
no flags Details
/tmp/ovirt.log (21.23 KB, text/plain)
2011-10-31 22:15 EDT, shaochen
no flags Details
/var/log/ovirt.log-tmp (15.63 KB, text/plain)
2011-10-31 22:15 EDT, shaochen
no flags Details

  None (edit)
Description Andrew Cathrow 2011-10-18 16:05:06 EDT
It appears that RHEV-H installation fails when booted in EFI mode.
Comment 2 Alan Pevec 2011-10-18 16:30:14 EDT
Frank, can you confirm if copying efi/EFI/redhat/grub.efi to the rhevh's Root partition is enough?
Comment 4 Pieter Vogel 2011-10-21 10:44:53 EDT
I tried it on a IBM x3650 M3
RHEL 6.1 installs correct with efi

RHEV-hypervisor (latest beta) Does install but doesn't setup EFI correct so the machine won't boot.

result:
It did make 2 boot partitions but both were formatted as ext3 and it did only put date on the boot-partition. 

expected result:
2 boot partitions: 1 for grub/kernels and 1 (formatted as vfat) for EFI.
Comment 5 Alan Pevec 2011-10-21 11:09:35 EDT
(In reply to comment #4)
> RHEV-hypervisor (latest beta) Does install but doesn't setup EFI correct so the
> machine won't boot.

Is there an option to choose Legacy boot or something like that?
Comment 6 Alan Pevec 2011-10-21 11:13:56 EDT
(In reply to comment #2)
> Frank, can you confirm if copying efi/EFI/redhat/grub.efi to the rhevh's Root
> partition is enough?

Replying to myself: no, it is not. Here's boot partition layout from RHEL 6.1 on an EFI box:

Boot disk:
p1      1049kB  211MB  210MB  fat16              boot
p2      211MB   735MB  524MB  ext4
p3      735MB   146GB  145GB                     lvm

p2 is mounted at /boot, p1 at /boot/efi
   /boot/efi/EFI/redhat/grub.conf
   /boot/efi/EFI/redhat/grub.efi
   /etc/grub.conf -> ../boot/efi/EFI/redhat/grub.conf
   /boot/grub/splash.xpm.gz
   /boot/grub/device.map

So we need to distinguish between EFI and Legacy machines, grub setup is quite different in each case.
Comment 7 Pieter Vogel 2011-10-24 03:25:41 EDT
(In reply to comment #5)

> 
> Is there an option to choose Legacy boot or something like that?

Yes I used it as workaround.
Comment 8 Mohua Li 2011-10-24 05:17:29 EDT
could reproduce on IBM x3550 machine, legacy boot is ok, boot with UEFI fail, as just  1 for grub/kernels and no boot partation (formatted as vfat) for EFI
Comment 12 Mike Burns 2011-10-26 12:30:48 EDT
Created attachment 530329 [details]
Patch 1

Small followup patch coming shortly
Comment 13 Mike Burns 2011-10-26 12:31:26 EDT
Created attachment 530330 [details]
Patch 2

Testing coming shortly
Comment 14 Mike Burns 2011-10-26 12:33:39 EDT
What the patch does:

Adds a new partition:  256MB (hard coded) with vfat filesystem that is flagged for boot
Also copies EFI contents to the new partition and automounts to /boot/efi in the running image

At this point, it has not been tested to boot EFI systems, but has been tested on non-EFI systems for no regressions.
Comment 15 Mike Burns 2011-10-26 19:06:28 EDT
Autoinstall fails due to inability to unmount liveos because of EFI mount


--- a/scripts/ovirt-config-boot
+++ b/scripts/ovirt-config-boot
@@ -183,6 +183,7 @@ ovirt_boot_setup() {
     mkdir -p $grub_dir/efi
     mount LABEL=EFI $grub_dir/efi
     cp -ra /boot/efi/* $grub_dir/efi
+    umount $grub_dir/efi
     cat > $grub_dir/grub.conf << EOF
 default saved
 timeout 5
Comment 21 Mike Burns 2011-10-27 08:23:13 EDT
Adding fstab entry was missed in TUI install
Comment 22 Alan Pevec 2011-10-27 10:36:11 EDT
Created attachment 530505 [details]
Screenshot of grub menu booted with grub.efi

grub.conf also needs to be in the same folder with grub.efi
When grub.efi is selected manually in UEFI setup menu, it shows grub menu but fails to find partition - need to investigate why.
Comment 23 Alan Pevec 2011-10-27 10:59:42 EDT
See bug 748725 comment 5 - if default is to try EFI and then legacy, fixing EFI boot shouldn't be a blocker. We only need to push the disk layout change since that affects future upgrades.
Comment 24 Mike Burns 2011-10-27 13:26:41 EDT
Cloned to bug 749621 for enabling EFI installs.

For this bug, we'll setup partitions only.
Comment 25 Mike Burns 2011-10-27 15:19:52 EDT
*** Bug 749477 has been marked as a duplicate of this bug. ***
Comment 26 Mike Burns 2011-10-27 15:26:58 EDT
Created attachment 530554 [details]
followup patch

fixes install on cciss
fixes missed umount in autoinstall
removes efi mount from fstab
doesn't set efi mount as "boot"
Comment 28 shaochen 2011-10-27 23:28:59 EDT
Test version:
rhev-hypervisor6-6.2-20111019.5.el6

TUI install RHEVH to cciss, after reboot will cause kernel panic. 
No such problem when auto install to cciss.
Please see attachment for more details.
So change bug status to ASSIGNED.
Comment 29 shaochen 2011-10-28 01:11:18 EDT
Created attachment 530610 [details]
kernel panic
Comment 31 shaochen 2011-10-28 01:31:42 EDT
(In reply to comment #28)
> Test version:
> rhev-hypervisor6-6.2-20111019.5.el6
> 
> TUI install RHEVH to cciss, after reboot will cause kernel panic. 
> No such problem when auto install to cciss.
> Please see attachment for more details.
> So change bug status to ASSIGNED.

The same issue occurs in version rhev-hypervisor6-6.2-20111026.2.el6.
Comment 32 Mike Burns 2011-10-28 11:43:57 EDT
Can you please provide the ovirt.log from the installation?  (You can boot from media, and extract it that way).  Or provide a console log for the installation?
Comment 33 shaochen 2011-10-31 02:21:31 EDT
(In reply to comment #32)
> Can you please provide the ovirt.log from the installation?  (You can boot from
> media, and extract it that way).  Or provide a console log for the
> installation?

About a few  seconds after boot to grub menu, the kernel panic will occur. So I can't obtain the ovirt.log file. 
There is no any output by serial console.
Comment 34 Mike Burns 2011-10-31 07:58:19 EDT
The ovirt log can be obtained by installing via TUI, then instead of choosing to reboot, drop to the shell, manually setup networking (use /usr/libexec/ovirt-config-networking) and root password/ssh password auth (use /usr/libexec/ovirt-config-password) then scp the log file off.
Comment 36 shaochen 2011-10-31 22:15:14 EDT
Created attachment 531054 [details]
/tmp/ovirt.log
Comment 37 shaochen 2011-10-31 22:15:55 EDT
Created attachment 531055 [details]
/var/log/ovirt.log-tmp
Comment 39 Mike Burns 2011-11-02 02:31:58 EDT
Thanks to jboggs and apevec


diff --git a/scripts/install.py b/scripts/install.py
index a80f049..d54c121 100755
--- a/scripts/install.py
+++ b/scripts/install.py
@@ -155,6 +155,8 @@ def ovirt_boot_setup():
         os.makedirs(grub_dir + "/efi")
         system("mount LABEL=EFI "+grub_dir+"/efi")
         system("cp -ra /boot/efi/* " + grub_dir + "/efi")
+        system("umount /liveos/grub/efi")
+
     if not system("cp -p /live/" + syslinux + "/vmlinuz0 " + initrd_dest):
         log("kernel image copy failed.")
         return False
Comment 48 Mike Burns 2011-11-04 10:44:59 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Upgrades from beta to GA will result in an incorrect partitioning of the host.  GA version must be installed clean.
Comment 50 Mike Burns 2011-12-02 08:43:17 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,3 @@
-Upgrades from beta to GA will result in an incorrect partitioning of the host.  GA version must be installed clean.+Upgrades from beta to GA will result in an incorrect partitioning of the host.  GA version must be installed clean.
+
+UEFI machines must be set to legacy boot options for RHEV-H to boot successfully after installation.
Comment 51 Tomas Von Veschler 2011-12-04 07:52:54 EST
Informational only, here are the steps to boot in legacy mode on IBM M3 servers with UEFI BIOS, needed to properly install and boot RHEV-H:

* To enter the UEFI\Basic Input/Output System (BIOS) menu, power on the server and press F1 during the IBM splash screen.

* Using the arrow keys to navigate, scroll down to highlight "Boot Manager" and press Enter.

* “Add Boot Option” is highlighted by default. Press Enter.

* Using the down arrow key, scroll down until "Legacy Only" is highlighted. Press Enter.

* Select “Change Boot Order” and press Enter.

* Press Enter to begin changing the boot order.

* Highlight Legacy Only and press Shift + to move it to the top. Press Enter.

* Press the down arrow once to highlight "Commit Changes" and press Enter.
Comment 52 errata-xmlrpc 2011-12-06 14:29:24 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1783.html

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