<?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>13560</bug_id>
          
          <creation_ts>2019-09-27 18:40:04 +0000</creation_ts>
          <short_desc>Partition numbering is broken for MBR primary partition #4</short_desc>
          <delta_ts>2019-10-17 15:15:09 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>2.7.2</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>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.8 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>michaelcooper81</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>akuster</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <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>85123</commentid>
    <comment_count>0</comment_count>
      <attachid>4572</attachid>
    <who name="">michaelcooper81</who>
    <bug_when>2019-09-27 18:40:04 +0000</bug_when>
    <thetext>Created attachment 4572
Proposed patch

When wks describes extra partitions that aren&apos;t in the partition table (e.g. boot loader) and describes four proper MBR partitions, the last partition gets added to fstab as partition #5 instead of #4.

Repro wks:

part bootloader --no-table
part /boot --ondisk mmcblk0 --label boot
part / --ondisk mmcblk0 --label root1
part / --ondisk mmcblk0 --label root2
part /data --ondisk mmcblk0 --label data
bootloader --ptable msdos

Generated fstab:
/dev/mmcblk0p1	/boot	ext4	defaults	0	0
/dev/mmcblk0p5	/data

(/dev/mmcblk0p5 should be /dev/mmcblk0p4)

Proposed patch attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85187</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-10-03 14:37:13 +0000</bug_when>
    <thetext>Is there a test that we can add to ensure that this doesn&apos;t happen in the future?

Are you able to send a patch to the email list?
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_using_git-send-email</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85365</commentid>
    <comment_count>2</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-10-17 14:52:27 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/scripts?id=7a1d68d136c9746242d2243c7e9959758437a3fa</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85368</commentid>
    <comment_count>3</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-10-17 14:53:30 +0000</bug_when>
    <thetext>made it into zeus</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85369</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-10-17 14:54:06 +0000</bug_when>
    <thetext>Fixed with the above commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85375</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-10-17 15:15:09 +0000</bug_when>
    <thetext>Mark as resolved</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4572</attachid>
            <date>2019-09-27 18:40:04 +0000</date>
            <delta_ts>2019-09-27 18:40:04 +0000</delta_ts>
            <desc>Proposed patch</desc>
            <filename>fix_mbr_primary_part_4_numbering.patch</filename>
            <type>application/octet-stream</type>
            <size>1034</size>
            <attacher>michaelcooper81</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL3NjcmlwdHMvbGliL3dpYy9wbHVnaW5zL2ltYWdlci9kaXJlY3QucHkgYi9z
Y3JpcHRzL2xpYi93aWMvcGx1Z2lucy9pbWFnZXIvZGlyZWN0LnB5CmluZGV4IDY3YWRkZWZmM2Uu
LjRhNTM0ZWEzNjcgMTAwNjQ0Ci0tLSBhL3NjcmlwdHMvbGliL3dpYy9wbHVnaW5zL2ltYWdlci9k
aXJlY3QucHkKKysrIGIvc2NyaXB0cy9saWIvd2ljL3BsdWdpbnMvaW1hZ2VyL2RpcmVjdC5weQpA
QCAtMzI2LDYgKzMyNiw3IEBAIGNsYXNzIFBhcnRpdGlvbmVkSW1hZ2UoKToKICAgICAgICAgc2Vs
Zi5zZWN0b3Jfc2l6ZSA9IFNFQ1RPUl9TSVpFCiAgICAgICAgIHNlbGYubmF0aXZlX3N5c3Jvb3Qg
PSBuYXRpdmVfc3lzcm9vdAogCisgICAgICAgIG51bV9yZWFsX3BhcnRpdGlvbnMgPSBsZW4oW3Ag
Zm9yIHAgaW4gc2VsZi5wYXJ0aXRpb25zIGlmIG5vdCBwLm5vX3RhYmxlXSkKICAgICAgICAgIyBj
YWxjdWxhdGUgdGhlIHJlYWwgcGFydGl0aW9uIG51bWJlciwgYWNjb3VudGluZyBmb3IgcGFydGl0
aW9ucyBub3QKICAgICAgICAgIyBpbiB0aGUgcGFydGl0aW9uIHRhYmxlIGFuZCBsb2dpY2FsIHBh
cnRpdGlvbnMKICAgICAgICAgcmVhbG51bSA9IDAKQEAgLTMzNCw3ICszMzUsNyBAQCBjbGFzcyBQ
YXJ0aXRpb25lZEltYWdlKCk6CiAgICAgICAgICAgICAgICAgcGFydC5yZWFsbnVtID0gMAogICAg
ICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICByZWFsbnVtICs9IDEKLSAgICAgICAgICAg
ICAgICBpZiBzZWxmLnB0YWJsZV9mb3JtYXQgPT0gJ21zZG9zJyBhbmQgcmVhbG51bSA+IDMgYW5k
IGxlbihwYXJ0aXRpb25zKSA+IDQ6CisgICAgICAgICAgICAgICAgaWYgc2VsZi5wdGFibGVfZm9y
bWF0ID09ICdtc2RvcycgYW5kIHJlYWxudW0gPiAzIGFuZCBudW1fcmVhbF9wYXJ0aXRpb25zID4g
NDoKICAgICAgICAgICAgICAgICAgICAgcGFydC5yZWFsbnVtID0gcmVhbG51bSArIDEKICAgICAg
ICAgICAgICAgICAgICAgY29udGludWUKICAgICAgICAgICAgICAgICBwYXJ0LnJlYWxudW0gPSBy
ZWFsbnVtCgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>