Slashdot Mirror


Using the Real ntfs.sys Driver Under Linux

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."

19 of 548 comments (clear)

  1. I'm not sure if we'll see it in knoppix by Steve+'Rim'+Jobs · · Score: 5, Interesting

    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.

    1. Re:I'm not sure if we'll see it in knoppix by TiggsPanther · · Score: 5, Interesting

      Wouldn't need to copy it. At least, not to distribute, anyway.

      Use the copy off the hard drive. Mount it in read-only using the normal way, copy it to the Knoppix ramdrive, and then run the driver from there.

      --
      Tiggs
      "120 chars should be enough for everyone..."
    2. Re:I'm not sure if we'll see it in knoppix by kasperd · · Score: 5, Insightful

      Surely it is illegal to copy the ntfs.sys driver and distribute it in another operating system

      I was thinking exactly the same, but there might be a way around that. Knoppix just have to contain the wrapper code, the actual .sys file can be loaded from the harddisk (if present). Systems with an NTFS formatted harddisk and no ntfs.sys file are probably rare. Problems that need to be solved are, how to verify intergrity of the ntfs.sys file you are going to load (if you care about that), and how to actually load the ntfs.sys file from an NTFS filesystem. It is not entirely a chicken and egg situation, as Linux already have NTFS read support, which is far simpler than full read-write support. Besides loading ntfs.sys would even be a user mode task, and reading NTFS from user mode is probably easier to implement than doing it from kernel mode.

      --

      Do you care about the security of your wireless mouse?
    3. Re:I'm not sure if we'll see it in knoppix by k98sven · · Score: 5, Interesting

      and how to actually load the ntfs.sys file from an NTFS filesystem. It is not entirely a chicken and egg situation, as Linux already have NTFS read support

      Um... I'm wondering here: How does Windows load ntfs.sys from an NTFS partition???

    4. Re:I'm not sure if we'll see it in knoppix by mph · · Score: 5, Funny
      Everyone would use Linux if you could install it from inside Windows.
      For sufficiently small values of "everyone."
    5. Re:I'm not sure if we'll see it in knoppix by mystik · · Score: 5, Informative

      The same way grub or lilo loads linux from a reiserfs or ext2/3 partition --- rudimentary read-only access is coded into the bootloader.

      --
      Why aren't you encrypting your e-mail?
    6. Re:I'm not sure if we'll see it in knoppix by Nevo · · Score: 5, Informative

      NTLDR does the dirty work.

      NTLDR contains a mini-NTFS filesystem driver and mini registry parser. NTLDR reads the registry and determines all of the boot-start device drivers. NTLDR loads those drivers into RAM, then loads the kernel and the HAL.

      NTLDR then passes control of the machine to the kernel, along with a pointer to the in-RAM loaded drivers so that the kernel can start those drivers.

    7. Re:I'm not sure if we'll see it in knoppix by caseih · · Score: 5, Informative

      If you read the web page and try out the driver you'll find it does exactly this. It uses code from the ntfs project (libntfs) to grab the ntfs.sys file and copy it over to use it. Therefore no distribution of microsoft binaries is needed. If it can't find the driver on your hard drive, it can download it from microsoft.com from xp sp1 (which has some interesting legal implications).

  2. First? by Anonymous Coward · · Score: 5, Insightful

    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?

  3. In other news... by jamonterrell · · Score: 5, Funny

    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).

    --
    I can count to 1023 on my hands. Ask me about #132.
  4. You hit it... by lukewarmfusion · · Score: 5, Insightful

    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.

  5. Knoppix by arikb · · Score: 5, Interesting
    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

  6. Useful by mc_wilson · · Score: 5, Interesting

    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.

  7. Re:What is this good for? by jared_hanson · · Score: 5, Insightful

    That sort of thing is exactly what this is good for. Let's say you give a Linux distro to a friend so he can try it out. This could be a Live CD or a distro that will make your system dual boot.

    In any case, your friend probably has a bunch of files on his Windows partition (likely NTFS formatted) that he wants to see if he can edit/view in Linux. If he can do what he wants, then switching to Linux becomes an option. So, with this, his NTFS partition is available and everything just works(TM). After all, your friend doesn't even know what NTFS is, but he does know when he can't get at his files.

    In short, this makes transitions to Linux much smoother. People shouldn't have to keep a copy of a file on both partitions just so its available in both environmets. It becomes a pain to figure out which document is the most recent, etc. etc. And, BTW, I'm talking about the average user who doesn't have a network drive.

    --
    -- Fighting mediocrity one bad post at a time.
  8. Re:How about the other way around by homer_ca · · Score: 5, Informative

    Merry Christmas. Here you go:

    Explore2fs

  9. Another legal way to deal with the driver by unfortunateson · · Score: 5, Informative

    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.

    --
    Design for Use, not Construction!
  10. Re:How stable? by ShavenYak · · Score: 5, Funny

    If it's as stable at reading/writing as Windows, then this will be a great hack.

    Man, talk about setting your expectations low....

    --

    Hey kids, there's only 5 days left 'til Yak Shaving Day!
  11. bah. i hate these. non-x86 users suffer. by Splork · · Score: 5, Insightful

    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.

  12. Re:OK... good by tiger99 · · Score: 5, Insightful
    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.