Install Raspbian, open the terminal and run this command:
cat /proc/cpuinfo | grep erial
The result should show the serial number. Tested on Raspberry Pi 1,2, and 3. The result is a 16 digit hex number.
Reference:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=59864