Diskimage-builder (DIB) produces a non-bootable RHEL 6.7 QCOW2-image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
New
|
Undecided
|
Unassigned |
Bug Description
Dear DIB team,
1. We are running:
diskimage-builder (DIB: http://
on a host offering the following environment:
- RHEL 7.1
- dib-utils 0.0.9-1
- sfdisk 2.23.2 (util-linux 2.23.2)
2. Reproduction is done when:
We've set the following environment variables to allow a proper execution and connection setup with our RHEL Satellite environment for package updates during the diskimage-builder run:
- export DIB_RHSM_
- export DIB_RHSM_
- export DIB_SAT_URL=https://<host>.
- export DIB_SAT_
- export DIB_RHN_CHANNELS=""
- export DIB_REG_TYPE=rhn
- export DIB_RELEASE=
- export DIB_CLOUD_
- export DIB_IMAGE_SIZE=5
- export TMP_DIR=$HOME/oso
Optionally, setting break point before starting "block-device" phase in DIB:
- export break=before-
The command we use to start the DIB image creation process (without having set the environment variable "break")
diskimage-
The command es use to start the DIB image creation process (when having set the environment variable "break")
diskimage-
Import the created image into OpenStack Kilo Glance via:
glance image-create --name RHEL-x86_
Launch an instance of the imported image via OpenStack Horizon or OpenStack Nova and take a look on the instance's log file below:
/var/lib/
It'll stay empty. That documents that the image did not boot!
3. Analysis and root cause identification:
The problem seems to be located within the "block-device.d" phase running outside "chroot" where the partition table writing respectively the bootloader handling seems to fail.
With an activated "break=
dib-run-parts /root/oso/
beyond the chroot environment. This shows the problematic "sfdisk" command, too. Below the generated interesting log output of DIB:
...
dib-run-parts Mon Sep 21 18:29:08 CEST 2015 Running /root/oso/
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
sfdisk: Disk /dev/loop2: cannot get geometry
sfdisk: /dev/loop2: unrecognized partition table type
sfdisk: No partitions found
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/181/40 (instead of 652/255/63).
For this listing I'll assume that geometry.
sfdisk: start: (c,h,s) expected (0,51,9) found (0,32,33)
sfdisk: end: (c,h,s) expected (1023,180,40) found (652,180,40)
Warning: partition 1 does not end at a cylinder boundary
end of partition 1 has impossible value for cylinders: 652 (should be in 0-651)
BLKRRPART: Invalid argument
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
dib-run-parts Mon Sep 21 18:29:08 CEST 2015 10-partition completed
Disk /dev/loop2: 652 cylinders, 255 heads, 63 sectors/track
Old situation:
New situation:
Units: sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/loop2p1 * 2048 10485759 10483712 83 Linux
/dev/loop2p2 0 - 0 0 Empty
/dev/loop2p3 0 - 0 0 Empty
/dev/loop2p4 0 - 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
IMAGE_BLOCK_
...
dib-run-parts Mon Sep 21 18:29:32 CEST 2015 Running /root/oso/
+ set -eu
+ set -o pipefail
+ '[' -n /root/oso/
+ source /root/oso/
+ '[' -d /root/oso/
+ CONF=/root/
+ select_
+ TARGET_
+ BOOTDIR=
+ '[' -n '' -a -n '' ']'
+ '[' -f /root/oso/
++ grep PAE
++ ls -1rv /root/oso/
++ grep -v debug
++ head -1
++ echo ''
+ KERNEL=
++ ls -1rv /root/oso/
++ grep -v debug
++ head -1
+ KERNEL=
+ '[' '!' /root/oso/
++ basename /root/oso/
+ KERNEL=
+ KERNEL_
+++ ls /root/oso/
++ basename /root/oso/
+ RAMDISK=
+ '[' '!' initramfs-
+ sudo sh -c 'cat > /root/oso/
DEFAULT linux
LABEL linux
KERNEL /boot/vmlinuz-
APPEND ro root=LABEL=
INITRD /boot/initramfs
_EOF_'
dib-run-parts Mon Sep 21 18:29:32 CEST 2015 51-bootloader completed
When uploading the original non-modified/
From our point of view there seems to be bug within the DIB. Do you agree? Maybe it's related to:
https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |