Make sure you are logged in as root, if you are using "su" to switch to root, use the "-l" parameter "su -l".
The command to make the filesystem would then be:
mkfs -t ext3 /dev/device
Asssuming you want to create an ext3 partition, you can use vfat etc. if you want a FAT32 partition to be accessible by both Windows and Linux.