[OE-core] [PATCH] qemu: add recommend of kernel-modules for all qemu machines

Stanacar, StefanX stefanx.stanacar at intel.com
Thu Sep 5 13:09:02 UTC 2013



On Thu, 2013-09-05 at 11:45 +0100, Burton, Ross wrote:
> On 5 September 2013 11:20, Burton, Ross <ross.burton at intel.com> wrote:
> > I've also decided that maybe systemd isn't being quite as clever as it
> > should and maybe fixing it there is the real fix.
> 
> s/systemd/Linux/.
> 
> The bug is that doing a "df" on a qemu systemd image results in it
> attempting to automount /proc/sys/fs/binfmt_misc.  The automount unit
> has ConditionPathExists=/proc/sys/fs/binfmt_misc/ to stop it
> attempting to automount when binfmt is disabled but hooray Linux if
> binfmt_misc is a module that directory exists even when the module
> isn't actually loaded, giving a no such device error when accessed.
> The intention here I believe is so that an access to that directory
> can invoke an automounter (systemd, in this case) which can then load
> the modules and mount the virtual filesystem.
> 
> There appear to be two options.
> 
> 1) The QA scripts ignore any binfmt_misc unit mounts failing
> 2) systemd RRECOMMENDS kernel-module-binfmt-misc
> 
> (the third option of teaching systemd how to recognise this situation
> and refuse to start the unit appears impossible)
> 

I honestly like second option more. And the third even better :) (sure
changing the test to ignore binfmt_misc unit from systemctl --failed
output can be easily done, but seems like just hiding the fail to me).

I just tested that the third option can be done (for this case at least)
by changing ConditionPathExists=/proc/sys/fs/binfmt_misc/ to
ConditionDirectoryNotEmpty=/proc/sys/fs/binfmt_misc/ for
proc-sys-fs-binfmt_misc.automount unit file and 
"df" doesn't complain as it doesn't attempt to automount anymore. On a
system which does have that module loaded there are two files there so
that's why the condition works.

Cheers,
Stefan


> (CCing Stefan for his input)
> 
> To be honest I'm leaning towards (1) right now as binfmt_misc is only
> required in specific situations.
> 
> Ross



More information about the Openembedded-core mailing list