dimarts, 24 de juliol del 2007

How to write into a NTFS partition from Linux

In this post I would like to explain to you how we can load a NTFS partition in such a way that it can be accessed from Linux not only for reading the information in it but also for writing new one (or erase).
Not many days have past since tools and drivers allowing totally access to NTFS from Linux have appeared thanks to reverse engineering. This is because NTFS specifications are not opened so computer scientist do not know how this format works.
Well, in order to mount a NTFS partition you only have to follow this steps (remember that I am using Ubuntu Fiesty):
  1. Instal Fuse package (it can be found in Synaptic under the name of afuse) and all the dependencies that the Packeges Manager suggests.
  2. Instal de package ntfs-3g and the dependencies that Synaptic suggests.
With only this two instalations we have the necessary tools to write in the NTFS partition (it seems that in the future this driver will be in the kernel of Linux).
After doing this two simple steps it only remains to mount the device, an external hard disc in my case:
  1. If the devide is mounted automatically when you connect it to your PC it must be umounted. This happens because with automatic monting the ntfs-3g driver does not work so the device have only reading permissions:
    $ sudo umount /dev/sdc5
  2. Mount the partition using the driver:
    $ sudo mount -t ntfs-3g /dev/sdc5 /media/aux_disk
  3. If you want to umount the device:
    $ sudo umount -t ntfs-3g /dev/sdc5
So, this is all! With this simple steps you can execute mkdir, for example, in the NTFS partition with no problems :D