<?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>10485</bug_id>
          
          <creation_ts>2016-10-21 22:23:01 +0000</creation_ts>
          <short_desc>wic images on SD card do not boot with meta-intel (USB drives boot fine)</short_desc>
          <delta_ts>2017-05-25 20:52:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>Installation</product>
          <component>Installation</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Esquivel">benjamin.esquivel</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>alejandro.hernandez</cc>
    
    <cc>eduard.bartosh</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>oscarx.lopez.arandas</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="oscar lopez arandas">oscarx.lopez.arandas</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>67469</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-21 22:23:01 +0000</bug_when>
    <thetext>This was first spotted on joule but later tests in minnowboard confirm that the latest Wic images cannot boot if burnt to an SD card, but if transferred to a USB drive, it will boot fine.

with:


poky: 4b94b49
meta-intel: 8dbd551

1. build a core image minimal with meta intel&apos;s machine intel-corei7-64
2. burn the wic image to an sd card using dd
3. try to boot it
4. instead of booting you will see this message:
   Waiting for root device /dev/sda2...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67474</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-24 08:21:58 +0000</bug_when>
    <thetext>From the first look it looks like you&apos;re trying to boot non-efi image. If you want that you should probably put proper device name to your wks file. However, it&apos;s better to build efi image.

Just booted my MinnowBoard MAX from genericx86-64 image flashed to sd card:
root@genericx86-64:~# cat /proc/cmdline 
BOOT_IMAGE=/bzImage root=PARTUUID=f7952252-f409-4f5d-b448-1828b714b1b5 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0
root@genericx86-64:~# ls -la /dev/disk/by-partuuid/f7952252-f409-4f5d-b448-1828b714b1b5 
lrwxrwxrwx    1 root     root            15 Aug  3 00:00 /dev/disk/by-partuuid/f7952252-f409-4f5d-b448-1828b714b1b5 -&gt; ../../mmcblk1p2

Will try to build intel-corei7-64 image and boot it too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67476</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-24 09:37:24 +0000</bug_when>
    <thetext>Minnow MAX doesn&apos;t boot with intel-corei7-64 EFI image. After running bootloader manually it showed message &quot;Reboot Into Firmware Interface&quot;. It looks like bootloader issue to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67477</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-24 09:53:25 +0000</bug_when>
    <thetext>intel-corei7-64 wic images booted just fine after I&apos;ve changed efi provider to grub-efi. Here is what I&apos;ve added to my conf/local.conf to make it working:
WKS_FILE = &quot;mkefidisk.wks&quot;
IMAGE_FSTYPES += &quot; wic&quot;
EFI_PROVIDER = &quot;grub-efi&quot;

Here is a login promt on device:
...
Poky (Yocto Project Reference Distro) 2.2 intel-corei7-64 /dev/ttyS0

intel-corei7-64 login:

To sum it up:

Original problem with non-efi image was that directdisk.wks was used to produce an image. It configured to use &apos;sda&apos; device. Changing it to mmcblk1 should make it working. However, I wouldn&apos;t recommend this way. It&apos;s better to use EFI images as they should work on any device.

The problem with EFI image was in mismatch between efi provider used for the machine(rmc-systemd-boot) and the one used in .wks file(grub-efi). Changing efi provider to grub-efi in conf/local.conf solved this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67478</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-24 13:10:06 +0000</bug_when>
    <thetext>The image booted on Joule after changing bootloader to gummiboot:

diff --git a/scripts/lib/wic/canned-wks/mkgummidisk.wks b/scripts/lib/wic/canned-wks/mkgummidisk.wks
index f3ae090..7623e8f 100644
--- a/scripts/lib/wic/canned-wks/mkgummidisk.wks
+++ b/scripts/lib/wic/canned-wks/mkgummidisk.wks
@@ -4,8 +4,8 @@
 
 part /boot --source bootimg-efi --sourceparams=&quot;loader=gummiboot&quot; --ondisk sda --label msdos --active --align 1024
 
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
 
 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
 
-bootloader --ptable gpt --timeout=5  --append=&quot;rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0&quot;
+bootloader --ptable gpt --timeout=5  --append=&quot;rootwait rootfstype=ext4 console=ttyS2,115200 console=tty0&quot;

and these lines in conf/local.conf:
WKS_FILE = &quot;mkgummidisk.wks&quot;
IMAGE_FSTYPES += &quot; wic&quot;
EFI_PROVIDER = &quot;gummiboot&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67480</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-24 14:35:53 +0000</bug_when>
    <thetext>Fixed it by adding --use-uuid to systemd-bootdisk.wks: http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127948.html

With this change MinnowBoard MAX booted core-image-minimal-intel-corei7-64.wic to shell from MicroSD card with no other changes needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67481</commentid>
    <comment_count>6</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-24 16:07:12 +0000</bug_when>
    <thetext>This change worked just fine, I tried it both in Minnowboard and Joule and both boot to login prompt.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68533</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-23 13:53:33 +0000</bug_when>
    <thetext>The fix has been accepted to poky master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73517</commentid>
    <comment_count>8</comment_count>
    <who name="oscar lopez arandas">oscarx.lopez.arandas</who>
    <bug_when>2017-05-25 20:52:59 +0000</bug_when>
    <thetext>wic image on SD card boot with success meta-intel

Build Configuration:
BB_VERSION        = &quot;1.34.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;universal&quot;
TARGET_SYS        = &quot;x86_64-poky-linux&quot;
MACHINE           = &quot;intel-corei7-64&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.3&quot;
TUNE_FEATURES     = &quot;m64 corei7&quot;
meta-yocto-bsp    = &quot;HEAD:e5aa1ac23669a45491de9ecffac491c01e70203f&quot;
meta-intel        = &quot;master:7e8f98aa326f16edd679a95f7bb2daf4256479f3&quot;

1. build a core image minimal with meta intel&apos;s machine intel-corei7-64
2. burn the wic image to an sd card using: sudo dd if=core-image-minimal-intel-corei7-64.wic of=/dev/mmcblk0
3. try to boot it
4. The image boot successfully.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>