<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9824</bug_id>
          
          <creation_ts>2016-06-24 12:58:47 +0000</creation_ts>
          <short_desc>WIC images fail to boot</short_desc>
          <delta_ts>2016-06-29 15:51:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-yocto</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Roman">alexandru.costinx.roman</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>eduard.bartosh</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63322</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2016-06-24 12:58:47 +0000</bug_when>
    <thetext>Appears on 2.2_M1.rc2 : 6f0c5537e02c59e1c8f3b08f598dc049ff8ee098
Image: core-image-sato -  WIC image
MACHINE: genericx86, genericx86-64
HW: MMAX32bit, MMAX64bit, NUC

After the nightly-wic step from our AB finished I downloaded the images from:
http://10.237.112.85/wic-images/genericx86-64/mkefidisk/core-image-sato/build/
and tried to boot them on the hardware mentioned above.

From the uefi I tried to access bootx.efi and wait for the image to boot but instead of booting the grub interface appears.

Then I tried to create the image with the command: &apos;wic create mkefidisk -e core-image-sato&apos; and I got the same result.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63390</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 09:22:51 +0000</bug_when>
    <thetext>I&apos;ll try to look at this. Do you remember when they&apos;re working last time?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63391</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 10:36:43 +0000</bug_when>
    <thetext>I was able to boot core-image-minimal on my Minnowboard MAX just fine. Will try core-image-sato now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63392</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 11:06:55 +0000</bug_when>
    <thetext>btw, you saw grub menu because mkefidisk.wks sets grub as a bootloader:
part /boot --source bootimg-efi --sourceparams=&quot;loader=grub-efi&quot; --ondisk sda --label msdos --active --align 1024

I think it&apos;s always been like that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63393</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 11:29:43 +0000</bug_when>
    <thetext>I&apos;ve just built core-image-sato and booted it to the shell. Here is what I see on the console:

Poky (Yocto Project Reference Distro) 2.1+snapshot-20160628 intel-corei7-64 /de0

intel-corei7-64 login: root
root@intel-corei7-64:~# rpm -qa | wc -l
1676
root@intel-corei7-64:~# 

I can&apos;t see graphical UI though as I&apos;m using serial console. However, the fact that image is booting to the shell is enough to prove that wic creates bootable image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63396</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 12:59:11 +0000</bug_when>
    <thetext>Built core-image-sato from revision 6f0c5537e02c59e1c8f3b08f598dc049ff8ee098
It booted to the shell.

I&apos;m using intel-corei7-64 machine. 
I&apos;m going to build the image for genericx86-64 and try again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63397</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 13:40:58 +0000</bug_when>
    <thetext>Built and booted core-image-minimal genericx86-64
building core-image-sato</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63398</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 14:00:10 +0000</bug_when>
    <thetext>built and successfully booted core-image-sato genericx86-64:
Poky (Yocto Project Reference Distro) 2.1+snapshot-20160628 genericx86-64 /dev/ttyS0

genericx86-64 login: root
root@genericx86-64:~#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63400</commentid>
    <comment_count>8</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 14:39:33 +0000</bug_when>
    <thetext>This image http://10.237.112.85/wic-images/genericx86-64/mkefidisk/core-image-sato/build/mkefidisk-core-image-sato-genericx86-64.direct is definitely broken. An attempt to mount root partition causes mount to fail with this error:
$ sudo mount /dev/sdb2 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
       missing codepage or helper program, or other error

and this line in dmesg:
[686485.983900] EXT4-fs (sdb2): bad geometry: block count 166400 exceeds size of device (118019 blocks)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63403</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 15:07:09 +0000</bug_when>
    <thetext>The amount of packages in both images(broken AB image and the image i&apos;ve built) are the same, but the size of rootfs partition image for AB image is much bigger (650Mb vs 462Mb)

Could someone point me out to the ab code that builds wic image?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63410</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-28 15:45:24 +0000</bug_when>
    <thetext>Can we try to build mkefidisk image on official ab?
This configuration change should be enough to do it I hope:
diff --git a/buildset-config.controller/nightly-wic.conf b/buildset-config.controller/nightly-wic.conf
index 680ac16..7d2ae88 100644
--- a/buildset-config.controller/nightly-wic.conf
+++ b/buildset-config.controller/nightly-wic.conf
@@ -18,7 +18,8 @@ steps: [{&apos;SetDest&apos;:{}},
         {&apos;BuildImages&apos;:{&apos;images&apos;:&apos;syslinux syslinux-native parted-native gptfdisk-native dosfstools-native mtools-native&apos;}},
         {&apos;BuildImages&apos;:{&apos;images&apos;:&apos;core-image-sato&apos;}},
         {&apos;CreateWicImages&apos;:{&apos;wic_img_type&apos;:&apos;directdisk&apos;, &apos;target_img&apos;:&apos;core-image-sato&apos;}},
-        {&apos;CreateWicImages&apos;:{&apos;wic_img_type&apos;:&apos;directdisk-gpt&apos;, &apos;target_img&apos;:&apos;core-image-sato&apos;}}]
+        {&apos;CreateWicImages&apos;:{&apos;wic_img_type&apos;:&apos;directdisk-gpt&apos;, &apos;target_img&apos;:&apos;core-image-sato&apos;}},
+        {&apos;CreateWicImages&apos;:{&apos;wic_img_type&apos;:&apos;mkefidisk&apos;, &apos;target_img&apos;:&apos;core-image-sato&apos;}}]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63447</commentid>
    <comment_count>11</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-29 11:37:58 +0000</bug_when>
    <thetext>I&apos;ve checked 4 images produced by one of official AB workers and they&apos;re good. I&apos;m still not able to reproduce the issue in my environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63453</commentid>
    <comment_count>12</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-29 13:20:02 +0000</bug_when>
    <thetext>taking this bug as I&apos;m working on it anyway</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63455</commentid>
    <comment_count>13</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-29 14:53:17 +0000</bug_when>
    <thetext>We worked with Alexandru on this. He created a core-image-sato mkefidisk image and I was able to boot it without changing anything. So, the issue is not reproducible anymore on his machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63463</commentid>
    <comment_count>14</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-29 15:51:02 +0000</bug_when>
    <thetext>I think I found the real reason for this bug. The .wks file was modified pointing to sdb device. The result of this change is &apos;root=/dev/sdb2&apos; was added to the kernel command line in bootloader configuration.

I was able to boot the image from http://10.237.112.85/wic-images/genericx86-64/mkefidisk/core-image-sato/build/ after I changed /dev/sdb2 to /dev/sda2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>