Formatting an ntfs partition in linux

If you have an ntfs disk and what to change it to a linux filesystem it is not as simple as deleting the partition, recreating it and then running mkfs.ext. The steps are:



  1. fdisk /dev/hda

  2. p (to list the partitions)

  3. d then enter the number of the partition that you want to d and set the .

  4. n then follow the prompts to create a new linux partition

  5. w to write the partition table to disk.

    Now ntfs uses the first 100 bytes of the partition to say what type the partition is and mkfs.ext2 seems to use this. We need to delete this information and we can do this by creating a file with at least 1000 0's and writing it to this partition.

  6. create a file using a text editor with at least 1000 zeros

  7. dd if=/root/zerofile of=/dev/hda5
  8. Once we have done that we can run mkfs.




  9. mkfs.ext3 -d /dev/hdax, where x is the partition you want to format