1

When i run:

mount -a

as root user in my virtualbox machine i will get the samba share mounted, so my settings in my /etc/fstab are working:

//192.168.0.99/download /vagrant/Downloads cifs credentials=/root/.smbcredentials,auto 0 0

But why is this share not automounted when my virtualbox machine is booting? I run virtualbox in headless mode using vagrant. At the moment i need to run this sequence:

vagrant up
vagrant ssh
sudo su
mount -a

While this should be enough:

vagrant up

I am new to debian administration. Is there a log file for fstab / mount issues, that can be viewed after booting? Could it be a timeout or dependency issue on booting? How to debug it best?

2 Answers2

2

The network might not yet be initialized at this point. You can add _netdev to the mount options. This will delay the mount until the network is connected.

//192.168.0.99/download /vagrant/Downloads cifs credentials=/root/.smbcredentials,_netdev,auto 0 0
Marco
  • 1,489
  • 11
  • 15
1

The mount point target:

/vagrant

and

/vagrant/Downloads

is itself not available at booting time. /vagrant is a mount point itself, which is introduced by vagrant tool right after the virtual machine boot finished.

Changing fstab to:

//192.168.0.99/download /mnt/Downloads cifs credentials=/root/.smbcredentials,auto,_netdev 0 0

did the trick of mounting it at boot time.