<?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>13275</bug_id>
          
          <creation_ts>2019-04-09 16:17:29 +0000</creation_ts>
          <short_desc>Wic kickstart file parameter --use-label not generating fstab entry</short_desc>
          <delta_ts>2019-11-14 15:45:08 +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>Scripts and Tools</component>
          <version>2.6.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>CLOSED</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.6.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jacopo Dall&apos;Aglio">jacopo.dallaglio</reporter>
          <assigned_to name="Armin Kuster">akuster</assigned_to>
          <cc>diego.ml</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</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>83507</commentid>
    <comment_count>0</comment_count>
    <who name="Jacopo Dall&apos;Aglio">jacopo.dallaglio</who>
    <bug_when>2019-04-09 16:17:29 +0000</bug_when>
    <thetext>After creating an updated Yocto build environment:

    git clone git://git.yoctoproject.org/poky
    git checkout tags/yocto-2.6.1 -b test-wic-uselabel

    git branch -vv
        master            8217b47 [origin/master] gtk+: update for new catalog path
        * test-wic-uselabel 1cab405 build-appliance-image: Update to thud head revision

building core-image-minimal with standard conf file, adding IMAGE_FSTYPES += &quot; wic&quot; in core-image-minimal.bb,

    bitbake core-image-minimal

        Build Configuration:
        BB_VERSION           = &quot;1.40.0&quot;
        BUILD_SYS            = &quot;x86_64-linux&quot;
        NATIVELSBSTRING      = &quot;universal&quot;
        TARGET_SYS           = &quot;i586-poky-linux&quot;
        MACHINE              = &quot;qemux86&quot;
        DISTRO               = &quot;poky&quot;
        DISTRO_VERSION       = &quot;2.6.1&quot;
        TUNE_FEATURES        = &quot;m32 i586&quot;
        TARGET_FPU           = &quot;&quot;
        meta
        meta-poky
        meta-yocto-bsp       = &quot;test-wic-uselabel:1cab405d88149fd63322a867c6adb4a80ba68db3&quot;

and using the following wic kickstart files to build the image:

    ==&gt; common.wks.inc &lt;==
        # This file is included into 3 canned wks files from this directory
        part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
        part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024

    ==&gt; qemux86-directdisk.wks &lt;==
        # short-description: Create a qemu machine &apos;pcbios&apos; direct disk image
        # long-description: Creates a partitioned legacy BIOS disk image that the user
        # can directly use to boot a qemu machine.

        include common.wks.inc

        bootloader  --timeout=0  --append=&quot;vga=0 rw oprofile.timer=1 rootfstype=ext4 &quot;

the output of wic ls $BUILD_DIR/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:

    Num     Start        End          Size      Fstype
    1       1048576     25477119     24428544  fat16
    2      26214400     51097599     24883200  ext4


The resulting partition table is:

    # stock fstab - you probably want to override this with a machine specific one

    /dev/root            /                    auto       defaults              1  1
    proc                 /proc                proc       defaults              0  0
    devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
    tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
    tmpfs                /var/volatile        tmpfs      defaults              0  0

    # uncomment this if your device has a SD/MMC/Transflash slot
    #/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0


When adding a new partition in the kickstart file, partition parameter --use-label should tell the wic plugin to take the --label value and use it to decide which partition in the partition table is going to be mounted at the specified mountpoint.
So let&apos;s add an empty partition labelled &quot;test&quot; at mountpoint &quot;/test&quot; placing the following line into qemux86-directdisk.wks.

    part /test --size 100 --fstype=ext4 --label test --use-label --align 1024

Output of wic ls shows that the new partition has been created:

    Num     Start        End          Size      Fstype
    1       1048576     25477119     24428544  fat16
    2      26214400     51097599     24883200  ext4
    3      51380224    156237823    104857600  ext4

But /etc/fstab has not changed:

    # stock fstab - you probably want to override this with a machine specific one

    /dev/root            /                    auto       defaults              1  1
    proc                 /proc                proc       defaults              0  0
    devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
    tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
    tmpfs                /var/volatile        tmpfs      defaults              0  0

    # uncomment this if your device has a SD/MMC/Transflash slot
    #/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0
    
I wasn&apos;t able to find a workaround without manually updating the fstab file in the image recipe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85331</commentid>
    <comment_count>1</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-10-13 19:22:04 +0000</bug_when>
    <thetext>this appears to be 2.6.1 and we have had a few wic changes..

please try latest thud.

if it still fails, then Master needs to be check as I don&apos;t seen any &quot;new&quot; changes that may help with issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85531</commentid>
    <comment_count>2</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-11-14 15:44:55 +0000</bug_when>
    <thetext>I will mark this as addressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85532</commentid>
    <comment_count>3</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-11-14 15:45:08 +0000</bug_when>
    <thetext>closing</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>