meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sw:yocto:issues:populatefs [2025/07/28 10:37] niziaksw:yocto:issues:populatefs [2025/08/13 07:54] (current) niziak
Line 21: Line 21:
 </code>    </code>   
  
 +Conclusions:
   * It is related to build on ZFS. In this case LXC on Proxmox's LXC.   * It is related to build on ZFS. In this case LXC on Proxmox's LXC.
   * It works before.    * It works before. 
   * It works for another (bigger) image.   * It works for another (bigger) image.
 +  * It is related to ''wic'' image. 
 +  * Yocto's ''image.bbclass'' was fixed to correctly calculate sizes on compressed ZFS:
 +    * Problem raised here: [[https://lists.yoctoproject.org/g/poky/topic/image_bbclass/81548542|image.bbclass - get_rootfs_size]]
 +    * And fixed here:
 +      * [[https://git.yoctoproject.org/poky/commit/?h=master-next&id=3743234dab23e4068e1d1fde9e1fa0bc09fdb182|lib/oe/utils: add directory size function]]
 +      * [[https://git.yoctoproject.org/poky/commit/?h=master-next&id=f7ed81182c7797fd6b0069fa5c90535b13848657|classes/image: use oe.utils.directory_size() instead of du]]
 +  * Problem still exists in [[https://git.yoctoproject.org/poky/tree/scripts/lib/wic/partition.py#n279|poky/scripts/lib/wic/partition.py]]
 +    * Task ''do_image_wic''.
 +    * ''du'' returns real disc usage (135649) (on compressed ZFS) instead of data size (250920).
 +    * adding ''--apparent-size'' fixes the issue (''du_cmd = "du -bks %s --apparent-size" % rootfs_dir'')
 +    * Bug filled [[https://bugzilla.yoctoproject.org/show_bug.cgi?id=15951]]
  
-Task ''do_image_wic''. 
  
-mkfs.ext4 is invoked with: 
  
-  * **-i 8192** bytes-per-inode 
- 
-<code> 
-build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo \ 
-mkfs.ext4 \ 
--F \ 
--i 8192 \  
--E hash_seed=6b246d08-69fc-539c-9b53-fafae8bf9e97 \ 
-build/tmp/work/.../core-image-minimal/1.0/tmp-wic/rootfs_rootfs.3.ext4 \ 
--L rootfs \ 
--U f99cacb6-1bd4-4812-855a-cfdf5be46520 \ 
--d build/tmp/work/.../core-image-minimal/1.0/tmp-wic/rootfs3 \ 
-returned '1' instead of 0 
- 
-| output: mke2fs 1.47.0 (5-Feb-2023) 
-| Discarding device blocks: done          
-| Creating filesystem with 189652 1k blocks and 23616 inodes 
-| Filesystem UUID: f99cacb6-1bd4-4812-855a-cfdf5be46520 
-| Superblock backups stored on blocks: 
-| 8193, 24577, 40961, 57345, 73729 
- 
-| Allocating group tables: done  
-| Writing inode tables: done  
-| Creating journal (4096 blocks): done 
-| Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file "cc1" 
-| mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system 
-| 512 
- 
-| WARNING: exit code 1 from a shell command. 
- 
-</code>