Most partition types Linux doesn't care about. So even though
there are about 20 different partition types for FAT, 4 for
NTFS and 2 for Linux, the kernel will in fact consider them to
be all the same. You could put any file system on almost any
type of partition, so the reliable way would be to look what
is inside the partition and not on the partition type. There
are some file systems which store their super blocks in
different locations, which means the contents could actually
be seen as valid with different types of file systems.
It reads the text file /usr/share/file/magic which contains
descriptions of a lot of formats. Each of those will tell
which location in the file to look at and which byte values
to look for.
I don't know where to find the "official" file sources.
But the one used by Fedora Core can be downloaded from here:
Note to self: Don't try to allocate
256000 pages with GFP_KERNEL on x86.