Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# /bin/bash
##
# A script which patches VMware Tools to mitigate the HGFS compilation problems with Ubuntu 14.04
#
# Prerequisites:
# 1) You have extracted VMware Tools onto a writable media
# 2) You have cd'ed into the "vmware-tools-distrib" folder
# 3) You actually know what you're doing executing shell scripts :-)
#
# Author: https://github.com/tpberntsen
# Responsibility: The author assumes no responsibility what so ever for any effects of you running this script.
# Background: https://github.com/rasa/vmware-tools-patches/issues/29
# Attributions: vshoener for describing the steps needed: https://github.com/rasa/vmware-tools-patches/issues/29#issuecomment-76469889
# Searchability tags: vmware tools, ‘struct dentry’ has no member named ‘d_alias’, VMware Tools 9.9.0 build-2304977
##
# Enter the folder where all the sources are located
pushd lib/modules/source
# Decompress the archive containing the source files for the HGFS integration
tar xzvf vmhgfs.tar
# Enter the folder containing decompressed source files for the HGFS integration
pushd vmhgfs-only
# Patch the file causing the error (replacing occurrences of "d_alias" with "d_u.d_alias" across the file)
sed -i 's/d_alias/d_u.d_alias/g' lib/modules/source/vmhgfs-only/inode.c
# Exit the source folder
popd
# Create a new archiove
tar czvf vmhgfs.tar vmhgfs-only
# Exit the source folder
popd
# You are now ready to (re)install the VMware Tools by running "sudo ./vmware-install.pl"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.