How to know galileo booting from a micro SD card correctly,not from galileo internal memory?
Look at step 5.
That page will also help you fix any SD card issues you might have. (at least that is the intention)
If you are not booting from the SD card, you can modify files and save them, but none of the changes will be permanent. There is no way to write to the SPI image from a Linux console (at least as far as I know).
The easiest way to know if your Intel Galileo is booting from SD card is to upload the Blink example. Turn of your Galileo and turn it back on, If the sketch is still running after Galileo boots, then you are booting from the SD card.