swap not defined as swap

free -m : 1023 total swap space

created default partition /dev/sdb1 50M using fdisk. i did write the changes.
#mkswap /dev/sdb1
#swapon /dev/sdb1

free -m : 1078 total swap space
this shows that the swap is on

Question : i did not change the type LINUX SWAP (82) in fdisk.
so why is the swap still working because
#fdisk -l : still shows ID = 83 System= Linux
instead should it now show ID= 83 System = Linux Swap

Thanks

Not all programs use the partition type at all.

Also, you can make swap out of a file. How could that work if you were reliant on a partition type?

I haven't found anything in linux that actually uses the partition type. To it it's just a label.

I completely understand and am aware of swap space on file...
but what i am curious to know is that when we do fdisk and we have bunch of file system types..what are they for then..? are they just there for label since ?

thanks

I think Windows pays more attention to them than Linux does.

It's got more to do with automatic detection, than anything else. If you've got more than 1 UNIX installed, any installation can detect the swap partition just by looking at the ID. For example, if you mark partitions as FD (Linux raid auto), the dmraid utilities will automatically add them to its RAID volume.