# Missing mkfs.ext4 and mkfs.btrfs

**URL:** <https://forum.legato.io/t/missing-mkfs-ext4-and-mkfs-btrfs/3229>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [April 24, 2018, 1:25pm UTC](https://forum.legato.io/t/missing-mkfs-ext4-and-mkfs-btrfs/3229 "2018-04-24T13:25:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurt1](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@kurt1](https://forum.legato.io/u/kurt1)\
**Post date:** [April 24, 2018, 1:25pm UTC](https://forum.legato.io/t/missing-mkfs-ext4-and-mkfs-btrfs/3229/1 "2018-04-24T13:25:23Z")

</div>

Hi There

I am trying to get either mkfs.ext4 and / or mkfs.btrfs into my legato image.

I searched the net for which yocto package that are responsible for adding them. (Have tried btrfs-tools with no luck) But I did not have any success yet.  
Is there a package anyone can recommend?

BR  
Kurt

---

<div class="post-metadata">

**Author:** ![JordanZhao](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jordanzhao/32/789_2.png) [@JordanZhao](https://forum.legato.io/u/JordanZhao)\
**Post date:** [April 25, 2018, 1:43am UTC](https://forum.legato.io/t/missing-mkfs-ext4-and-mkfs-btrfs/3229/2 "2018-04-25T01:43:49Z")

</div>

Please go to Yocto source code and modifiy mdm9x15-image.inc:  
e.g. vim /home/jordan/yocto\_07.12.14.00/meta-swi/meta-swi-mdm9x15/recipes-core/images/mdm9x15-image.inc  
Add below line:  
**IMAGE\_INSTALL += “e2fsprogs-mke2fs”**

Re-compile Yocto project and you will get mkfs.ext4 command:

root@swi-mdm9x15:~# mkfs.ext4  
Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size]  
[-i bytes-per-inode] [-I inode-size] [-J journal-options]  
[-G flex-group-size] [-N number-of-inodes] [-d root-directory]  
[-m reserved-blocks-percentage] [-o creator-os]  
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]  
[-O feature[,…]] [-r fs-revision] [-E extended-option[,…]]  
[-t fs-type] [-T usage-type] [-U UUID] [-jnqvDFKSV] device [blocks-count]

---

<div class="post-metadata">

**Author:** ![kurt1](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@kurt1](https://forum.legato.io/u/kurt1)\
**Post date:** [April 25, 2018, 7:50pm UTC](https://forum.legato.io/t/missing-mkfs-ext4-and-mkfs-btrfs/3229/3 "2018-04-25T19:50:10Z")

</div>

Hi JordanZhao

Thank you very much. That did the trick 🙂  
Best regards

Kurt
