Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed failed vboxsf mounting with Vagrant + VirtualBox #235

Closed
wants to merge 2 commits into from
Closed

Fixed failed vboxsf mounting with Vagrant + VirtualBox #235

wants to merge 2 commits into from

Conversation

reneoelke
Copy link
Contributor

This pull request fixes #234 and #232.

The order of the commands in cleanup.sh was changed. At first all header packages will be removed. This installs indirect new kernel packages. But then all kernel packages will be removed except the package with the current running version.

@reneoelke reneoelke changed the title #234 Changed command order to remove indirect installed kernel packages. Changed command order to remove indirect installed kernel packages. Jul 1, 2014
@reneoelke reneoelke changed the title Changed command order to remove indirect installed kernel packages. Fixed failed vboxsf mounting with Vagrant + VirtualBox Jul 1, 2014
@juliandunn
Copy link
Contributor

Looks good to me, but would you mind adding a comment about how the order is important & linking to this issue? Because it's non-obvious what happens, I'm afraid a future refactor may break it again.

@fadenb
Copy link
Contributor

fadenb commented Jul 18, 2014

@reneoelke I cherry-picked your commit and applied it to a bento fork of mine.
I still got DKMS errors due to missing headers. See https://gist.github.com/fadenb/2a9f5c1cf6f2c69eab1e for output.

If I am not mistaken those should be fixed?

@reneoelke
Copy link
Contributor Author

@fadenb Please check out my branch (https://github.com/reneoelke/bento/tree/234-bugfix-vboxsf-mounts) and tell me if the same problem exists. I haven't time now to verify it. Next week I can check it too. Thank You. ,-)

@reneoelke
Copy link
Contributor Author

@fadenb I could reproduce the problem. I am working on a fix. Thanks for your comment.

@juliandunn It seems that since Ubuntu 12.04 the kernel isn't updated with the command "apt-get upgrade -y" (see also http://askubuntu.com/questions/175385/why-is-apt-no-longer-updating-the-kernel). The terminal output form script update.sh is (see at The following packages have been kept back ... and ... and 5 not upgraded):

root@vagrant:~# apt-get upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-generic linux-headers-generic linux-headers-server linux-image-generic linux-server
The following packages will be upgraded:
  apt apt-transport-https apt-utils bash biosdevname bsdutils dbus dpkg file gettext-base gir1.2-glib-2.0 gnupg gpgv ifupdown initramfs-tools initramfs-tools-bin iputils-ping
  iputils-tracepath language-selector-common libapt-inst1.5 libapt-pkg4.12 libasprintf0c2 libblkid1 libboost-iostreams1.54.0 libcgmanager0 libdbus-1-3 libelf1
  libgirepository-1.0-1 libgnutls-openssl27 libgnutls26 libjson-c2 libjson0 libmagic1 libmount1 libpam-systemd libselinux1 libsystemd-daemon0 libsystemd-login0 libudev1 libuuid1
  libxml2 linux-firmware linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic locales ltrace mount openssl
  python3-update-manager resolvconf rsync systemd-services tzdata udev update-manager-core util-linux uuid-runtime
59 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 94.6 MB of archives.

But in the script cleanup.sh the purging command dpkg --list | awk '{ print $2 }' | grep 'linux-image-3.*-generic' | grep -vuname -r| xargs apt-get -y purge installs a new kernel version indirectly. And this new kernel doesn't seem to be uninstalled. If the systems boots it takes the new kernel but for this no vbox kernel module is installed (because of the missing kernel headers).

I thought that changing the command order would help. But it seems that the command dpkg --list | awk '{ print $2 }' | grep linux-headers | xargs apt-get -y purge also installs a new kernel version indirectly. :-(

@reneoelke
Copy link
Contributor Author

The solution is to install all upgradable packages (incl. kernel and kernel header packages). For this I changed the script update.sh. The new kernels won't be used by DKMS for vbox module compilation. It will be removed in cleanup.sh later again. If the new kernel should be uses instead of the old one a reboot script should be added and called in the packer json file (directly after cleanup.sh).

@juliandunn
Copy link
Contributor

Squashed and merged in ed086b9

@juliandunn juliandunn closed this Jul 31, 2014
@reneoelke
Copy link
Contributor Author

Thanks for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VirtualBox: Mounting shared folder with vboxsf failed
3 participants