<?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>9691</bug_id>
          
          <creation_ts>2016-05-31 18:45:44 +0000</creation_ts>
          <short_desc>new dosfstools changes sectors-per-track, breaks image generation</short_desc>
          <delta_ts>2016-07-01 16:13:21 +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>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kukkonen">jku</reporter>
          <assigned_to name="Jussi Kukkonen">jku</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</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>62545</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-05-31 18:45:44 +0000</bug_when>
    <thetext>Our image generation scripts got to some lengths to ensure that the number of sectors on a filesystem is divisible by sectors-per-track because &quot;mcopy&quot; has a sanity check for that. sectors-per-track is (AFAIK) a made up number decided by
dosfstools and is not configurable.

This has become quite tricky with new dosfstools:
* dosfstools &lt; 4.0 uses 32 sectors-per-track as the default
* dosfstools 4.0 uses 63 sectors-per-track as the default
* dosfstools git master uses a variable sectors-per-track
  (32 for small fs, 63 for larger ones)

To make matters worse we have two versions of dosfstools (2.11 and the current one).

Options:
* Fix the image generation scripts to use correct sectors-per-track for 4.0 as in http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=jku/dosfstools . This won&apos;t work for the next version and won&apos;t work with 2.11...
* Make mcopy work even if the sanity check fails. I think this will work, but am not 100% sure -- will some other tool barf on the &apos;broken&apos; filesystem?
* Modify one of the dosfstools versions to do the same thing as the other</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62589</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-06-02 08:34:04 +0000</bug_when>
    <thetext>&gt; * Make mcopy work even if the sanity check fails

After reading a little more about it and talking to dosfstools maintainer, this is the solution I&apos;m going with. Sending patches shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63147</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-06-20 12:43:34 +0000</bug_when>
    <thetext>commit 469e56b1a7c8da38cb4c572c5609c86b8c9768dd
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Thu Jun 2 13:49:33 2016 +0300

    image-live, image-vm, wic: Remove fs size workaround
    
    Since mtools has been patched to live with filesystems with sizes
    not divisible by sectors-per-track, we no longer need to try to
    set the size based on our guess of the sectors-per-track dosfstools is
    going to use.
    
    (From OE-Core rev: 334e32af88b310ff1ed950d127a6dedeb460f8d0)
    
    Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

commit 48bc62378a3705730f376ca03c2d6efe7a98d924
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Thu Jun 2 13:49:32 2016 +0300

    mtools: Patch out a useless sanity check
    
    The sanity check is ensuring that filesystem size is divisible by
    sectors-per-track. That seems to be just an optimization for ancient
    media, and quite tricky to accomplish as different dosfstools versions
    produce filesystems with different sectors-per-track.
    
    Continue processing even if filesystem size is not divisible by
    sectors-per-track.
    
    (From OE-Core rev: 970cdbe26d9b6d0bd93325c8e734416e679010df)
    
    Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>