Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
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 ) on Tuesday December 02, 2003 @12:47PM (#7609615)
    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?
  • by Steve 'Rim' Jobs ( 728708 ) on Tuesday December 02, 2003 @12:47PM (#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.
  • Knoppix (Score:5, Interesting)

    by arikb ( 106153 ) * on Tuesday December 02, 2003 @12:50PM (#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

  • by October_30th ( 531777 ) on Tuesday December 02, 2003 @12:50PM (#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 @12:52PM (#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.
  • by Steve 'Rim' Jobs ( 728708 ) on Tuesday December 02, 2003 @12:52PM (#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.
  • Useful (Score:5, Interesting)

    by mc_wilson ( 619464 ) on Tuesday December 02, 2003 @12:52PM (#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 @12:53PM (#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 RLiegh ( 247921 ) on Tuesday December 02, 2003 @12:53PM (#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.
  • by Anonymous Coward on Tuesday December 02, 2003 @12:54PM (#7609715)
    "I think that we'll probably see this in Knoppix pretty soon."

    Knoppix won't provide ntfs.sys because that is copyrighted by Microsoft. Now knoppix may allow loading the driver if you have nt/2000/xp on a hard-drive, but won't you need to load the linux ntfs driver first, if it's on an ntfs drive?

    This may be a helpful idea for the short-term, but you're better off with more free-open-source-driver.
  • by TiggsPanther ( 611974 ) <[tiggs] [at] [m-void.co.uk]> on Tuesday December 02, 2003 @12:54PM (#7609718) Journal
    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.
  • Re:OK... good (Score:4, Interesting)

    by gl4ss ( 559668 ) on Tuesday December 02, 2003 @12:56PM (#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:5, Interesting)

    by caseih ( 160668 ) on Tuesday December 02, 2003 @12:56PM (#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.
  • by gimpboy ( 34912 ) <john.m.harrold@g[ ]l.com ['mai' in gap]> on Tuesday December 02, 2003 @12:58PM (#7609776) Homepage
    And if it isn't in a certain folder in the Windows base directory, Windows can't find it anyway. So it's just a matter of finding the base directory, and grabbing it from there.

    so knoppix can probably find out where windows is installed by examining the bootloader for windows. i believe it points to the windows installation directory (which device, directory, etc.).
  • Call me crazy but... (Score:2, Interesting)

    by buck09 ( 212016 ) on Tuesday December 02, 2003 @01:00PM (#7609807) Homepage
    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 k98sven ( 324383 ) on Tuesday December 02, 2003 @01:02PM (#7609833) Journal
    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???
  • by ShavenYak ( 252902 ) <bsmith3 AT charter DOT net> on Tuesday December 02, 2003 @01:03PM (#7609841) Homepage
    Actually, I have another use for it. Back when I had a Win98 dual-boot box, I could run Quake III under Linux with a symlink for the PAK0.PK3 file pointing to my FAT32 partition. On my current XP/Linux box with an NTFS partition, it didn't work - I had to copy the file to my ext3 partition, wasting a scad of diskspace. I'm guessing that QIII opens the .PK3 files r/w and errors out if that fails.
  • by sethadam1 ( 530629 ) * <ascheinberg@gmai ... minus physicist> on Tuesday December 02, 2003 @01:03PM (#7609845) Homepage
    Good ol Seth Nickell and Storage [gnome.org]. WinFS-ish to be sure.
  • by stevey ( 64018 ) on Tuesday December 02, 2003 @01:05PM (#7609871) Homepage

    But the NTFS driver would be on the Windows partition, which would be an NTFS filesystem - right?

    So presumably the setup looks like this:

    • Mount the NTFS filesystem RO with the normal kernel driver
    • Copy the ntfs.sys driver to /tmp
    • Unmount the NTFS filesystem
    • Mount it RW using the copied driver

    Seems to me that either just "stealing" the ntfs.sys driver (wonder if it gets changed by different service packs?) or using the normal kernel one would be far easier.

    But then again I don't use Windows so I have no NTFS partitions..

  • Re:Knoppix (Score:5, Interesting)

    by tsetem ( 59788 ) <tsetemNO@SPAMgmail.com> on Tuesday December 02, 2003 @01: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.
  • One reason (Score:1, Interesting)

    by Anonymous Coward on Tuesday December 02, 2003 @01:12PM (#7609936)
    If your windows directory was clobbered (e.g. by a virus) or corrupt (e.g. sector failre), you won't have access to this DLL.

    Besides, Knoppix *already* includes NTFS support. It works just fine (A non-techie friend's computer became non-bootable. I used Knoppix to back up what he needed on system to CD, then replaced a few critical DLLs to get things to work again).
  • Re:MOD PARENT UP (Score:3, Interesting)

    by JKR ( 198165 ) on Tuesday December 02, 2003 @01:15PM (#7609965)
    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 it's off to bluescreen/reboot city.

    Jon.

  • by Anonymous Bullard ( 62082 ) on Tuesday December 02, 2003 @01: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 jhoffoss ( 73895 ) on Tuesday December 02, 2003 @01:43PM (#7610236) Journal
    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.)
  • Personally (Score:3, Interesting)

    by floydman ( 179924 ) <floydman@gmail.com> on Tuesday December 02, 2003 @01: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.
  • Re:How stable? (Score:2, Interesting)

    by zerblat ( 785 ) <jonas.skubic@se> on Tuesday December 02, 2003 @02:07PM (#7610472) Homepage
    If you don't care about free as in whatever, there's been stable r/w support [ntfs-linux.com] for a long time.
  • by Anonymous Coward on Tuesday December 02, 2003 @02:12PM (#7610501)
    I completely agree with you!


    Microsoft may not, though. So, a person provides a tool to grant safe access to a resource--which you own--remember, that's your data on that drive. And Microsoft has spent quite a bit of money deliberately breaking existing compatabilities. Clearly this state--incompatability--has value to them.


    It's not inconceivable that Microsoft might expend some effort to see that such a tool is not available for the public to use.


    It's kinda like the whole "fair use" issue. Fair use says functionally what you posted--what you do in your house is your business. And interested parties cannot use legal means to directly curtail your rights to fair use.


    What they can do, however, is make it technically difficult for you to exercise these rights.


    So, sure, you can read your NTFS partition in your own house. And you can do it from another OS.


    Too bad we bought off/intimidated/harassed/took out and shot the only author of the tool that allows you to do this. 'Course someone else might create such a tool, and they're free to do so. Care to try?

  • by carndearg ( 696084 ) on Tuesday December 02, 2003 @02:19PM (#7610578) Homepage Journal
    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.

  • by cant_get_a_good_nick ( 172131 ) on Tuesday December 02, 2003 @02:23PM (#7610626)
    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.
  • Re:OK... good (Score:3, Interesting)

    by tiger99 ( 725715 ) on Tuesday December 02, 2003 @02:36PM (#7610726)
    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 file writes from Windoze, and read back the changes to see what had really happened. I could do that, given some basic instructions. So. gathering info is not too hard, making sense of huge volumes of it, all the special cases, error recovery and all that sort of thing, possibly working around deliberate obfuscation, may be another matter.

    I wonder if it might be better to do a clean-room implementation of the .dll, one team, who absolutely never, ever writes kernel code, disassembles it (they may even do an instruction trace with an emulator if it helps) and writes a spec, while the other re-implements it, without having ever seen the disassembly. That is legal. The key is writing an accurate spec from the results of the disassembly.

    I don't know which method the kernel team are using, but IMHO they need more help (people, not competence, which they already have plenty of), only it would have to be meaningful and properly coordinated otherwise it would be a nuisance. Due to the past history of damaged files etc, they really ought to have many thousands of beta, or even alpha, testers on this one, and not pass the code as fit for general use until many gigabytes on thousands of different PCs have been read and written successfully. If someone would publish a to-do list, they might well find that useful assistance would be forthcoming.

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

    by caluml ( 551744 ) <slashdot@spamgoe ... minus herbivore> on Tuesday December 02, 2003 @03:38PM (#7611196) Homepage
    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:First? (Score:1, Interesting)

    by Anonymous Coward on Tuesday December 02, 2003 @03:41PM (#7611220)
    This is even better than open source. We let Microsoft foot the bill on all the standardizing and consolidation in the industry, then reap the benefits of their drivers. You may not be able to distribute ntfs.sys but who cares? who wants it? I don't. I do, however, want proprietary DX9/GL2.0 drivers for X/DRI to work now, not 3 years from now, when specs are released. I want my crap printer to work now. I want my wireless 10g card to work now.

    All of these drivers I can download for free, but they are windows only.

    What should I do? Buy better hardware that supports Open source? I can't afford it. I have el-cheapo crap hardware, with windows only drivers. Should I just use windows then?

    What abou WinModems? Even they require some microsoft emulation to work. This is just one piece of hardware that is dependent on windows. By not supporting windows in linux, linux loses a lot of device support. Due to the nature of these device's dependence on windows, linux must emulate windows somewhere.

    Windows driver emulation/loaders ARE a just cause for open source. Anything that gives linux better hardware support is good, IMO.

  • Anonymous FTP? (Score:2, Interesting)

    by mark_space2001 ( 570644 ) on Tuesday December 02, 2003 @03:53PM (#7611320)
    I couldn't get NFS working with Windows a while back, and Samaba was too complicated for this home user. So I just went with anonymous FTP.

    Everything on my home network is heavily firewalled, so there is no danger of intrusion. Anonymous FTP lets me browse my Linux box with Internet Explorer. It very convenient and easy to use. I can create, delete, rename, and copy with no problem. I haven't tried it yet (I don't run a gui on my Linux box) but using Mozilla from Linux to anonymous FTP on Windows should work exactly the same.

  • Re:HPFS (Score:1, Interesting)

    by Anonymous Coward on Tuesday December 02, 2003 @03:54PM (#7611333)
    NT was able to mount HPFS (OS/2) volumes, though I think that was dropped in 2000 or XP??
  • by moosesocks ( 264553 ) on Tuesday December 02, 2003 @04: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?
  • by SAJChurchey ( 643802 ) on Tuesday December 02, 2003 @05:12PM (#7612051) Homepage
    Does this mean that other drivers used for hardware (i.e. WinModems) might also be able to be emulated via this method?
  • Why? (Score:2, Interesting)

    by Safiire Arrowny ( 596720 ) on Tuesday December 02, 2003 @05:25PM (#7612220) Homepage
    Why *is* it harder to read from an ntfs filesystem than to write to it?

    The current ntfs kernel module is able to understand the formating of ntfs in order to read it, but shouldn't that same understanding allow them to code proper "write" access as well?

    It's obviously true that it's more difficult, but why?

UNIX is hot. It's more than hot. It's steaming. It's quicksilver lightning with a laserbeam kicker. -- Michael Jay Tucker

Working...