<?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>2138</bug_id>
          
          <creation_ts>2012-03-19 14:32:06 +0000</creation_ts>
          <short_desc>live image fails to boot if size exceeds 1 GB</short_desc>
          <delta_ts>2013-02-08 09:10:56 +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>OE-Core</product>
          <component>core</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>1.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Immanuel">josh</reporter>
          <assigned_to name="Darren Hart">dvhart</assigned_to>
          <cc>corneliux.stoicescu</cc>
    
    <cc>dexuan.cui</cc>
    
    <cc>dvhart</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>josh</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>przemyslawx.czesnowicz</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>steve</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19219</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-19 14:32:06 +0000</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19220</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-19 14:43:54 +0000</bug_when>
    <thetext>When building a live image (.hddimg), the generated image fails to boot if the image size exceeds 1GB. This is due to the limitation set in the syslinux.

This can be verified easily by overriding the bootimg.bbclass and copy any large enough file (so as to exceed the 1GB) into ${HDDDIR} before doing the mkdosfs. The generated image can be dd&apos;ed into a usb stick and be checked for its boot ability. This will fail with syslinux stating &quot;No DEFAULT or UI configuration directive found&quot;.

To fix this, either we have to patch syslinux or use some other bootloader.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19224</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-19 16:34:54 +0000</bug_when>
    <thetext>I&apos;ll copy my question to the mailing list here.

Where are you getting this information?

From what I can gather, syslinux 2.xx didn&apos;t support FAT32, which
limited the maximum filesystem size purely due to limitations of FAT16.
Syslinux 3.xx supports FAT32. We are building syslinux 4.xx in Yocto.

I&apos;m fairly certain I&apos;ve built syslinux images larger than 1GB without an
issue.

Can you provide a failure case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19225</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-19 16:35:09 +0000</bug_when>
    <thetext>.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19242</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-03-20 00:32:10 +0000</bug_when>
    <thetext>I just build a live image for the Build appliance with a rootfs of 3G, so I am pretty sure this is working, I would need more details but as I have a working version I am going to lower the priority of this bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19275</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-21 07:34:34 +0000</bug_when>
    <thetext>Darren,

Do the following quick hack in order to reproduce the problem 

In bootimg.bbclass add the following line before calculating the BLOCKS in &apos;build_boot_bin&apos; function

dd if=/dev/zero of=${HDDDIR}/zero.img count=2097152

Then on the command line do the following

$ bitbake core-image-minimal

Then dd the image on to the USB disk

$ dd if=tmp/deploy/images/core-image-minimal-&lt;machine&gt;.hddimg of=/dev/sdb
$ sync

Now try booting the machine via USB. You will get the following error message on the syslinux boot prompt

&quot;No DEFAULT or UI configuration directive found!&quot;

For further information we can see this thread (though the thread is from 2006 but it is still applicable)
http://www.syslinux.org/archives/2006-October/007535.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19276</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-21 08:15:47 +0000</bug_when>
    <thetext>If we try to boot the image by specifying the command options directly in the syslinux boot prompt like this

&gt; SYSLINUX 4.03 ...
&gt; No DEFAULT or UI configuration directive found!
&gt; boot: vmlinuz initrd=initrd


then I get the kernel panic like this

&gt; Kernel panic - not syncing: Attempted to kill init!

If I try to dd the image (hddimg) on to the compact flash card and boot it on my Intel Atom N270 eKino board (www.comp-mall.de/datenblatt/eKINO-ATOM.pdf) I get the &quot;Boot error&quot; message, as there are no boot flag marked partitions in it.

So, the problem do exist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19284</commentid>
    <comment_count>7</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-21 14:31:02 +0000</bug_when>
    <thetext>How much freespace do you have on the image after you have added the 2 MB zero file? Try mounting the image on your host machine and reporting the output of &quot;df&quot; here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19327</commentid>
    <comment_count>8</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-22 06:14:52 +0000</bug_when>
    <thetext>Darren,

The size of the zero.img is 1073741824 bytes.
The size of core-image-minimal-&lt;machine&gt;.hddimg is 1099686912 bytes.

The df output for the mounted core-image-minimal is

Filesystem         1K-blocks      Used Available Use% Mounted on
/dev/loop0           1073760   1073536       224 100% /tmp/img</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19328</commentid>
    <comment_count>9</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-22 06:58:54 +0000</bug_when>
    <thetext>The below link also suggests that the 1GB limit of syslinux is still in place even in FAT32
http://www.damnsmalllinux.org/f/topic-3-17-17659-0.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19336</commentid>
    <comment_count>10</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-22 15:00:45 +0000</bug_when>
    <thetext>Try boosting the the BOOTIMG_EXTRA_SPACE count (units in 512b blocks) up to account for the dd you add and ensure you have 1MB or so of free space.

Regarding the Boot Error, there are other reasons that can happen, including broken BIOSs. See the poky README.hardware and see the section on USB ZIP format (this is also documented in the syslinux documentation).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19340</commentid>
    <comment_count>11</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-22 15:14:31 +0000</bug_when>
    <thetext>Consider the following example of syslinux working on a larger than 1GB image:

