Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Windows Operating Systems Software Linux

Using the Real ntfs.sys Driver Under Linux 548

caseih writes "A very neat hack uses the real ntfs.sys driver (obtained from your own windows XP partition and used via a wine-like layer (borrowed from ReactOS) to mount an ntfs partion with full read/write access. While not an ideal solution and certainly not free as in speech, this is an ideal stop-gap measure for many people trying out linux. I think that we'll probably see this in Knoppix pretty soon."
This discussion has been archived. No new comments can be posted.

Using the Real ntfs.sys Driver Under Linux

Comments Filter:
  • OK... good (Score:2, Interesting)

    by herrvinny ( 698679 )
    OK, but I imagine having to load all that would take a toll on performance. How fast does it run, and more importantly, how can a free (read: non-encumbered) version of this be made?
    • Re:OK... good (Score:2, Insightful)

      by Anonymous Coward
      Well, it looks good to me for troubleshooting and forensic purposes. I wouldn't use this to mount an NTFS share housing mp3s however.
      • I wouldn't use this to mount an NTFS share housing mp3s however.
        Agreed. If you just need to read the mp3 partition then the NTFS driver in the kernel should work fine.
        • What if you need to read and write? I am in the (sloowwwww) process of setting up an el'cheapo linux box which I'll stuff my drives into. Unfortunately they are 120Gb NTFS drives, mostly full, and I can't afford another drive to do the copying/reformatting (not to mention the time to do this...). Would this solution work for this problem? ie could I mount the drives directly with a read-write Samba share so that I can access them from my home network (Both for read and write..)??

          • Re:OK... good (Score:3, Informative)

            The 2.6.0 kernels have safe read/write support for NTFS. (Not complete support, but enough for most purposes AFAIK.)
            • Re:OK... good (Score:5, Informative)

              by cxreg ( 44671 ) on Tuesday December 02, 2003 @01:12PM (#7610511) Homepage Journal
              While its 'write-safe', the writes it can do is completely useless to most people.

              "The only supported operation is overwriting existing files, without changing the file length. No file or directory creation, deletion or renaming is possible. Note only non-resident files can be written to so you may find that some very small files (500 bytes or so) cannot be written to."

              Maybe using the windows NTFS driver this way will help provide enough debug info to complete this driver
              • Re:OK... good (Score:3, Interesting)

                by tiger99 ( 725715 )
                I hope you are right. I wonder if there are any other ways of attacking the problem, other than beating up Bill of course, which is best left to Melinda.

                It is clearly always possible using simple methods (unless M$ do really stupid things with the disk format, and then it would break on some disks and/or controllers) to read what is on the disk, using Linux, or for that matter an old version of Norton Utilities (when there really were useful utilities). There is no shortage of people who could run simple fi

              • Re:OK... good (Score:3, Interesting)

                by caluml ( 551744 )
                The best thing for Linux would be ntfs2ext2,3,reiserfs, whatever, and a Windows ext2/3/reiserfs driver.
                Get people converted to an open filesystem, I say.
            • Re:OK... good (Score:5, Insightful)

              by tiger99 ( 725715 ) on Tuesday December 02, 2003 @01:16PM (#7610546)
              Is that safe enough, or complete enough? Having had an NTFS partition badly damaged by Linux soem time ago, I don't really want to try it yet.

              I do appreciate the difficulties the kernel team have had with this, it is not their fault that they have to work with an undocumented closed-source file system.

              The strange thing about all this is that very many different OSs which have existed over the years have had some capability to read and write "foreign" file systems, either built in or as a third-party driver. Certainly it is standard with Linux, *BSD, even the hated SCO, also MAC in most of its variants, Amiga, Atari, Solaris....... Even many 8-bit computers could read a variety of foreign file systems. The one name missing is M$, absolutely none of their stuff recognises any othe OS at all. (Please correct me if I am wrong!) It is as if Bill arrogantly imagines that there are only Windoze PCs in this universe. The fact is that there are many things that can't be done under Windoze, but are relatively easy under some other OS. Maybe the reverse is true also, but I can't think of an example. It is absolutely normal in this day and age, even without open source, to need to read and write foreign file systems. The one obstacle is the Chief Hacker of Redmond, he will neither interface to other people's file systems (despite having the documentation, and most drivers under BSD licence) nor will he let anyone else do it by denying proper access to his documentation.

              One day, when the masses wake up to what they have been denied since Messy-DOS 1, he may realise that his monopolistic actions have in fact shot himself in both feet.

              • Re:OK... good (Score:3, Insightful)

                by drsmithy ( 35869 )
                It is absolutely normal in this day and age, even without open source, to need to read and write foreign file systems.

                Ah, while there are certainly quite a few people out there who want to read and write multiple filesystems, I'd hardly call it "normal". "Normal" is something my grandma or a secretary does with their computer.

    • Re:OK... good (Score:4, Interesting)

      by gl4ss ( 559668 ) on Tuesday December 02, 2003 @11:56AM (#7609746) Homepage Journal
      well, i can certainly see uses for this when somebody is messing around with knoppix and wants to access his ntfs partitions that he normally uses windows from.. though i'm pretty sure ms is going to try some nasty eula trick on this(actually i'm pretty sure xp's eulas could forbid, maybe not enforceably but anyways, using it in this fashion).

      • Re:OK... good (Score:4, Insightful)

        by PetiePooo ( 606423 ) on Tuesday December 02, 2003 @01:52PM (#7610836)
        There are existing OSS NTFS drivers that work in read-only mode right? Well, here's a way around the MS EULA for most: make loading ntfs.sys a three-step process:

        Mount the NFTS partition you want write access to using the OSS read-only version,

        read the winnt/system32/ntfs.sys driver into memory or RAM-disk,

        remount it using the method described in the article.

        This way, Knoppix (or whichever distro implements this) wouldn't have to include the EULA-protected M$ driver. Its as legal as any other WINE-like use of existing, O/S-speicific DLLs and drivers.

        Obviously, this wouldn't work for NTFS partitions that don't have an actual NT-based O/S installed on it, but if that's the case, why do you have that partition on your HD in the first place?!

    • Re:OK... good (Score:5, Interesting)

      by caseih ( 160668 ) on Tuesday December 02, 2003 @11:56AM (#7609755)
      Performance would not be anywhere near the performance of a native linux file system (either ntfs or ext3) since it uses the lufs kernel module to communicate via a unix socket with the user-land ntfs hack. So you wouldn't want to use it as your root file system or anything. But for accessing mp3s, changing the Windows administrator password, or other similar operations, this seems to work ok. Heck, even just reading and writing MS Word doc files would be fast enough to not really be noticable to a user.
    • Re:OK... good (Score:3, Informative)

      by Progman3K ( 515744 )
      IANAE (I'm not an expert) BUT,

      Wine is actually fast because it ISN'T an emulator, it's an implementation of Win32 on Linux, and ReactOS isn't an emulator either, so in both cases, you'd get pretty close (if not actual) native-speed performance.

      You WOULD get a hit on memory consumption though, those modules need RAM, certainly.
      • Re:OK... good (Score:5, Informative)

        by Minna Kirai ( 624281 ) on Tuesday December 02, 2003 @12:43PM (#7610244)
        Wine is actually fast because it ISN'T an emulator

        The oft-repeated tagline "Wine is not an emulator" is false. It would only be true if the word "emulator" meant "hardware emulator".

        It does not. Although most people think of CPU virtualization when they hear the word "emulator", that is not necessarily the case. According to dictionary definitions, WINE is emphatically an emulator.

        Here's the defintion:
        1. 3.
        2. Computer Science. To imitate the function of (another system), as by modifications to hardware or software that allow the imitating system to accept the same data, execute the same programs, and achieve the same results as the imitated system.

  • by Steve 'Rim' Jobs ( 728708 ) on Tuesday December 02, 2003 @11:47AM (#7609626) Journal
    Surely it is illegal to copy the ntfs.sys driver and distribute it in another operating system, seeing as how it is a part of Windows.
  • First? (Score:5, Insightful)

    by Anonymous Coward on Tuesday December 02, 2003 @11:48AM (#7609635)
    Project includes the first open source MS-Windows kernel API for Free operating systems

    Surely that would be ReactOS, where he got a lot of the code from.

    But still, so it begind. First NDIS drivers now FS drivers. Next up it will be a GDI wrapper for X so you can use Windows binary drivers with your graphics card.

    All of this is a complete waste of time though. When did Open Source simply become a way to avoid paying for Windows?
    • When did Open Source simply become a way to avoid paying for Windows?

      When windows became the dominant operating system.

    • All of this is a complete waste of time though. When did Open Source simply become a way to avoid paying for Windows?

      I think Open Source was more a way of having access to your materials the way you need to. Chances are if you want to read/write an NTFS partition, you've got a machine running Windows, or accessing something that Windows has been working with.

      Grow up.
  • by jamonterrell ( 517500 ) on Tuesday December 02, 2003 @11:49AM (#7609655)
    A vulnerability has been found in the latest version of knoppix. The vulnerability exploits one of several bugs found in NTFS.SYS and allows any user with access to the drive to render the system useless(moreso than simply using NTFS.SYS already does).

  • You hit it... (Score:5, Insightful)

    by lukewarmfusion ( 726141 ) on Tuesday December 02, 2003 @11:50AM (#7609665) Homepage Journal
    right on the head. I'm still trying to make a real step into a Linux partition. I've been using Knoppix live and so far my bosses are mostly just confused. This might help me show them (and thus provide me a box to install on) how easy (and cheap!) this stuff really is.
  • Knoppix (Score:5, Interesting)

    by arikb ( 106153 ) * on Tuesday December 02, 2003 @11:50AM (#7609670) Homepage
    I think that we'll probably see this in Knoppix pretty soon.

    I wonder how it's going to be done in Knoppix, without distributing a commercial DLL with the CD. Perhaps the following scheme could work:

    1. Look for NTFS partitions and mount them with the R/O driver
    2. Scan those folders for the dll and copy it into the ramdisk
    3. Unmount the partitions, then remount them with the Windows dll for r/w

    Tricky. Depends on having the DLL somewhere on the disk.

    -- Arik

    • Re:Knoppix (Score:5, Insightful)

      by homer_ca ( 144738 ) on Tuesday December 02, 2003 @11:57AM (#7609763)
      Sure it could work. The kernel NTFS driver is reliable enough in read-only mode. If you have NTFS partitions on your computer, you most likely have an installation of Windows where you can copy that file. It just has to search all NTFS and FAT partitions for \WINNT or \WINDOWS. This won't work if you don't dual boot and have removable media formatted with NTFS.
    • Re:Knoppix (Score:5, Interesting)

      by tsetem ( 59788 ) <[tsetem] [at] []> on Tuesday December 02, 2003 @12:06PM (#7609884)

      > 1. Look for NTFS partitions and mount them with the R/O driver
      > 2. Scan those folders for the dll and copy it into the ramdisk

      mount -t ntfs /dev/hda1 /ntfs
      if (-e /ntfs/winnt/system32/drivers/ntfs.sys)
      cp /ntfs/winnt/system32/drivers/ntfs.sys /ramdisk
      umount /ntfs
      if (-e /ramdisk/ntfs.sys)
      # Do Wrapper voodoo here.

      Doesn't seem to conceptually hard (or tricky) to me.
    • the tricky part (Score:4, Insightful)

      by twitter ( 104583 ) on Tuesday December 02, 2003 @12:17PM (#7609983) Homepage Journal
      The tricky part is the usual M$ interoperability problem, Microsoft will break it. As soon as you figure out how to use it, M$ can pull a "system update" that changes everything right under you. They can even make it so that you harm your system or destroy information if you try to use it. They have done this for other sytems as far back as DRDOS []. It would not be hard for them to put in a flag that they know about, but you don't. It's Microsoft, they suck, use it at your own risk.

  • Fsckin' Great... (Score:2, Insightful)

    by DeionXxX ( 261398 )
    That's just great, I don't think there is a more annoying thing when dual-booting than not to be able to share files between the goddamn installations. Hopefully with this, each OS won't feel like it's on a different part of the goddamn universe.

    BTW How did people get around this issue before Read/Write access to NTFS? Did they have a FAT32 partition or something that both of the OS installations shared? I never took too much time to look into it because it wasn't too much of a problem for me.

    • Meh, after a while of hassling with fat32 drives and ro ntfs support, I just decided that I don't really care about whats on the windows drive. It pretty much just exists to run a few games, so I keep all the important stuff on an ext3 (gives me at least a little read support in windows), and just use Linux for most everything. If the windows drive explodes, or if the windows installation craps out, who cares? Just a bunch of game files which I can always bring back from cd.
    • Re:Fsckin' Great... (Score:5, Informative)

      by blixel ( 158224 ) on Tuesday December 02, 2003 @12:18PM (#7609994)
      How did people get around this issue before Read/Write access to NTFS? Did they have a FAT32 partition or something that both of the OS installations shared?

      Linux is my primary O/S. I only use Windows to uhh... well... I'm not sure what I use it for since I haven't booted to it in a couple of months. But I still have it on another partition.

      Anyway - I have my external Firewire drives formatted as EXT3 and I use Mount Everything [] to read/write to them under Windows. Not a free program though.

      This is another solution [] you can try for reading/writing to Linux partitions under Windows. This one IS free.

      And one final idea [], also not free - and probably rendered obsolete by today's announcement of this Captive project - but it's another source never the less. This is for reading/writing to NTFS partitions under Linux.

      I'd like to give credit to the people who pointed out these links to me but it was a long time ago and I don't remember who they were.
  • by October_30th ( 531777 ) on Tuesday December 02, 2003 @11:50AM (#7609672) Homepage Journal
    Is there any free-as-beer software for Windows that would let me access (rw) my ext2 and ext3 partitions from Windows?
  • by SharpFang ( 651121 ) on Tuesday December 02, 2003 @11:52AM (#7609686) Homepage Journal
    ntfs.sys surely can handle that, but what about the database? Ownership, permissions, sharing, all that stuff Microsoft boasts to have much better than Linux (better gradation of permissions in operations). That's pretty essential and would require pretty big amount of Microsoft backend software.
    • No kidding, that's the first thing I thought of... I can't imagine this hack provides any of the security functionality at all, and that should send shivers down any Linux user's spine.

      Why wuold you install Linux, and then go ahead and mount what will essentially end up being a world-writeable volume? Other than for emergency or migration purposes, this makes no sense to me at all.
    • Ownership, permissions, sharing, all that stuff Microsoft boasts to have much better than Linux (better gradation of permissions in operations)

      Such boasts are obviously proved empty by full read write access from a boot disk. If you want to perpetuate Microsoft's insecure, performance lame and unportable database tables of files and users for permisions, you will have to buy into Microsoft's Next Generation rootkit, aka Longhorn, with a cripled bios motherboard and explosives on the hard disk. If you thi

      • by danheskett ( 178529 ) <danheskett AT gmail DOT com> on Tuesday December 02, 2003 @12:23PM (#7610029)
        Such boasts are obviously proved empty by full read write access from a boot disk
        Any non encrypted filesystem would have all access controls subverted when mounted under a foreign operating system. Claiming anything else is absurdity. Do you think that ext2 holds the chmod based security when I mount it up under a box that it wasnt created under? You do realize that any user with root on any Linux box could simply reset all the attributes meant to keep users off/let them in under a different box?

        Why would you hold MS to fault for something that is unversial and by its nature fundamental?
    • >Ownership, permissions, sharing, all that stuff

      That horse has been out of the barn for years. Once I have physical access to a computer, I can boot from an NTFSDOS floppy or CDROM and ignore all NTFS security.

      This doesn't make things less secure. It may remind people that without physical security, there is no data security.
      • What about the flipside: could you implement this driver somehow so that it followed permissions at some level? Can you modify nfts permissions from Linux? (Never messed with this...) Does windows have any problem if I were to create a file on an NTFS partition from Linux and then move to Windows? In this situation, what are the default permissions for any files created? (Wide open, inherited, etc.)
  • by Steve 'Rim' Jobs ( 728708 ) on Tuesday December 02, 2003 @11:52AM (#7609689) Journal
    This is similar to the current situation with Quicktime, Real and WMV playback on Linux - there is a technical solution, but it is illegal. Unfortunately, it is doubtful that the companies developing these secret formats will ever port to Linux, and even less likely that they will make them open source.
  • I wonder... (Score:4, Insightful)

    by hookedup ( 630460 ) on Tuesday December 02, 2003 @11:52AM (#7609690)
    With the advent of 'WinFS', and now NTFS on long until we see a 'NixFS'

    From what i've read about WinFS, a *nix 'version' would be quite nice.
  • Useful (Score:5, Interesting)

    by mc_wilson ( 619464 ) on Tuesday December 02, 2003 @11:52AM (#7609693) Homepage
    This would be very useful if you have an unbootable windows partition. I had problems with my logon file in XP once. I had replaced it to try something and ended up hosing my system. I had the file backed up but I couldn't use the Windows XP command line recovery because it couldn't logon and I couldn't copy it back over in Linux because of poor NTFS support. This would help people being able to fix the same or similar problems.
  • How stable? (Score:5, Interesting)

    by teslatug ( 543527 ) on Tuesday December 02, 2003 @11:53AM (#7609703)
    I don't care if it's not free as in speech. I've been waiting for a long time for some stable read/write support for my dual-booting system. If it's as stable at reading/writing as Windows, then this will be a great hack.
  • by BACbKA ( 534028 ) on Tuesday December 02, 2003 @11:53AM (#7609707) Homepage Journal

    It would be perfectly legal for Knoppix to *know* that you might have an NTFS.SYS around on your computer, look around to see whether this is the case, and if it is, use your own copy NTFS.SYS.

    Of course, Knoppix will never itself be packaged with the NTFS.SYS. But if you have an NTFS partition, you have a damn good chance of having an NT around as well, with the driver right in there.

    I can only hope that MS doesn't insert some nastiness into the NTFS.SYS that would prevent it from running inside the framework described in TFA.


  • by RLiegh ( 247921 ) on Tuesday December 02, 2003 @11:53AM (#7609708) Homepage Journal
    'free as in warez'? Hell, that's nothing new.

    as a knoppix user, I hope to hell this stays WAY AWAY. Microsoft has published a good deal of api's for writing device drivers; it would be a better idea to develop OSS device drivers that allow read/write access to ext2/ext3/reiserfs filesystems instead.

    Would be better legally, as well.
    • I have to say I'm impressed with this NTFS hack, and it would be useful for me, but developing OSS ext2/ext3/reiserfs drivers for Windows would be equally useful. I use Explore2Fs and it's OK, but I'd rather have the support in Windows itself. This idea has never occurred to me, and it probably hasn't occurred to many others as well.
      • Re:MOD PARENT UP (Score:3, Interesting)

        by JKR ( 198165 )
        Partly that's because writing filesystems ain't like dusting crops, boy; even if you have the specs. For MS that means buying the IFS (installable filesystem) driver kit, for $1000, and I believe it's only available under NDA.

        I would like to see ext3 for XP, and UFS too. Windows JFFS2 drivers for removable smartmedia would be nice too, but these things are a bitch to port. Ideally, you'll have a full debug (checked) build of XP and a second XP machine to run a kernel debugger on. One mistake in IFS code and

    • No.. free as in fair use. If someone has the particular driver on their system, then that person should be able to use it on the same computer under a different operating system no?

      Writing ext/reiser drivers for windows would fulfil a different niche, (linux user switching to windows perhaps?). This is intended for windows users, who already have ntfs filesystems, switching to linux.
  • by unfortunateson ( 527551 ) on Tuesday December 02, 2003 @12:00PM (#7609804) Journal
    It would not seem unreasonable for the ntfs driver to be copied to a USB key or other media to be used at boot time.

    Optimally, like the other suggestions, this driver should be moved during config time, but I would be willing to load it my USB doohickey prior to booting Knoppix/Mandrake Live/whatevernix.

    I have valid Windows NT/2000/XP licenses on my machine, or I wouldn't have the NTFS partition to begin with. Maybe that's not a guaranteed assumption, and IANAL, but I don't think it would put too many MS lawyers on alert if it were done that way.

    Perhaps a copyright/license file stating "These files are to be used on computer systems with valid Windows NT/2000/XP licenses only." when they are copied to the USB Key.
  • Call me crazy but... (Score:2, Interesting)

    by buck09 ( 212016 )
    I think it would be a good idea to get Linux to natively support NTFS partitions. That way, users of Windows would be able to boot either OS, and easily share data between the two. The way I see it, you could have a \Linux folder, containing everything execpt the /swap filesystem.

    This would be very handy to me, since I use XP for Video / Photo Editing, Gaming, and Linux for everything else.

    Am I crazy? Is this crazy talk? Why not give users the option to use Ext3, RiserFS, NTFS, etc all on the same page?
  • by Anonymous Bullard ( 62082 ) on Tuesday December 02, 2003 @12:21PM (#7610008) Homepage
    I don't do windows, but wouldn't it be preferable to put the resources towards native solutions? Also, wasn't the HPFS (OS/2) file system support part of the native NTFS project? What's become of that effort?

    If the "Captive" (?) NTFS project needs the original MS driver it might also be illegal, and plain useless when there's no ms-windows around but only data to be rescued.

    Anyways, if this project scratches someone's itches then who cares - go for it. At least one can always try pulling stuff like this under the open source skies. Try retrofitting ms-windows with non-ms-sanctioned FS support... now there's a challenge!

  • by Splork ( 13498 ) on Tuesday December 02, 2003 @12:35PM (#7610150) Homepage
    those of us on non-x86 platforms that want read/write NTFS access to external (firewire / usb2.0) drives will only suffer due to driver emulation layers like this.

    it satisfys much of the normal x86 crowd which means development of the real driver suffers.
    • NT4 came in 4 flavours, i386, mips, ppc and alpha. And presumably all of these had a driver for NTFS.
      Would these drivers, assuming you have an NT4 disk gathering dust, be a solution for non x86 users?

      Not much help if you run Linux on ARM or 68k or something but there you go.

      • Which version of NTFS? I think there were some extensions thrown on it in going to NT5/NT2000. Can anyone who knows more on this verify?

        I don't think MIPS or PPC made it to NT4. Alpha died early in NT4 cycle, maybe a service pack or two. You're looking at very old technology. This still looks like x86 only.
        • MIPS, PPC, and Alpha all had NT4 versions (fully. None of them made it to Windows 2000. The alpha version of win2k made it to Release Candidate 1 and was subsequently dumped by MS and Compaq.

          Supporting Links:
 loads/re commended/SP6/allSP6.asp
          (Notice the inclusion of an DEC Alpha download for SP6 for NT4)

  • Personally (Score:3, Interesting)

    by floydman ( 179924 ) <> on Tuesday December 02, 2003 @12:48PM (#7610291)
    I added NTFS readonly (which is safe) support in my kernel, and always add a small fat partition in my dual boot system, as a spool are between both, have been doing it for years, and am happy with it. But i still like that hack though, pretty neat work.
  • NTFSDOS (Score:4, Informative)

    by Ratbert42 ( 452340 ) on Tuesday December 02, 2003 @01:40PM (#7610743)
    I think this is how NTFSDOS [] does it. Before you use it, you install their product on a working Windows machine (with NTFS) and generate boot floppies or CDs that then include the Microsoft-owned NTFS code.
  • by moosesocks ( 264553 ) on Tuesday December 02, 2003 @03:23PM (#7611557) Homepage
    When will us Mac users get NTFS support?

    I'm not sure if you realize it, but there is no easy solution for using an external hard drive over 32gb with multiple platforms.

    As of this driver, it appears that NTFS is probably the best way to do this, as it now has Linux support.

    Windows or MacOS don't support Ext3 natively, and the 3rd party drivers are slow. Fat32 has a 32gb limit. Mac HFS+ can't be read by Windows.

    How easy could it be to write an NTFS driver for OS X?

It is impossible to enjoy idling thoroughly unless one has plenty of work to do. -- Jerome Klapka Jerome