<div dir="ltr">Hi Robert,<div><br></div><div>I get the following errors doing filesystem check on the ext4 image:</div><div><br></div><div><div># fsck.ext4 -fn tmp/deploy/images/custom-image-custom.ext4.ext4</div><div>e2fsck 1.42.7 (21-Jan-2013)</div>
<div>Pass 1: Checking inodes, blocks, and sizes</div><div>Pass 2: Checking directory structure</div><div>Entry &#39;mtd7&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br>
</div><div>Entry &#39;mtd4&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;fb0&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;mtd5&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;tty&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;tty6&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;random&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;mtd1&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;urandom&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;zero&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;null&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;kmsg&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;kmem&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;mtd6&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;tty7&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;tty4&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;apm_bios&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;tty5&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;mtd0&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;tty0&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;ttySA0&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;mem&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;mtd2&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;tty8&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;console&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;ttyS0&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;tty2&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;mtd3&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Entry &#39;tty1&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div>
<div>Fix? no</div><div><br></div><div>Entry &#39;tty3&#39; in /dev (2739) has an incorrect filetype (was 4, should be 3).</div><div>Fix? no</div><div><br></div><div>Pass 3: Checking directory connectivity</div><div>Pass 4: Checking reference counts</div>
<div>Inode 774 ref count is 9, should be 10.  Fix? no</div><div><br></div><div>Pass 5: Checking group summary information</div><div><br></div><div>tmp/deploy/images/custom-image-custom.ext4.ext4: ********** WARNING: Filesystem still has errors **********</div>
<div><br></div><div>tmp/deploy/images/custom-image-custom.ext4.ext4: 3899/21336 files (0.5% non-contiguous), 131042/169656 blocks</div></div><div><br></div><div style><br></div><div style>After booting the image I get the following:</div>
<div style><div># dmesg | grep EXT4-fs</div><div>EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)</div><div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div>
<div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div><div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div>
<div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-machine: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div><div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-machine: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div>
<div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-journal: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div><div>EXT4-fs (sda2): re-mounted. Opts: (null)</div>
<div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-journal: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div><div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-journal: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div>
<div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-journal: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div><div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #883: comm systemd-journal: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div>
<div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #810: comm login: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div><div>EXT4-fs error (device sda2): ext4_ext_check_inode:467: inode #810: comm sshd: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)</div>
<div><br></div><div><br></div><div><div># systemctl --failed | cat</div><div>UNIT                     LOAD   ACTIVE SUB    DESCRIPTION</div><div>machineid.service        loaded failed failed Machine ID first boot configure</div>
<div>systemd-journald.service loaded failed failed Journal Service</div><div>systemd-journald.socket  loaded failed failed Journal Socket</div><div><br></div><div>LOAD   = Reflects whether the unit definition was properly loaded.</div>
<div>ACTIVE = The high-level unit activation state, i.e. generalization of SUB.</div><div>SUB    = The low-level unit activation state, values depend on unit type.</div><div><br></div><div>3 loaded units listed. Pass --all to see loaded but inactive units, too.</div>
<div>To show all installed unit files use &#39;systemctl list-unit-files&#39;.</div></div><div><br></div><div><br></div><div style>I am booting kernel with rootfstype=ext4. IMAGE_FSTYPES = &quot;ext4&quot;.</div><div><br>
</div></div><div style>Regards,</div><div style>Jonathan</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 May 2013 19:48, Robert Yang <span dir="ltr">&lt;<a href="mailto:liezhi.yang@windriver.com" target="_blank">liezhi.yang@windriver.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">* The benefits:<br>
  - Really support ext4<br>
  - Support the sparse file (the sparse file became into the common file before)<br>
  - Have a uniform code for ext2/3/4 generation<br>
  - Remove the depends on genext2fs-native<br>
<br>
* Impact<br>
  - Build time:<br>
    a) If we build fresh core-image-sato, there is nearly no impact.<br>
    b) If we do the image generation, which means:<br>
       $ bitbake core-image-sato<br>
       $ bitbake core-image-sato -ccleansstate<br>
       $ bitbake core-image-sato<br>
   About 50 extra seconds are needed, here is my test result:<br>
   Before the patches: 4m25s<br>
   After the patches: 5m17s<br>
   This is because the genext2fs is much faster than the<br>
   populate-extfs.sh, we will replace this script by the mke2fs when it<br>
   supports create the filesystem from a initial directory.<br>
<br>
  - Disk space (take core-image-sato as an example)<br>
    a) The image file size is the same as before (529M)<br>
    b) The disk usage is a little different: (du -sh)<br>
              before       now<br>
       ext2:  364M         388M<br>
       ext3:  381M         404M<br>
       ext4:  380M         387M<br>
<br>
   We may need to adjust the IMAGE_OVERHEAD_FACTOR from 1.3 to 1.4.<br>
<br>
   I have done some simple runtime testing on core-image-sato and<br>
   core-image-minimal, they worked well.<br>
<br>
// Robert<br>
<br>
The following changes since commit 3472c1f7ab409cd91c1d4782d9e00880b84e3ae8:<br>
<br>
  grub-efi-native: Cleanup whitespace (2013-05-03 16:37:05 +0100)<br>
<br>
are available in the git repository at:<br>
<br>
  git://<a href="http://git.pokylinux.org/poky-contrib" target="_blank">git.pokylinux.org/poky-contrib</a> robert/ext4<br>
  <a href="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/ext4" target="_blank">http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/ext4</a><br>
<br>
Robert Yang (4):<br>
  e2fsprogs: the max length of debugfs argument is too short<br>
  e2fsprogs: let debugfs do sparse copy<br>
  e2fsprogs: add populate-extfs.sh<br>
  image_types.bbclass: replace genext2fs with populate-extfs.sh<br>
<br>
 meta/classes/image_types.bbclass                   |   46 ++++----<br>
 .../e2fsprogs-1.42.7/debugfs-too-short.patch       |   28 +++++<br>
 .../e2fsprogs/e2fsprogs-1.42.7/populate-extfs.sh   |   93 ++++++++++++++++<br>
 .../e2fsprogs/e2fsprogs-1.42.7/sparse_copy.patch   |  114 ++++++++++++++++++++<br>
 .../recipes-devtools/e2fsprogs/<a href="http://e2fsprogs_1.42.7.bb" target="_blank">e2fsprogs_1.42.7.bb</a> |    4 +<br>
 5 files changed, 257 insertions(+), 28 deletions(-)<br>
 create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.7/debugfs-too-short.patch<br>
 create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.7/populate-extfs.sh<br>
 create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.7/sparse_copy.patch<br>
<span class=""><font color="#888888"><br>
--<br>
1.7.10.4<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br></div></div>