Skip to content

Instantly share code, notes, and snippets.

@tpberntsen
Created April 11, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpberntsen/4d0478cb36c3a6248f08 to your computer and use it in GitHub Desktop.
Save tpberntsen/4d0478cb36c3a6248f08 to your computer and use it in GitHub Desktop.
# /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