Linux software generally has a reputation for having some great, novell ideas, but often lacking in the general 'spit and polish' - difficult to install, unreliable, and so on. However the latest program I have tried out - Captive, is a breath of fresh air - simple to install and set up, and It Just WorksTM. And not only that, it's probably one of the most useful and technically impressive projects I've seen in a long time ...
(I apolgise now for the condescending laymans speak / confusing technical babble - I was so impressed I felt the need to do a writeup of this program, and as such hope non-techies will appreciate the quality of Captive. anyway, I digress...)
What does it do?
You see, Captive allows Linux to read Windows format NTFS partitions. If you have a recent version of Windows installed on your hard drive (Win 2000 or XP), chances are it will store your files on disk in a format called NTFS. Linux stores it's files in a different format (comonly a format called ext3).
So What's the big deal?
These two formats (NTFS and ext3) are like two different languages, Japanese and German if you like. Now while the ext3 format is fully documented, NTFS is a proprioritary format invested by Microsoft, and so it is very difficult for other operating systems like Linux to understand it and read.
To give an example, imagine you are an english speaking person (difficult, I know), and you want to read a essay written in German. Now if you got hold of a German -> English dictionary, you could translate each word literally, and get the basic meaning of the essay. Now imagine the essay is in Japanese, and no-one will sell you a Japanese dictionary. Or offer to teach you Japanese. This is basically the problem faced when trying to read NTFS disks in Linux. The meaning of NTFS is only known by Microsoft, and although work has been made in being able to read NTFS, Linux cannot write files in NTFS format. (The language anology holds here: while you could probably work out what the Japanese essay said, given enough time and other pieces of writing that have already been translated from Japanese to English, writing it would be a much more difficult task)
So where does Captive fit in?
How it works
I said above that Linux can read NTFS files, but cannot write them. Well now it can, with the help of Captive. What captive basically does is allow Linux to use the Windows NTFS driver itself, so it can read and write NTFS disks.
To do this Captive has to do three things:
- Get a copy of the Windows NTFS driver
- Act like Windows so it can use the NTFS driver
- Pass the information it gets via the NTFS driver to Linux to use
The first of these tasks is achieved in quite a clever way - it uses the existing read only NTFS support in Linux to search the Windows hard disk for the driver files. This is relatively easy, but unlike many other Linux programs, Captive pretty much does this for you.
The second task is basically the hardest. Pretending to be Windows is very difficult; Windows is a huge and complex program, with over 40 Million lines of code in Windows XP. Fortunatly a number of other programs already go some of the way to pretending to be Windows, and so Captive's author's
had a framework to start on. However a large amount of work was required to pull this all together - see the author's site for a technical description.
The net result is that Captive creates a mini-version of Windows running inside Linux. This mini-version of Windows (or a Sandbox to use the correct term) deals with the actual process of reading and writing the information from an NTFS disk, and then passes it to the normal Linux file handling functions. As Captive uses the 'real' NTFS driver, it's support for NTFS is complete.
If this is technical jargon is hurting your head, let's go back to our language analogy: Captive is basically kidnapping a Japanese-speaking person, getting them to read the Japanese essay, then taking the raw thoughts out of his brain so he can understand them (OK, my analogy is falling apart a bit, but it gives you an idea of the complexity of this program!).
So how is it so easy to use?
Well all you as a user of Captive have to do is install it, and run it's setup program. It does all the necessary searching for the NTFS driver, setting up it's Sandbox to talk to the Linux operating system, and even finds and makes available all NTFS disks you have on your PC. it literally took my 30 seconds from starting the install to browsing all my Windows files
Cool! So who wrote this then?
A single random guy called Jan Kratochvil, coding in his spare time.
« hide more