Home Page

 


EARLIER ITEM

 


FREE SOFTWARE MENU

 


LATER ITEM

 

Free Software Menu


6th August 2006

LINUX AND NTFS

Brian Grainger

email.gif (183 bytes)
brian@grainger1.freeserve.co.uk


 

Note: Throughout this article the term Linux is used to refer to the GNU-Linux operating system.

Over the first half of 2006 there have been great strides in Linux interoperating with the Windows NTFS formatting system. This article addresses the latest advances.

One of the bugbears of using Linux has been interoperating with files located on disk partitions formatted with NTFS. This is necessary when one wants to use files on both Linux and Windows XP operating systems. It is also necessary if one wants to use Linux to rescue a Windows XP system that has got seriously corrupted.

Linux has always been OK with FAT16 and FAT32 so Linux has no problems interacting with files created under Windows 9x systems. The latest Linux kernels have also had a kernel driver for NTFS built in that would READ files located on NTFS partitions. The problem comes with trying to write files to such partitions, or perform operations that require a write - like delete a file.

The first project I heard of that addressed the problem of writing to NTFS partitions under Linux was the Captive NTFS project. I believe this, somehow, made use of the native Windows NTFS drivers to perform its magic.

Captive NTFS came with early versions of the Knoppix Live CD and I saw reports on the Knoppix forums of some success. However, it also came with some reports of failures. This, coupled with the fact that it was no longer a project being worked on, led me not to test it out! The perceived wisdom was to avoid it, unless you were desperate. It was wise to have a complete backup of your NTFS partition, or run the risk of it getting corrupted.

More recently there has been the Linux-NTFS project. The goals of the Linux-NTFS project are to develop reliable and full feature access to NTFS by the Linux kernel driver, and by a user space filesystem. This project has been running since at least 2001 and is still being worked on. It has come up with a number of utilities to manipulate NTFS partitions with Linux, such as Ntfsresize which can be used to alter the size of an NTFS partition.

I first came across Linux-NTFS last year when Knoppix started to experiment with ntfsmount as an extra with version 4.0.2. Ntfsmount was a utility to write files to the NTFS file system. Since that time the experimentation is over and ntfsmount is now part of Knoppix from version 5.0.1, which was made available in the first half of 2006..

Seasoned Linux users will know that, unlike Windows, you have to mount a file system before you can use it - even to read. This is one feature that gives Linux better security. Ntfsmount is a utility from the Linux-NTFS project that will allow the user to mount an NTFS partition for reading AND writing.

As it stands today ntfsmount has some limitations and in certain circumstances it will not do what is asked. However, unlike Captive NTFS, where it has trouble trying to do something it warns you and does not do it. This means that the NTFS partition mounted with ntfsmount should not get corrupted.

The main limitation with ntfsmount is that it will only allow 7 files to be created in a folder. I’m not technical enough to know why the number is 7 and why this limitation exists. For me, the ability to create just 1 file is a leap forward. It also allows interoperability with files created under Windows.

The introduction of ntfsmount to Knoppix means that it can now be used as a rescue CD for Windows XP. On a couple of occasions with my Windows 98 setup I have had to roll back my Registry when it had been attacked by nasty, difficult to remove trojans. You cannot use Windows to do it as the trojan compromises this line of attack. Using Knoppix is ideal. I have always considered Windows XP, which is more prone to attack, as a big worry. I could not use Knoppix to roll back the registry because it could not write back the registry files. Consequently, I never used Windows XP on the Internet for anything more than collecting my e-mail. With the introduction of ntfsmount, Knoppix gives me a comfort blanket I never had before.

Then we come to 14th July 2006. Apart from the French celebrating Bastille Day, this was notable for Linux-NTFS project member Szabolcs Szakacsits, (whom I shall refer to as SS from now on!), suddenly announcing the availability of ntfs-3g. This was a fork of ntfsmount, which gave it greater capability. In particular the 7 file in a folder creation limit was removed. SS made his announcement 2 days before he was off on an adventure trek for a month! My initial thought was to be deeply suspicious. What a wonderful way to introduce some malware to the community. Apparently give them something they desperately need and disappear for a month!

In the two day period before SS left for his trip there were a number of exchanges between himself and Anton Altaparmakov, (AA), maintainer of the Linux-NTFS project.. It was clear that AA had done some review of the code SS had generated. This gave me some confidence that it was not a malware threat. As I read the exchange it was clear there were differences in opinion as to how ntfs-3g should develop if it were to be integrated into the Linux-NTFS project. I must admit that SS had a much more rigid definition than AA of what he considered was tested code and I liked the definition of SS! SS was aware of some things that still needed to be done but wanted to release the code before he left on his trip - to enable more testing to occur. ntfs-3g is regarded as beta code.

Pretty soon, the news of ntfs-3g was across the Internet. People were downloading it and so far I have yet to see a report of any problems with corrupting NTFS.

How did I find out about it? Ecomoney, (forum name), reported it on the Puppy Linux forum. Kirk and Hacao both tested it with Puppy and reported favourably. At that time, mid July, Puppy Linux was in version 2.0.1 and without the NTFS support that the series 1 Puppy had. Barry Kauler, Puppy Master, did not take long to digest the news of ntfs-3g. Testing started straight away and a beta of Puppy 2.0.2 was released in the last week of July.

I put the beta Puppy on my laptop and started running some tests. I made a full report to the Puppy forum as well as announcing that a 'Poor Man's (Frugal) Install of the beta Puppy to an NTFS partition worked.

On the 29th July, Puppy 2.0.2 was released as a full product, the first Linux that I am aware of to incorporate ntfs-3g. It even got a favourable mention on the Ubuntu forums, a group not renowned for praising other Linux distros.

With the release of Puppy 2.0.2, with ntfs-3g, the Puppy 2 series has now recovered all the functionality of the Puppy 1 series. However, although it cannot be seen on the surface, Puppy now has an enhanced architecture that makes Puppy Series 2 much more flexible than Series 1.

Puppy 2.0.2 is now the best Puppy Linux there has ever been. The Lin'N'Win NewB project will be updated in due course!

Link to the announcement of ntfs-3g:
http://sourceforge.net/mailarchive/forum.php?thread_id=23836054&forum_id=2697

Link to the Linux-NTFS project:
http://www.linux-ntfs.org/


 

 

 

 


TOP