If you need to repartition then use fdisk, if you need to format, then it depends on the filesystem you are using: ext2, ext3, jfs, reiserfs, xfs, etc.
Type mount and look to for the keyword "type", next to it will tell you what type of filesystem you are using.
Next you need to use the format command
mkfs.typeOfFS /dev/device
if you have ext3 then type mkfs.ext3 or if you have xfs type mkfs.xfs
So if you need to format the first ide parition on the first ide drive with xfs type:
mkfs.xfs /dev/hda1
Hope that helps.