Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485996 - app-emulation/virtualbox-guest-additions should define a "fs-vboxsf" alias for the vboxsf module
Summary: app-emulation/virtualbox-guest-additions should define a "fs-vboxsf" alias fo...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-25 17:09 UTC by Richard Freeman
Modified: 2015-04-01 18:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Freeman gentoo-dev 2013-09-25 17:09:29 UTC
Recently I began getting errors from a VM running systemd due to fstab being mounted before vboxsf is probed (and thus mounts of shared folders will fail).

Looking at the unit file I see nothing to guarantee that it runs before local mounts are performed, so only happenstance allowed this to work previously.

I'm not sure what the most appropriate solution is, but virtualbox-guest-additions should run before local-fs-pre.target.  Or, perhaps, systemd-fstab-generator should ensure that it runs before individual mounts that require the guest additions are processed (which could itself happen in various ways).
Comment 1 Mike Gilbert gentoo-dev 2013-09-25 17:34:00 UTC
Maybe there is some way to get the generator to treat them as "remote" filesystems, which are processed later in the boot process.
Comment 2 Richard Freeman gentoo-dev 2013-09-25 18:58:10 UTC
It looks like adding _netdev to the mount options will get it to run as a network mount.  Alternatively shared/util.c needs to be modified to add vboxsf as a network filesystem type.

That might not actually be a bad upstream patch, though I'm not sure if virtualbox has a different plan for addressing this.

Regardless the systemd.mount man page could use improvement.  It mentions that the generator looks at fstab options, but doesn't mention _netdev at all.  I didn't fully peruse the source but I'm sure there are other undocumented behaviors.
Comment 3 Mike Gilbert gentoo-dev 2013-09-25 19:09:41 UTC
This blog post is interesting:

http://rwmj.wordpress.com/2009/08/18/how-does-mount-load-the-right-kernel-module/

I wonder how we can get the kernel to issue that /bin/modprobe call to load the vboxsf module on-demand?
Comment 4 Mike Gilbert gentoo-dev 2013-09-25 19:37:07 UTC
It looks like the kernel calls /sbin/modprobe fs-%fstype% when you try to mount a filesystem with a type it doesn't know about.

Could you try adding a module alias in /etc/modprobe.d?

alias fs-vboxsf vboxsf
Comment 5 Richard Freeman gentoo-dev 2013-09-25 20:03:43 UTC
(In reply to Mike Gilbert from comment #4)
> It looks like the kernel calls /sbin/modprobe fs-%fstype% when you try to
> mount a filesystem with a type it doesn't know about.
> 
> Could you try adding a module alias in /etc/modprobe.d?
> 
> alias fs-vboxsf vboxsf

Indeed that works.  Seems like a good rc-independent solution to have virtualbox-guest-additions to add an appropriate file to /etc/modprobe.d containing this line.
Comment 6 Mike Gilbert gentoo-dev 2013-09-25 20:10:08 UTC
Agreed. Re-assigning to package maintainer.

Also, I think there is probably a way to define that alias in the module sources; depmod seems to generate "fs-" aliases in /lib/modules/version/modules.alias for other filesystems. I'm just having trouble figuring out exactly how that works.
Comment 7 aabarkley3 2014-12-16 16:18:34 UTC
Has this been resolved?