centos 6 image doesn't boot after creation

Bug #1477179 reported by Pedro Sousa
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
diskimage-builder
Triaged
Medium
Unassigned

Bug Description

Procedure:

#git clone https://git.openstack.org/openstack/diskimage-builder.git

#git clone https://git.openstack.org/openstack/tripleo-image-elements.git

#git clone https://git.openstack.org/openstack/heat-templates.git

#git clone https://git.openstack.org/openstack/dib-utils.git

#export PATH="$ {PWD} /dib-utils/bin:$PATH"

#export ELEMENTS_PATH=tripleo-image-elements/elements:heat-templates/hot/software-config/elements

#diskimage-builder/bin/disk-image-create vm centos selinux-permissive os-collect-config os-refresh-config os-apply-config heat-config-cfn-init heat-config-puppet heat-config-script -o centos6.qcow

# glance image-create --disk-format qcow2 --container-format bare --name centos6-cloud < centos6.qcow2

Result:

after nova server launch the vm doesn't boot, please see the attached screenshot.

Revision history for this message
Pedro Sousa (pgsousa) wrote :
Changed in diskimage-builder:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Holger King (holger-king) wrote :

We get the same error during boot (see initial screenshot of Pedro Sousa enclosed) when trying to create a:
- centos

custom QCOW2 image with less DIB elements involved compared to the ones provided by Pedro Sousa. Here, the command:
diskimage-builder/bin/disk-image-create -a amd64 vm centos -o CentOS-6.6-x86_64-openshift-origin-broker

When taking a look on the downloaded CentOS cloud image size compared with the repackaged size during the DIB run in:
/root/.cache/image-create

we see a big difference. We assume, there is the problem!

Revision history for this message
Holger King (holger-king) wrote :

Or is it maybe the fatal error during the Kernel update, saying:

...
Installing : kernel....x86_64
grubby fatal error: unable to find a suitable template
...

Revision history for this message
Peter Nordquist (pnnl-plnordquist) wrote :

I'm having this same issue and it has been preventing me from using sahara-image-elements repository with HDP. I've even used a minimal command to only use the vm and centos elements and it's not booting. I'm currently using the RDO packages version 0.1.42-3.el7 of diskimage-builder.

Revision history for this message
Peter Nordquist (pnnl-plnordquist) wrote :

I was able to build bootable images when I swapped over to building images from an Ubuntu 14.04 host from a Centos 7.1 host. The one difference I could see was the extlinux install process. It seems to report two different devices for the partition device.

Ubuntu:
+ extlinux --install /boot/extlinux
/boot/extlinux is device /dev/disk/by-label/cloudimg-rootfs

Centos:
+ extlinux --install /boot/extlinux
/boot/extlinux is device /dev/loop0p1

I'm not sure if this is related at all to this bug though since sometimes Ubuntu reports /dev/loop0p1 as the boot disk. Much of my testing has been with diskimage-builder tag 1.1.2 on Ubuntu 14.04 now.

Revision history for this message
Maxim (popov-max) wrote :

Any updates on this issue ?

I'm building a CentOS 6 image and get the same error as on the screenshot from the first post.

# git clone https://github.com/openstack/diskimage-builder.git
# DIB_RELEASE=GenericCloud diskimage-builder/bin/disk-image-create -a amd64 -o centos6-amd64 vm centos

Revision history for this message
fxpester (a-yurtaykin) wrote :

just hit it when tried to make rhel7 image, any workarounds ?

commands to reproduce:

export DIB_LOCAL_IMAGE=rhel-guest-image-7.2-20160302.0.x86_64.qcow2 && disk-image-create --install-type package -x -x -t raw rhel7 rhel-common baremetal dhcp-all-interfaces grub2 -o rhel7_ironic

then mount image and check grub.conf, you will see the only option is to boot in rescue mode.

Revision history for this message
Gaoxiao Zhu (zhugaoxiao) wrote :

I have the same question,when i building a CentOS 6 image.

Revision history for this message
Gaoxiao Zhu (zhugaoxiao) wrote :

the build log,using cli: disk-image-create -x centos baremetal dhcp-all-interfaces grub2 -o centos-baremetal

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

Got the same error message by using latest diskimage-builder (1.24.0).

any progress and workaround?

Revision history for this message
Michal Adamczyk (vanditboy) wrote :

Hi,

I have same issue building CentOS 6 with version 1.26.1. Any progress here?

Kind regards,
Michal.

Revision history for this message
Michal Adamczyk (vanditboy) wrote :

FYI: I am using CentOS 7.3 with all latest updates. I have tried to build it with following images: CentOS-6-x86_64-GenericCloud-1611.qcow2.xz, CentOS-6-x86_64-GenericCloud-1612.qcow2.xz and the default one. I did it with "grub2" element and without - same result as on Pedro's screenshot.

Revision history for this message
Michal Adamczyk (vanditboy) wrote :

FYI: I did test on Ubuntu 14.04 with the latest updates and it works...
So only CentOS 7.3 is impacted in my case.

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

I built a centos6 just now, this issue still happen, any update?

Revision history for this message
Michal Adamczyk (vanditboy) wrote :

Same for me when building on CentOS 7 with the latest diskimage-builder 2.2 release...

Revision history for this message
Junbo Jiang (junbo) wrote :

HI ALL

Disable 64bit feature can resolve this problem, syslinux currently not support this feature with ext4, see http://www.syslinux.org/wiki/index.php?title=Filesystem

the following command can build centos 6 image successfully.

disk-image-create --mkfs-options "-O ^64bit" centos vm

Revision history for this message
MarginHu (margin2017) wrote :

I want to know why use syslinux instead of grub.

Revision history for this message
Luigi Toscano (ltoscano) wrote :

Maybe because centos6 has grub1, not grub2, and adding the code for syslinux was easier.

This may be all moot now, anyway: the centos element has been removed starting from diskimage-builder version 2.7:
https://review.openstack.org/#/c/478344/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.