In order to install and use g_mass_storage, you will have to add the kernel module. In fact this subject has already been discussed. You can take a look at the following threads to learn more about it:
Remember that after adding the kernel module to your image you will also have to mount the flash drive you want to use with your Galileo. In order to do so, look for your device in /dev/ and then mount it to a directory with the command mount /dev/YOUR_DEVICE /desired_directory.