I used the following command:
sudo dd if=/home/aleksandrus/Downloads/galileo-1.2.img of=/dev/mmcblk0
Still, I get the same yocto linux when I type cat /proc/version (in the sketch). I don't know if that's normal, but anyways, I get no SSH ( on my laptop it says connection refused ). I even typed "sudo service ssh start" on the sketch's setup function. Dealing with this embedded system is really frustrating...