Bug 967321

Summary: system does not boot if fstab cotains mount poinst for virtualbox shared folders
Product: [Fedora] Fedora Reporter: wweigelt-07
Component: systemdAssignee: systemd-maint
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dennis, johannbg, lnykryn, msekleta, notting, plautrba, stephenwlin, systemd-maint, vpavlin, wweigelt-07, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-21 10:59:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log files from root command line console (emergency mode)
none
journal-b none

Description wweigelt-07 2013-05-26 14:50:26 UTC
Description of problem: 
System does not boot if /etc/fstab cotains these two lines

Mysharedfolder1 /home/willi/share vboxsf defaults,rw,uid=10000,gid=1000 0 0
Mysharedfolder2 /home/willi/webdesign vboxsf defaults,rw,uid=1000,gid=1000 0 0

Evironment Virtualbox with Virtualbox guest extensions
Version 3.8.x was not showing this problem

Version-Release number of selected component (if applicable): 3.9.4-200.fc18.i686


How reproducible:
create a Fedora18 distribution in Virtualbox and enable shared foders

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Bill Nottingham 2013-05-28 15:50:47 UTC
Where does it fail?  Please try the instructions at:
   http://freedesktop.org/wiki/Software/systemd/Debugging/
and attach what output you can get.

Comment 2 wweigelt-07 2013-05-29 20:01:10 UTC
Created attachment 754530 [details]
log files from root command line console (emergency mode)

I reach only the emergency console. Crtl-D to continue does not help. 
Login as root is working. If I edit fstab, remove the two lines (commenting out) and shutdown for restart it boots fine. 
From the root shell after crash i have created the attached log files. 
If you need more then let me know what and how i can get this as root command line shell user.

Comment 3 Zbigniew Jędrzejewski-Szmek 2013-05-29 20:49:47 UTC
From the systemd viewpoint, this is not a bug (filesystem failed to mount, local-fs.target cannot be reached, enter emergency mode). Add ",nofail" at the end of options in fstab if you don't want the boot to fail when the filesystems cannot be mounted.

Why the mounting fails in the first place?
> kernel: vboxguest: module verification failed: signature and/or required key missing - tainting kernel
> mount[540]: /sbin/mount.vboxsf: mounting failed with the error: No such device
> mount[539]: /sbin/mount.vboxsf: mounting failed with the error: No such device
I haven't had much experience with vbox, but I guess that this means there's some configuration error or maybe the vboxsf module is not getting loaded. Can you mount the shared folder manually?

Hm, are you using kmod-VirtualBox from rpmfusion? If so, they haven't released kmod-VirtualBox-3.9.4 yet. Consider switching to open-vm-tools which is part of Fedora now.

Comment 4 wweigelt-07 2013-06-04 20:41:01 UTC
THe same configuration works in the previous kernel. 
Manual mount works in both cases. 

I don't see a reason why the mount works in the previous kernel and not now anymore. If there is a configuration error it should not have worked in the previous kernel version. 

The emergency screen offers Ctrl-D to continue. This doesn't work in the sense that it reboots and stops at the same point again. It should finalize startup if the problem is a minor one as you described. 

I'm using this 
http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-Win.exe
to run fedora as guest. 

The guest additions are these:
http://download.virtualbox.org/virtualbox/4.2.12/VBoxGuestAdditions_4.2.12.iso

The shared folders are folders of the Windows 8 64bit host. I installed the fedora 32bit version in virtulbox. (64 bit performace is not so good and there is a compatibility issues with apache, php etc.)

The behaviour is a little odd. I was doing a yum distribution-synchronization and after this I got the problem.
Selection in the boot menu the previous kernel was removing the problem.

Comment 5 Zbigniew Jędrzejewski-Szmek 2013-06-04 23:00:52 UTC
(In reply to wweigelt-07 from comment #4)
> The emergency screen offers Ctrl-D to continue. This doesn't work in the
> sense that it reboots and stops at the same point again.
That's the designed behaviour of systemd: when you quit the emergency session,
it attempts to reach the default target, which means that it'll attempt to
mount all the filesystems in /etc/fstab that haven't been mounted yet.

Could you boot with systemd.log_level=debug on the kernel command line,
and attach the output of journalctl -b ?

Comment 6 wweigelt-07 2013-06-06 20:58:28 UTC
Created attachment 757924 [details]
journal-b

I haved added the debug command to the boot line before booting. I don't know if I have done this correctly

>That's the designed behaviour of systemd: when you quit the emergency session,
>it attempts to reach the default target, which means that it'll attempt to
>mount all the filesystems in /etc/fstab that haven't been mounted yet.

That designed behaviour is really fine for programmers and for Linux experts. 
For simple users running their applications like a spreadsheet or email etc. this is fatal because they will never figure out what has gone wrong. 
Helpful would be at least to show in the emergency screen always an error message. In case of not system relevant errors it should boot up normally and show always after log on an error message. But this is my opinion only ...

Comment 7 Lennart Poettering 2013-06-21 10:59:21 UTC
So I am not sure I can do much about this. virtualbox is not part of fedora is it?

I am not sure how virtualbox does its shared folder stuff, but it's probably up to them to get this right.

The two vbox specific mount commands fail:

> mount[540]: /sbin/mount.vboxsf: mounting failed with the error: No such device
> mount[539]: /sbin/mount.vboxsf: mounting failed with the error: No such device

So this really indicates a problem with vbox' own code. 

Please file a bug on the virtualbox bug tracker, they need to fix this. I really don't see what we can do in systemd/Fedora about this.

Comment 8 wweigelt-07 2013-06-21 19:46:54 UTC
>So I am not sure I can do much about this. virtualbox is not part of fedora is >it?
Fedora runs as virtual machine within VIRTUALBOX. 
Simply a FEDORA UPDATE OF THE KERNEL was bringing up the problem. 
MANUAL MOUNT WORKS

I'm really pretty sure that this is a Fedora bug.

Comment 9 Stephen Lin 2014-12-22 18:14:26 UTC
I'm sure you've moved on from this issue, but just in case anyone else is reading this and having the same problem, the issue is likely due to the vboxsf module not being loaded at the time fstab is processed during boot.

With Fedora 21 server, adding a file in /etc/sysconfig/modules with the following contents:

> /usr/sbin/modprobe vboxsf > /dev/null 2>&1

fixes the issue for me.

Comment 10 Stephen Lin 2014-12-22 18:16:15 UTC
(Note for anyone reading, the file must be made executable, and from what I've read it probably also needs to have the extension ".modules")