I want to create a file system image for a foreign Linux system on a local Linux.
First of all, the foreign system could have different CPU architecture, such as ARM, MIPS, rather than my local PC Linux host. And it does not currently support
Secondary, the foreign system could have users different than my local host, and possibly has same user ID but may be in different name, or possibly a user ID only exists in the foreign system but not the local host.
Similarly for the group IDs.
A normal file system creation process, including to create an empty file system image, mount it, copy files into it, and then ummount it.
The problem is, since the user ID does not exist in my local host, how do I create it in my local file system in the copy file stage?
We know that if we
tar some folder in the foreign system, and then un-tar it in my local host, I can get some files with non-existing users/groups in place. This proves that files with non-existing users/groups can exist in Linux system.