dvhart@envy:~/projects/bug2138
$ mkdosfs -n boot -S 512 -C boot.img $(expr 1099686912 / 512)
mkdosfs 3.0.11 (24 Dec 2010)
dvhart@envy:~/projects/bug2138
$ syslinux boot.img 
dvhart@envy:~/projects/bug2138
$ echo &quot;serial 0&quot; &gt; syslinux.cfg
dvhart@envy:~/projects/bug2138
$ mcopy -i boot.img -s syslinux.cfg ::/
dvhart@envy:~/projects/bug2138
dvhart@envy:~/projects/bug2138
$ ls -lah boot.img 
-rw-rw-r--. 1 dvhart dvhart 2.1G Mar 22 08:08 boot.img
dvhart@envy:~/projects/bug2138
$ mkdir mnt
dvhart@envy:~/projects/bug2138
$ sudo mount -o loop boot.img mnt
dvhart@envy:~/projects/bug2138
$ df -h mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/loop0            2.1G   40K  2.1G   1% /home/dvhart/projects/bug2138/mnt

$ qemu -nographic -hda boot.img 
Could not initialize KVM, will disable KVM support

SYSLINUX 4.02 2010-07-21  Copyright (C) 1994-2010 H. Peter Anvin et al
No DEFAULT or UI configuration directive found!
boot: QEMU: Terminated

Syslinux does work with larger than 1GB images. I suspect you are suffering from either a buggy BIOS (very common) or from a failed image creation due to lack of free space, although I would have expected an error during image creation for the latter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19342</commentid>
    <comment_count>12</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-22 15:32:44 +0000</bug_when>
    <thetext>Another couple thoughts. If you mount the image, does syslinux.cfg exist? What are its contents? If this is missing, it accounts for the:

    No DEFAULT or UI configuration directive found!

As for the kernel panic:

    Kernel panic - not syncing: Attempted to kill init!

You booted it without a default append line (since there was no config found) and did not specify a rootfs, so this is what I would expect the kernel to do.

    boot: vmlinuz initrd=initrd

Try adding a root=... parameter (whatever is appropriate for your image).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19343</commentid>
    <comment_count>13</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-22 17:26:11 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; $ qemu -nographic -hda boot.img 
&gt; Could not initialize KVM, will disable KVM support
&gt; 
&gt; SYSLINUX 4.02 2010-07-21  Copyright (C) 1994-2010 H. Peter Anvin et al
&gt; No DEFAULT or UI configuration directive found!
&gt; boot: QEMU: Terminated

As per the above line, I find that you too get the &quot;No DEFAULT or UI configuration directive found!&quot; error message in the syslinux boot prompt.

&gt; Syslinux does work with larger than 1GB images. I suspect you are suffering
&gt; from either a buggy BIOS (very common) or from a failed image creation due to
&gt; lack of free space, although I would have expected an error during image
&gt; creation for the latter.

As per the bootimg.bbclass file, the hddimage size is calculated as
BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`

Here the BOOTIMG_EXTRA_SPACE is 512. So, the SIZE will always be the size of the entire HDDDIR folder + 512

If I reduce the zero.img file size so that the entire hddimg size is less than 1GB then I have no problem in booting that image.

IMHO, I think there is a 1GB limitation with syslinux.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19344</commentid>
    <comment_count>14</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-22 17:32:09 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; Another couple thoughts. If you mount the image, does syslinux.cfg exist? What
&gt; are its contents? If this is missing, it accounts for the:
&gt; 
&gt;     No DEFAULT or UI configuration directive found!
&gt; 

Yes. the syslinux.cfg file exists. It has the default contents
# Automatically created by OE
ALLOWOPTIONS 1
DEFAULT boot
TIMEOUT 50
PROMPT 1
LABEL boot
KERNEL vmlinuz
APPEND initrd=initrd LABEL=boot  usbcore.autosuspend=1 root=/dev/ram0 
LABEL install
KERNEL vmlinuz
APPEND initrd=initrd LABEL=install  usbcore.autosuspend=1 root=/dev/ram0

&gt; As for the kernel panic:
&gt; 
&gt;     Kernel panic - not syncing: Attempted to kill init!
&gt; 
&gt; You booted it without a default append line (since there was no config found)
&gt; and did not specify a rootfs, so this is what I would expect the kernel to do.
&gt; 
&gt;     boot: vmlinuz initrd=initrd
&gt; 
&gt; Try adding a root=... parameter (whatever is appropriate for your image).

I can&apos;t try this right now as I am away from the eKino board. Moreover its 23:00 hrs localtime (GMT+5:30) now. Will try this tomorrow and let you know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19349</commentid>
    <comment_count>15</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-22 17:47:18 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #11)
&gt; &gt; $ qemu -nographic -hda boot.img 
&gt; &gt; Could not initialize KVM, will disable KVM support
&gt; &gt; 
&gt; &gt; SYSLINUX 4.02 2010-07-21  Copyright (C) 1994-2010 H. Peter Anvin et al
&gt; &gt; No DEFAULT or UI configuration directive found!
&gt; &gt; boot: QEMU: Terminated
&gt; 
&gt; As per the above line, I find that you too get the &quot;No DEFAULT or UI
&gt; configuration directive found!&quot; error message in the syslinux boot prompt.
&gt; 

In my case it is expected as I didn&apos;t provide a DEFAULT directive in the syslinux.cfg.

&gt; &gt; Syslinux does work with larger than 1GB images. I suspect you are suffering
&gt; &gt; from either a buggy BIOS (very common) or from a failed image creation due to
&gt; &gt; lack of free space, although I would have expected an error during image
&gt; &gt; creation for the latter.
&gt; 
&gt; As per the bootimg.bbclass file, the hddimage size is calculated as
&gt; BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
&gt; SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`
&gt; 
&gt; Here the BOOTIMG_EXTRA_SPACE is 512. So, the SIZE will always be the size of
&gt; the entire HDDDIR folder + 512

But it wasn&apos;t quite, per your df listing, perhaps due to some additional filesystem overhead we&apos;re not accounting for.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19353</commentid>
    <comment_count>16</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-22 18:36:53 +0000</bug_when>
    <thetext>I thought there might be something about the order files are placed on the filesystem, so I did a little experiment:

