As you know, If no root_owner is specified, use the user and group ID of the user running mke2fs. But genimage redefine this behavior and sets root-owner to 0:0 by default.
How you can reproduce my problem?
1) Put my empty_img.cfg to /home/username/my_genimage/ folder
2)
genimage --config /home/username/my_genimage/empty_img.cfg --outputpath /home/username/my_genimage/__outputpath/
3) Burn diskEmpty.img to any usb flash card
4) Try to put anything little file to your usb flash. You can not do it under username.
I suggest use original mke2fs behavior.
How to do it?
Looks like I need use NOT
CFG_STR("root-owner", "0:0", CFGF_NONE),
But use
CFG_STR("root-owner", "0:0", CFGF_NODEFAULT),
As you know, If no root_owner is specified, use the user and group ID of the user running mke2fs. But genimage redefine this behavior and sets root-owner to 0:0 by default.
How you can reproduce my problem? 1) Put my empty_img.cfg to /home/username/my_genimage/ folder 2)
genimage --config /home/username/my_genimage/empty_img.cfg --outputpath /home/username/my_genimage/__outputpath/
3) Burn diskEmpty.img to any usb flash card 4) Try to put anything little file to your usb flash. You can not do it under username.
I suggest use original mke2fs behavior.
How to do it? Looks like I need use NOT CFG_STR("root-owner", "0:0", CFGF_NONE), But use CFG_STR("root-owner", "0:0", CFGF_NODEFAULT),
https://github.com/pengutronix/genimage/blob/2b9d87003b53b23892a6ecd9b1276c59e96df0ee/image-ext2.c#L207 empty_img.zip