Ubuntu 15.04 seems to install better with windows 8.1. So, I was able to install it once and it came up with Ubuntu. Then, I also checked if Windows worked as well. However, it immediately went into windows without the choice for the OS part. I reinstalled Ubuntu, but this time it gave me the error message:
Executing 'grub-install/dev/sda' failed. This is a fatal error.