recently i had to change two files on a fedora raw image mounted via loopback on ubuntu, which usually runs in a kvm on the ubuntu host. That made a lot of troubles with selinux after booting from the image because of wrong selinux labelling, the system could not access these files without proper selinux labels. while i know that i can set on fedora a .autorelabel, it is a long and tedious boot process (about 1 hour on slow disks) and it seems to be too much as I have changed only 2 files (network & passwd). I also do not want to turn off selinux for Fedora!
Is there possibility to mount a fedora image on a ubuntu system, change files and relabel on Ubuntu. Note that Ubuntu has no selinux active. "restorecon", which is always mentioned in the web only seems to work with an active selinux, which does not work in this case, with a fedora image mounted via loopback on unbuntu. Is there any way to relabel the changed files correctly, assuming that this labels are part of the ext2/xfs filesystems fedora uses?