dvhart@envy:~/projects/bug2138
$ ls -lah boot.img 
-rw-rw-r--. 1 dvhart dvhart 2.1G Mar 22 11:14 boot.img

dvhart@envy:~/projects/bug2138
$ ls -lah mnt/
total 1.1G
drwxr-xr-x. 2 root   root   4.0K Mar 22 11:13 .
drwxrwxr-x. 4 dvhart dvhart 4.0K Mar 22 11:05 ..
-rwxr-xr-x. 1 root   root   1.0G Mar 22 11:06 bigfile
-rwxr-xr-x. 1 root   root   5.4M Mar 22 11:13 initrd
-r-xr-xr-x. 1 root   root    32K Mar 22 09:05 ldlinux.sys
-rwxr-xr-x. 1 root   root    16M Mar 22 11:13 rootfs.img
-rwxr-xr-x. 1 root   root    286 Mar 22 11:02 syslinux.cfg
-rwxr-xr-x. 1 root   root   4.1M Mar 22 11:13 vmlinuz

dvhart@envy:~/projects/bug2138
$ df -h mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/loop0            2.1G  1.1G  1.1G  51% /home/dvhart/projects/bug2138/mnt

dvhart@envy:~/projects/bug2138
$ qemu -hda boot.img -nographic
Could not initialize KVM, will disable KVM support

SYSLINUX 4.02 2010-07-21  Copyright (C) 1994-2010 H. Peter Anvin et al
boot:  

# Using your syslinux.cfg with an additional &quot;serial 0&quot; added.

# Boot with:
boot: boot console=ttyS0

Boots all the way to:
...
Freeing unused kernel memory: 508k freed
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2
udev[38]: starting version 164
Refined TSC clocksource calibration: 2659.999 MHz.
Switching to clocksource tsc
Waiting for removable media...

(It won&apos;t get past here as I passed the image as hda, not a usb stick, so the udev trigger what fire).

I then tested this on an Intel Atom E6xx development system and it booted all the way to the login prompt. This uses the crownbay BSP vmlinuz, rootfs.img, and initrd files from a core-image-minimal build.

This is pretty conclusive evidence that syslinux.cfg does support &gt; 1GB images. Whatever problem you are encountering appears to be either a configuration issue or a firmware bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19382</commentid>
    <comment_count>17</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-23 07:17:48 +0000</bug_when>
    <thetext>Darren,

Thanks for your patience.

As per your suggestion, I added some extra space for the hddimg in the bootimg.bbclass

SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE} + 983040`

The size of core-image-minimal is now 2106318848 bytes and the df reports the following when it is loop mounted

Filesystem       1K-blocks      Used Available Use% Mounted on
/dev/loop0         2056672   1073504    983168  53% /tmp/img

I dd&apos;ed this hddimg on to the USB stick and tried booting on the eKino board. Still I get the &quot;No DEFAULT or UI configuration directive found!&quot;  error message. 

I even tried giving the root option as you suggested

&gt; SYSLINUX 4.03 ...
&gt; No DEFAULT or UI configuration directive found!
&gt; boot: vmlinuz initrd=initrd root=/dev/ram0

I still get the kernel panic

&gt; Kernel panic - not syncing: Attempted to kill init!

I then tried booting the image in the qemu (to check whether it is a BIOS problem)

$ qemu -hda core-image-minimal-ekino.hddimg

I get the following error

&gt; Booting from Hard Disk...
&gt; Boot error

So, how to debug this error further?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19383</commentid>
    <comment_count>18</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-23 07:35:06 +0000</bug_when>
    <thetext>One more update on this.

In the syslinux boot prompt I included the LABEL option too like this

&gt; SYSLINUX 4.03 ...
&gt; No DEFAULT or UI configuration directive found!
&gt; boot: vmlinuz initrd=initrd root=/dev/ram0 LABEL=boot

This booted all the way to the root prompt. There was no kernel panic error.

But, we can&apos;t expect an user to type in all these values at boot prompt every time he/she wants to boot the image. This defeats the embedded application purpose.

How to fix this problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19407</commentid>
    <comment_count>19</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-23 13:31:21 +0000</bug_when>
    <thetext>Darren,

One more update:

I followed your steps for creating a boot.img file

$ mkdosfs -n boot -S 512 -C boot.img $(expr 1099686912 / 512)
$ syslinux boot.img

Then I loop mounted this boot.img and also loop mounted the core-image-minimal.hddimg and copied the files from core-image-minimal into the boot.img mounted location. Now boot.img contains the following files:

total 1073404
-rwxr-xr-x 1 root root    7207777 Mar 23 17:57 initrd
-r-xr-xr-x 1 root root      32256 Mar 23  2012 ldlinux.sys
-rwxr-xr-x 1 root root   13508608 Mar 23 17:57 rootfs.img
-rwxr-xr-x 1 root root        278 Mar 23 17:57 syslinux.cfg
-rwxr-xr-x 1 root root    4666560 Mar 23 17:57 vmlinuz
-rwxr-xr-x 1 root root 1073741824 Mar 23 17:58 zero.img

I dd&apos;ed this boot.img on to the USB stick and tried booting this on my eKino board. To my surprise there were no errors. I was able to get the login prompt.

This concludes that

1. There is no issue with the free space in the created image
2. There is no issue with the BIOS

But, still that core-image-minimal hddimg is not bootable via USB stick.

I&apos;ll debug more on this and keep you posted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19408</commentid>
    <comment_count>20</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-23 14:33:30 +0000</bug_when>
    <thetext>Joshua, aha, great, now we&apos;re getting somewhere. So the differences between the failing image and the good image are:

o different version of mkdosfs (host vs. build env)
  There are some known issues with large images (over 4GB) with the 2.* version
  we have in poky for licensing reasons. Perhaps there are other limitations.
o different version of syslinux (host vs. build env)
o different order of writing files to the image (so they appear in the FAT 
  differently)

Which version of poky are you building from?

My guess is mkdosfs is to blame.

Saul, I know you were looking at bringing in a newer version of mkdosfs for testing, how is that coming? I think a good next step for Joshua would be try using that.

Also, is there a way to force it to use the host dosfstools? Maybe clean them and drop the dosfstools dependency from the image he&apos;s building?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19418</commentid>
    <comment_count>21</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-23 15:24:03 +0000</bug_when>
    <thetext>(In reply to comment #20)
&gt; Joshua, aha, great, now we&apos;re getting somewhere. So the differences between the
&gt; failing image and the good image are:
&gt; 
&gt; o different version of mkdosfs (host vs. build env)
&gt;   There are some known issues with large images (over 4GB) with the 2.* version
&gt;   we have in poky for licensing reasons. Perhaps there are other limitations.
&gt; o different version of syslinux (host vs. build env)
&gt; o different order of writing files to the image (so they appear in the FAT 
&gt;   differently)
&gt; 
&gt; Which version of poky are you building from?

I am using poky edison branch.

My host mkdosfs version is 3.0.12 and my build version is 2.10
My host syslinux version is 4.05 and my build version is 4.03

I did one more change to the bootimg.bbclass like this

	mkdosfs -n ${BOOTIMG_VOLUME_ID} -S 512 \
	-C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE 

	syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
	chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg

        mcopy -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg -s ${HDDDIR}/* ::/

Instead of specifying the -d ${HDDDIR} to mkdosfs I created an empty image and then tried to mcopy the files from the ${HDDDIR} on to the image. But the mcopy operation *never* completes. It takes infinite time. So the bitbake task do_bootimg never completes. I don&apos;t know whats the reason behind it.

The build mkdosfs tool is patched in order to accept -d option to convert the contents of an directory into an image. Obviously the host mkdosfs lacks this.
So, even if we use the host mkdosfs to generate the image it will not accept the directory (-d) option. Then we should be adding the files into the hddimg only by using mcopy.

But I can&apos;t figure out why this mcopy is taking infinite time. May be some silly issue :(

Help needed in debugging.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19421</commentid>
    <comment_count>22</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-23 15:58:13 +0000</bug_when>
    <thetext>The -d option to mkdosfs had a lot of issues and was quite poorly implemented. I have removed the -d patch from dosfstools and rewritten the bootimg code to use mcopy similarly to what you have done. However, there were a number of tweaks necessary to properly account for filesystem usage as well as ensure a format that mcopy didn&apos;t complain about (integral number of sectors per track iirc).

It would be worth testing your build against the current poky master branch (we are nearing a release for 1.2, so things should be in pretty good shape). Is that something you can try?

Failing that, we can try to backport the bootimg changes to edison, but I think that will be more work and it would be nice to verify things work on master before going through that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19428</commentid>
    <comment_count>23</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-23 16:47:41 +0000</bug_when>
    <thetext>(In reply to comment #22)
&gt; The -d option to mkdosfs had a lot of issues and was quite poorly implemented.
&gt; I have removed the -d patch from dosfstools and rewritten the bootimg code to
&gt; use mcopy similarly to what you have done. However, there were a number of
&gt; tweaks necessary to properly account for filesystem usage as well as ensure a
&gt; format that mcopy didn&apos;t complain about (integral number of sectors per track
&gt; iirc).
&gt; 
&gt; It would be worth testing your build against the current poky master branch (we
&gt; are nearing a release for 1.2, so things should be in pretty good shape). Is
&gt; that something you can try?

Sure. Will try this tomorrow (as it is already 22:17 hrs localtime and moreover I don&apos;t have the eKino board at home) and let you know. 

&gt; Failing that, we can try to backport the bootimg changes to edison, but I think
&gt; that will be more work and it would be nice to verify things work on master
&gt; before going through that.

But, as the poky edison branch is supposed to be a stable branch I guess we should backport them here too if the issue is sorted out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19431</commentid>
    <comment_count>24</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-03-23 16:57:44 +0000</bug_when>
    <thetext>Yes, a backport may be necessary, but I&apos;d like to first confirm that it works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19449</commentid>
    <comment_count>25</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-24 12:18:49 +0000</bug_when>
    <thetext>Darren,

I did the following in the poky master

1. Added a line in bootimg.bbclass in build_hddimg function as follows (after populate ${HDDDIR})

     dd if=/dev/zero of=${HDDDIR}/zero.img count=3145728

2. Built a core-image-minimal

     $ bitbake core-image-minimal

   The generated core-image-minimal size was 1655554048 bytes. Loop mounting this and running ls -l gave this output

     total 1591456
     -rwxr-xr-x 1 root root    5682881 Mar 24  2012 initrd
     -r-xr-xr-x 1 root root      32768 Mar 24  2012 ldlinux.sys
     -rwxr-xr-x 1 root root    8439808 Mar 24  2012 rootfs.img
     -rwxr-xr-x 1 root root        284 Mar 24  2012 syslinux.cfg
     -rwxr-xr-x 1 root root    4785632 Mar 24  2012 vmlinuz
     -rwxr-xr-x 1 root root 1610612736 Mar 24  2012 zero.img

3. I dd&apos;ed this image on to the USB stick

     $ dd if=core-image-minimal-atom-pc.hddimg of=/dev/sdb
     $ sync

4. Tried booting this stick in Intel Atom N270 eKINO board. 

Voila! Everything worked perfectly. There were no errors and I was able to get the login prompt.

Earlier, when I tried booting the hddimg (generated from edison branch) in qemu I always used to get the &quot;Boot error&quot;. But this image (generated from master branch) boots all the way to login prompt in qemu (via -hda option).

I guess we have to backport this to edison branch.

Darren, thanks for all the help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19472</commentid>
    <comment_count>26</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-03-26 07:37:07 +0000</bug_when>
    <thetext>In order to be sure that the problem exists with poky edison&apos;s mkdosfs I did the following

$ tmp/sysroots/i686-linux/usr/sbin/mkdosfs -n boot -S 512 -C boot.img $(expr 1099686912 / 512)

This gave out the following error.

&gt; mkdosfs 2.10 (22 Sep 2003)
&gt; mkdosfs: seek failed

I guess we have to use the newer version of mkdosfs. If 1.2 is released, will that be a new poky edison?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19960</commentid>
    <comment_count>27</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-05 17:58:39 +0000</bug_when>
    <thetext>Poky Edison will see at least one more point release, 1.1.2. We need to backport this fix to that. That&apos;s on me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19971</commentid>
    <comment_count>28</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-05 21:36:20 +0000</bug_when>
    <thetext>Patches available on yocto list. Joshua I. would you consider testing?

https://lists.yoctoproject.org/pipermail/yocto/2012-April/008077.html

You can pull them from here:

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/edison/bug/2138</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20049</commentid>
    <comment_count>29</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-09 07:11:11 +0000</bug_when>
    <thetext>To test the new bootimg.bbclass I added the following line in the build_boot_bin function after the install command of ldlinux.sys on to the ${HDDDIR}

&gt; dd if=/dev/zero of=${HDDDIR}/zero.img count=3145728

Now my hddimg size of core-image-minimal is 1662124032 bytes. The contents of this loop mounted image is as follows

total 1597760
-rwxr-xr-x 1 root root    7208314 Apr  9  2012 initrd
-r-xr-xr-x 1 root root      32768 Apr  9  2012 ldlinux.sys
-rwxr-xr-x 1 root root   13508608 Apr  9  2012 rootfs.img
-rwxr-xr-x 1 root root        278 Apr  9  2012 syslinux.cfg
-rwxr-xr-x 1 root root    4666560 Apr  9  2012 vmlinuz
-rwxr-xr-x 1 root root 1610612736 Apr  9  2012 zero.img

I tried booting this image via qemu

$ qemu -hda tmp/deploy/images/core-image-minimal-ekino.hddimg

It gave the following output.

&gt; Booting from Hard Disk...
&gt; Boot error

Then I dd&apos;ed this image on to the USB stick and tried booting this on my eKINO board. This booted all the way to the login prompt. There were no errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20068</commentid>
    <comment_count>30</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-09 16:11:46 +0000</bug_when>
    <thetext>Joshua, which MACHINE are you building for? If you build for qemux86 with the same dd line added to bootimg.bbclass, do you still see the boot failure for qemu?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20120</commentid>
    <comment_count>31</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-10 11:14:45 +0000</bug_when>
    <thetext>Darren,

I was building the image for Intel Atom N270 eKINO SBC. Its config is similar to atom-pc.conf. The hddimg that I built from poky master branch for the MACHINE &apos;atom-pc&apos; was booting in qemu without any issues. 

Moreover, qemux86.conf file doesn&apos;t declare the IMAGE_FSTYPES variable to include &apos;live&apos; image for generation. For some weird reason, adding this variable to qemux86.conf doesn&apos;t generate &apos;live&apos; image (hddimg). So, I am not able to check the hddimg for qemux86 MACHINE :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20121</commentid>
    <comment_count>32</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-10 11:23:15 +0000</bug_when>
    <thetext>(In reply to comment #31)
&gt; Moreover, qemux86.conf file doesn&apos;t declare the IMAGE_FSTYPES variable to
&gt; include &apos;live&apos; image for generation. For some weird reason, adding this
&gt; variable to qemux86.conf doesn&apos;t generate &apos;live&apos; image (hddimg). So, I am not
&gt; able to check the hddimg for qemux86 MACHINE :(

Sorry, IMAGE_FSTYPES is declared in &apos;conf/machine/include/qemu.inc&apos; file. I&apos;ll test and update you on this shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20122</commentid>
    <comment_count>33</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-10 11:55:46 +0000</bug_when>
    <thetext>Darren,

I still get the same error when I try to boot the core-image-minimal hddimg for the MACHINE qemux86

$ qemu -hda tmp/deploy/images/core-image-minimal-qemux86.hddimg

&gt; Booting from Hard Disk...
&gt; Boot error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20165</commentid>
    <comment_count>34</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-11 05:14:27 +0000</bug_when>
    <thetext>The problem appears to be with mkdosfs. If I use my system mkdosfs (3.0.9), the image is bootable. If I use the one from sysroots (2.10), it is not (in qemu).

The master has dosfstools 2.11, with the following relevant commits since edison:

995a09e dosfstools: Add patch to disable fat32 autoselection and behave as 2.10
0c45ecb dosfstools: update native to 2.11
6979190 dosfstools: add Upstream-Status to patches
9c92435 dosfstools: Add SRC_URI Checksum

Others follow but they fix things like the -d option, which we&apos;ve stopped using, so we don&apos;t need to pull that back into an edison point release in my opinion.

With these 4 patches cherry-picked, the edison generated image boots in qemu.

Joshua I, could you kindly test using my latest branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=dvhart/edison/bug/2138

Joshua L, I shall send another pull request for this branch once Joshua I confirms it works for him.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20175</commentid>
    <comment_count>35</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-11 12:31:17 +0000</bug_when>
    <thetext>Darren,

I generated the core-image-minimal image for atom-pc MACHINE from your latest branch HEAD (with the &apos;dd&apos; line included in bootimg.bbclass). This image boots all the way to the login prompt in the eKINO board. And in the qemu, it boots till this location and stays there forever.

&gt; VFS: Disk quotas dquot_6.5.2
&gt; Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
&gt; msgmni has been set to 233
&gt; Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
&gt; io scheduler noop registered
&gt; io scheduler deadline registered
&gt; io scheduler cfq registered (default)
&gt; input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
&gt; ACPI: Power Button [PWRF]
&gt; Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
&gt; serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

But, the core-image-minimal-atom-pc image generated from poky master boots all the way to the login prompt in qemu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20183</commentid>
    <comment_count>36</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-11 14:43:04 +0000</bug_when>
    <thetext>So the syslinux issue is taken care of. We should be able to address the boot issue independently. Note that it works for me. This looks like it might just be kernel parameter related. Try adding &quot;console=tty0&quot; to the syslinux boot prompt, eg:

boot: boot console=tty0

Also, check that you are not changing the APPPEND variable from the default.

Just to confirm. Are you booting with the qemu graphical console? The atom-pc build doesn&apos;t put a getty on a serial port.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20198</commentid>
    <comment_count>37</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-11 17:39:33 +0000</bug_when>
    <thetext>Darren,

(In reply to comment #36)
&gt; So the syslinux issue is taken care of. 

Yes.

&gt; We should be able to address the boot
&gt; issue independently. Note that it works for me. This looks like it might just
&gt; be kernel parameter related. Try adding &quot;console=tty0&quot; to the syslinux boot
&gt; prompt, eg:
&gt; 
&gt; boot: boot console=tty0
&gt; 

I tried adding the console parameter as you mentioned above. The booting gets stuck at the same place as before. Then I tried adding the console as ttyS0, for this I get the following output.

&gt; Booting from Hard Disk...

&gt; SYSLINUX 4.03 ...
&gt; boot: boot console=ttyS0
&gt; Loading vmlinuz.......
&gt; Loading initrd.........ready

&gt; Decompressing Linux... Parsing ELF... done.
&gt; Booting the kernel.

It doesn&apos;t go beyond this.

&gt; Also, check that you are not changing the APPPEND variable from the default.
&gt;

I didn&apos;t change the APPEND variable.
 
&gt; Just to confirm. Are you booting with the qemu graphical console? The atom-pc
&gt; build doesn&apos;t put a getty on a serial port.

Yes I am using the graphical console. qemu -nographic option doesn&apos;t work for me.

In order to check whether this was due to the init-live.sh (from initrdscripts recipe) I even tried porting that script from master branch. Still I couldn&apos;t get it booted till the login prompt. 

I invoke qemu like this

$ qemu -hda tmp/deploy/images/core-image-minimal-atom-pc.hddimg

I&apos;ll debug this further and let you know tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20319</commentid>
    <comment_count>38</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-13 14:49:40 +0000</bug_when>
    <thetext>Josh, added you to CC as this is an edison bug with patches ready for merge.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20387</commentid>
    <comment_count>39</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-04-14 22:13:18 +0000</bug_when>
    <thetext>Patches merged into edison: http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=edison&amp;id=4274ebdd009163bd199f6cb08df373fdfeb67178</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20422</commentid>
    <comment_count>40</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-16 05:35:39 +0000</bug_when>
    <thetext>Darren,

(In reply to comment #36)
&gt; So the syslinux issue is taken care of. We should be able to address the boot
&gt; issue independently. Note that it works for me. This looks like it might just
&gt; be kernel parameter related. 

In the comment #16 you have mentioned the following,

&gt; Waiting for removable media...

&gt; (It won&apos;t get past here as I passed the image as hda, not a usb stick, so the
&gt; udev trigger what fire).

As per this comment, in qemu we won&apos;t get till the login prompt. Were you able to boot the core-image-minimal image till the login prompt (in qemu) using the hdd image generated from the latest?

As I said earlier, the hddimg generated from master branch boots till the login prompt in qemu via -hda option. But the hddimg from edison branch stays at this point while booting in qemu

&gt; VFS: Disk quotas dquot_6.5.2
&gt; Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
&gt; msgmni has been set to 233
&gt; Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
&gt; io scheduler noop registered
&gt; io scheduler deadline registered
&gt; io scheduler cfq registered (default)
&gt; input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
&gt; ACPI: Power Button [PWRF]
&gt; Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
&gt; serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20656</commentid>
    <comment_count>41</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-18 16:09:09 +0000</bug_when>
    <thetext>Sorry, not ignoring this, just swamped with some other things at the moment. It is on my list...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20657</commentid>
    <comment_count>42</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-18 16:11:04 +0000</bug_when>
    <thetext>But to answer your question, No, I did not get the live image from the latest of the edison branch to boot to the login prompt.

Your testing of images built from master successfully boots live image to a login prompt in qemu?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20702</commentid>
    <comment_count>43</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-04-19 06:17:07 +0000</bug_when>
    <thetext>(In reply to comment #42)
&gt; But to answer your question, No, I did not get the live image from the latest
&gt; of the edison branch to boot to the login prompt.
&gt; 
&gt; Your testing of images built from master successfully boots live image to a
&gt; login prompt in qemu?

Yes. The core-image-minimal from master branch boots till the login prompt in qemu but not the one from the edison branch. When you have time please let me know the outcome so that I could debug further. 

Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21884</commentid>
    <comment_count>44</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-06-06 10:46:27 +0000</bug_when>
    <thetext>This bug still seems to exist under certain conditions. I&apos;ll post the detailed report of it and re-open the bug once I get back home (probably next week).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23118</commentid>
    <comment_count>45</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-07-16 12:46:24 +0000</bug_when>
    <thetext>Darren,

Sorry for the late response.

As I mentioned in my previous comment that the live image fails to boot under certain conditions. Here is the scenario

In poky edison, in bootimg.bbclass under build_boot_bin function before calculation of SECTORS I added the following line

&gt; dd if=/dev/zero of=${HDDDIR}/zero.img count=3145728

then I dd&apos;ed the core-image-minimal image on to the usb stick. This image booted all the way till login prompt. So, considering this case, this bug was closed. But, when I changed the &apos;zero.img&apos; filename to &apos;abc.img&apos; (in bootimg.bbclass) like this:

&gt; dd if=/dev/zero of=${HDDDIR}/abc.img count=3145728

The core-image-minimal image dd&apos;ed on to the usb stick fails to boot. It gives out the following error (syslinux boot prompt doesn&apos;t show up) 

&gt; Boot error

The size of core-image-minimal generated was 1662124032 bytes

But, both the images were bootable via qemu till login prompt

&gt; $ kvm -hda core-image-minimal-ekino.hddimg

In order to debug further, I added the following lines in image_types.bbclass to make the rootfs.img size bigger. In &apos;runimagecmd&apos; function before calculation of ROOTFS_SIZE these lines were added

if [ &quot;${IMAGE_BASENAME}&quot; == &quot;core-image-minimal&quot; ] &amp;&amp; [ &quot;${type}&quot; == &quot;ext3&quot; ]
then
   mkdir -p ${IMAGE_ROOTFS}/opt
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/zero.img count=3145728
fi

This gave out the following error while building

&gt; | Size before prelinking 9972.
&gt; | Size after prelinking 10148.
&gt; | 3145728+0 records in
&gt; | 3145728+0 records out
&gt; | 1610612736 bytes (1.6 GB) copied, 21.5073 s, 74.9 MB/s
&gt; | genext2fs: not enough mem to read file &apos;zero.img&apos;
&gt; | ERROR: Function &apos;do_rootfs&apos; failed

So, split the &apos;zero.img&apos; into 10 separate files like this:

if [ &quot;${IMAGE_BASENAME}&quot; == &quot;core-image-minimal&quot; ] &amp;&amp; [ &quot;${type}&quot; == &quot;ext3&quot; ]
then
   mkdir -p ${IMAGE_ROOTFS}/opt
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/1.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/2.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/3.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/4.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/5.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/6.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/7.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/8.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/9.img count=314572
   dd if=/dev/zero of=${IMAGE_ROOTFS}/opt/10.img count=314572
fi 

This gave out the following error while building

| mkdosfs: seek failed
| mkdosfs 2.11 (12 Mar 2005)
| ERROR: Function &apos;build_boot_bin&apos; failed 

I am re-opening this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23137</commentid>
    <comment_count>46</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-07-17 00:34:33 +0000</bug_when>
    <thetext>I can&apos;t tell what you are reporting as the failure. Is it that it doesn&apos;t boot on the hardware? Is it that you see a failure while building? Is it the same bug that this bug was opened for initially? If not, please open a new bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23151</commentid>
    <comment_count>47</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-07-17 05:30:24 +0000</bug_when>
    <thetext>(In reply to comment #46)
&gt; I can&apos;t tell what you are reporting as the failure. Is it that it doesn&apos;t
&gt; boot on the hardware? 

Yes. It doesn&apos;t boot on the hardware when the name of the zero.img file changed to abc.img.

&gt; Is it that you see a failure while building? 

The whole purpose of adding the zero.img is to make the size of the final image go beyond 1GiB in a simpler way (rather than adding more packages on to the image). First, I added them in the hddimg (dos filesystem) by adding the &apos;dd&apos; line in the bootimg.bbclass. Then I tried to increase the size of rootfs image to check that whether the same thing (boot failure) occurs. In order to increase the rootfs image size I tried adding the zero image in image_types.bbclass, thats when I encountered the build failure. (So, I reported them too)

&gt; Is it the same bug that this bug was opened for initially? If not, please open
&gt; new bug.

Yes. It is the same bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25247</commentid>
    <comment_count>48</comment_count>
    <who name="Przemek Czesnowicz">przemyslawx.czesnowicz</who>
    <bug_when>2012-09-14 11:10:47 +0000</bug_when>
    <thetext>This bug is still present in 1.3 beta. For example booting this image :

http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-1.3-beta/machines/atom-pc/core-image-lsb-sdk-atom-pc-20120905071457.hddimg

fails with

&quot;No DEFAULT or UI configuration directive found!&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25249</commentid>
    <comment_count>49</comment_count>
    <who name="Joshua Immanuel">josh</who>
    <bug_when>2012-09-14 12:17:46 +0000</bug_when>
    <thetext>(In reply to comment #48)
&gt; This bug is still present in 1.3 beta. For example booting this image :
&gt; 
&gt; http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-1.3-beta/
&gt; machines/atom-pc/core-image-lsb-sdk-atom-pc-20120905071457.hddimg
&gt; 
&gt; fails with
&gt; 
&gt; &quot;No DEFAULT or UI configuration directive found!&quot;

I reported this bug for edison branch. But, it exists even in denzil branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25385</commentid>
    <comment_count>50</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-09-19 03:11:24 +0000</bug_when>
    <thetext>(In reply to comment #48)
&gt; This bug is still present in 1.3 beta. For example booting this image :
&gt; 
&gt; http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-1.3-beta/
&gt; machines/atom-pc/core-image-lsb-sdk-atom-pc-20120905071457.hddimg
&gt; 
&gt; fails with
&gt; 
&gt; &quot;No DEFAULT or UI configuration directive found!&quot;

What hardware did you attempt to build this on?

I have yet to observer a failure that I can directly attribute to image size, so I&apos;d like some clarity on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25386</commentid>
    <comment_count>51</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-09-19 03:12:06 +0000</bug_when>
    <thetext>
&gt; What hardware did you attempt to build this on?

s/build/boot/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25394</commentid>
    <comment_count>52</comment_count>
    <who name="Przemek Czesnowicz">przemyslawx.czesnowicz</who>
    <bug_when>2012-09-19 09:46:11 +0000</bug_when>
    <thetext>I&apos;ve tried to boot it on at least 4 hardware platforms a Mooncreek board, Valleyfalls board, SNB laptop, piketon board. It always fails in the same way. 
Every hddimg that is bigger than 1GB fails for me in the same way, smaller images are fine. 
Were You able to boot the image from the link?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26986</commentid>
    <comment_count>53</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2012-10-27 04:11:09 +0000</bug_when>
    <thetext>I am seeing a similar issue on FRI2 with builds from the danny branch.

Smaller images work properly (i.e. core-image-minimal, core-image-rt, core-image-sato), larger images fail with &quot;No DEFAULT or UI configuration directive found&quot; (like core-image-rt-sdk, suspiciously 1.1GB in size)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26987</commentid>
    <comment_count>54</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-10-27 04:30:40 +0000</bug_when>
    <thetext>Next steps would be to try and duplicate the steps performed in bootimg.bbclass manually using the crrent versions of the tools installed on your host. The dosfstools we build are old and stale in order to avoid GPL V3 in later versions. It would be worth seeing if the current versions of the tools create images that work. Alternatively, you could just replace the dosfstools in the host sysroot with the ones from your host filesystem (I think that should work) and re-run the last step of creating the large images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26989</commentid>
    <comment_count>55</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2012-10-27 14:19:54 +0000</bug_when>
    <thetext>&gt; Alternatively, you could just replace the dosfstools in the host sysroot
&gt; with the ones from your host filesystem

I did this experiment.

The image build completed without error, and the image is the same size as that made with the original sysroot tools.

The boot fails in a different manner now:

Boot error

Rather than:

No DEFAULT or UI configuration directive found</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28205</commentid>
    <comment_count>56</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-12-12 20:52:58 +0000</bug_when>
    <thetext>$ file core-image-lsb-sdk-atom-pc-20121010233936.hddimg
core-image-lsb-sdk-atom-pc-20121010233936.hddimg: x86 boot sector, code offset 0x58, OEM-ID &quot;SYSLINUX&quot;, sectors/cluster 128, root entries 512, Media descriptor 0xf8, sectors/FAT 138, heads 64, sectors 4502496 (volumes &gt; 32 MB) , serial number 0x50761926, label: &quot;boot       &quot;, FAT (16 bit)

This indicates a FAT16 filessytem was created, despite the file being 2.2GB. FAT16 only supports sizes up to 2048MB. SYSLINUX is very strict on adhering to the FAT specification. This doesn&apos;t explain why it would fail over 1GB.

Making progress, I suspect some fixes to the calculations in bootimg.bbclass are in order.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28207</commentid>
    <comment_count>57</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-12-12 22:39:38 +0000</bug_when>
    <thetext>Patch submitted to oe-core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28356</commentid>
    <comment_count>58</comment_count>
    <who name="Przemek Czesnowicz">przemyslawx.czesnowicz</who>
    <bug_when>2012-12-18 14:59:09 +0000</bug_when>
    <thetext>(In reply to comment #57)
&gt; Patch submitted to oe-core.

I tested Your patch and booting still fails with hddimg grater than 1GB or 2GB.
The error message is different :
Boot error

Rather than:

No DEFAULT or UI configuration directive found

On what machine were You able to boot Your 2GB image?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28359</commentid>
    <comment_count>59</comment_count>
    <who name="Przemek Czesnowicz">przemyslawx.czesnowicz</who>
    <bug_when>2012-12-18 17:33:08 +0000</bug_when>
    <thetext>(In reply to comment #58)
&gt; (In reply to comment #57)
&gt; &gt; Patch submitted to oe-core.
&gt; 
&gt; I tested Your patch and booting still fails with hddimg grater than 1GB or
&gt; 2GB.
&gt; The error message is different :
&gt; Boot error
&gt; 
&gt; Rather than:
&gt; 
&gt; No DEFAULT or UI configuration directive found
&gt; 
&gt; On what machine were You able to boot Your 2GB image?

That was my error. The patch works fine. I can boot 2GB images.
Sorry.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28507</commentid>
    <comment_count>60</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-01-02 22:19:36 +0000</bug_when>
    <thetext>That&apos;s a relief!

Merged to master:
commit 722430a488f39bf583e4a557a254fb84fae4d0a7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29666</commentid>
    <comment_count>61</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-08 09:10:56 +0000</bug_when>
    <thetext>Verified in 1.4_M3:3ae1a4ba972cfc17ff3f2fda632da8ecc3414885

with:

core-image-lsb-sdk-jasperforest.hddimg   01-Feb-2013 04:55  2.3G</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>