Working NTFS read/write, build driver

All development related issues welcome

Moderator: Moderator Team

Post Reply
Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Working NTFS read/write, build driver

Post by Nmn » Thu Mar 02, 2006 11:30 pm

Hello, i have ntfs read/write working from... no pun intended, windows. Now, i am going to ATTEMPT to port it to a Windows NT/ReactOS Driver. Now, i would need a bit of help setting it up. reactos.. and windows.. wont just accept a driver out of nowhere, But i cant find out what registery and system changes i need to make. Also, im having a bit of trouble setting up my development enviroment to write this driver. Can anyone give me a driver base and some info on how to test install? (This driver is based off of the NTFS linux drivers. This driver seems to work a little more often though.)

As soon as it works, i will give the source, and the credits. Just a note, i did not do the actual original porting, someone ported it to dos first, then i got it to compile for windows and it exploded from their. I may only give credits to the people who made and originally ported this driver.

Err, does anyone want it so they can access there NTFS registery via a slightly modified regedit?(reactos's of course)

Thanks, hope soon we can all use ntfs... and of course, be able to boot in it, which means modification of the installer, boot loader, kernel(i think), and many core parts.

Moderator Team
Posts: 838
Joined: Sat Nov 27, 2004 3:40 pm
Location: Sweden, Växjö

Building environment...

Post by Jaix » Thu Mar 02, 2006 11:46 pm

I like that! I can't help you with techniques regarding the drivers, but I can point a wiki about installing ReactOS building environment and hot to get the latest SVN build down and made. This page includes links to two wikipages about these issues.

By the way I think it's a good idea to talk to someone on the IRC to find out who is responsible for FS-drivers and I also think the new cache-manager possible needs some work before everything will work.

Good luck!

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Working NTFS read/write, build driver

Post by Nmn » Fri Mar 03, 2006 3:55 am

I have the official microsoft driver kit. the DDK. ill keep working on this project.

Posts: 508
Joined: Mon Apr 25, 2005 12:46 pm

Post by ThePhysicist » Fri Mar 03, 2006 4:52 am

There is already an NTFS driver in the ROS source code, and I guess it is taken from NTFS linux also. You could use it to start. As yours is based on the same code, it might be easier to change the existing driver than to write it from scratch.

But the question is: how secure is your code?
I would really like to see an NTFS driver in ROS, but I would prefer a secure readonly driver to an unsecure read/write driver. I guess nobody wants to mess up their Windows system ;-)

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Working NTFS read/write, build driver

Post by Nmn » Fri Mar 03, 2006 6:27 am

Its simple and secure: It never has failed reading for me, and if in any case it ever fails to write(like on compression), it doesnt write to disk(becuase it checks to see if possible, if it knows how, and tests it in memory)

Data writing works. I have failed in all tests to make the utility crash, no matter what. Ive gotten it to fail, but never crash. Also, if something DOES go wrong, insert your windows CDROM, go into the Recovery Console(Windows XP: press R at first screen, should say at bottom of display) and type FixMBR and i think your drive. If that doesnt work, type FixMBR /? to get the specs on what to type. Do this for all of your partitions/drives, no matter what warnings it gives you. If you have bootup trouble, i urge you to FixBoot before trying to repair windows(Going to install and pressing R on the windows copy it will show in the list). As for the driver, i found i needed a differend cd. Not DDK, but IFS. Fucking Microsoft. anyways, im getting it, and making sure theres no other way.

EDIT: Yeah right, i take every chance i get to remove ms features even if it takes virus. Then of course, thats why i made a knoppix 4 dvd.

But DAMN!!! They took out Wine on this release. Whats wrong with them? WHAT? *cries*

About the included drivers: Failed to build them. I am SO used to an IDE. I mean, i messed around in FreeDos and the command prompt to learn the limits and howtos, but its very hard to remember those MinGW commands no matter how simple. Maybe im just stupid. But strangly.... i noticed something... There is NO inf support. This ntfs driver is useless without a reader or installer of some sort. I know, i suck.... but as soon as i finish this, i HAVE to work on an INF parser. I already made an INI parser, which parses any type of ini for reading, and inf is no more than an ini type that is geared towards the ability to install hardware drivers and sometimes even software.

Posts: 93
Joined: Thu Dec 23, 2004 9:06 pm
Location: España (Spain)

Post by Sarocet » Fri Mar 03, 2006 6:27 pm

The first paragraph is ok, but the second one... well, seems dangerous.

A FS driver shouldn't touch the mbr (should it?) as it's outside the file system.
If it can break my mbr, well, i think it can be dangerous to use with files i want to keep.
With NTFS driver problems i always undertood that the problem was with having windows driver understanding it as the specification changes from driver version to version so existing ntfs drivers are compatibles with itself but maybe not with the driver installed on the other partition.

Of course, if files get corrupted, you can lose the ability to boot that window if it can't find/load its files: ntldr, ntoskernel, etc.

I comment here a trick if you can't get windows to boot after some partition problems. If the cilinder number is wrong, you can't get windows by usual methods, nor even trying to reinstall it from CD (it returns on the first reboot). So you need to use sys command from MS-DOS/previous windows version, then that tool fixes it and you can restore your computer. It's a horrible error with documentation lost on the msdn. Luckily, ros can boot from CD.

Now, i like your project. Tell me if i can help you to do it. Sadly, i'm newbie in driver programming but sure some thinks won't need specific knowings and i'm interested in it, which is important in getting something wirking. Happily, humans can learn :). And it'd be easier to understand with a developing side to the theory which is explaining it.

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

MBR - Working NTFS Driver

Post by Nmn » Tue Mar 07, 2006 11:46 pm

Dont worry, Generically that is in any situation i use FixMBR. This includes when an I/O error occurs and something goes crazy, it can end up messing up something such as the MBR, but it hasnt happend yet. Also, the mirror windows keeps of your mbr should keep everything ok. Dont worry.

Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord » Sat Mar 25, 2006 10:26 am

you need offcial IFS kit from microsoft or look at reactos vfat driver

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Working NTFS read/write, build driver

Post by Nmn » Mon Apr 03, 2006 7:00 am

Which... I have.

However,im now in linux. I think ReactOS has its own IFS to subsitute for developers who dont have windows. Ill run ReactOS in bochs and work on this. Can anyone aid me in a 2 gb harddrive image with 1 fat partition 1gb and 1 ntfs partition 1 gb? I myself cannot find software to make such...
Last edited by Nmn on Tue Apr 04, 2006 5:37 am, edited 1 time in total.

Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

Post by oiaohm » Tue Apr 04, 2006 2:14 am

Mingw ships with DDK that has a incomplete ntifs.h. This is the header required to build filesystem drivers. Ok it might need addons The coder that developed it. Some handy examples are there.

OK answered this one before. Its simple.

You need a working disk that can make the parts you need.

Make a blank file the size you want ie 2 gig.

Use some form of part maker fdisk make the partition. Even windows XP install CDrom can be used to do this.

Learn about loop back mounting this can be handy as well.

Mingw is cross platform. Ie the IFS sub is in mingw lacks documentation really lacks documentation.

I would recommend 2 images 1 with XP installed to test if the drive you are working with is still fine. 1 image with the two part.

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Post by Nmn » Tue Apr 04, 2006 5:36 am

I know about fdisk, i hadnt opened my mind. Also, no need for loopback devices, but i do understand. how do you think i used to play windows games that i -


I didnt think about this. As for a 2gb blank file, ok.

Thank... you!!

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Post by Nmn » Sat Apr 08, 2006 12:29 am

Hey guys, letting you know that im going to go Qemu and run my official IFS. My wallet is never empty for reactos! And i mean NEVER.

speaking of which, im going to buy a new testing box with a nvidia seven something thousand. I think its time someone tried to get graphics driver support into the kernel, so i may give it a shot. Of course, this is a HUGE project, even bigger than ntfs. So ill finish ntfs first. Ill use GRUB as refrence for ntfs in a bootloader(Yep, thats right.. Grub loads NTFS too!!)

So, the driver will be revived! i hope i can finish quickfully and painless.

Posts: 318
Joined: Wed Jun 15, 2005 8:19 am

Post by geertvdijk » Sat Apr 08, 2006 12:43 am

Nice to see you we still on this... It looked so promising until I didn't see any talks inhere... I hope you succeed. Good luck!

Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Post by Nmn » Mon Apr 10, 2006 1:26 pm


Ive gotten read access: with there BUILTIN one.

Comon guys, setting up a build enviroment is easy. I couldnt do it in linux, but windows is another story.

get this:
and this: ... -3.4.4.exe

Just go into your ReactOSBe folder, make a folder, right click it, go to tortoise svn, and select export. Only thing left is to get the url to the repository and press ok. Besides that, right click your reactbe-env bat file and add the following code(Remember to change reactos-source to the name of your dir.):

@echo off
cd reactos-source
@echo on

for added comfort, anyone can copy there mingw32-make.exe file and rename the copied one to make.

So now, go into your reactos build enviroment. its in the start menu. You can now simply and painless, type one of these(i think theres more):
make livecd (live cd)
make bootcd (installer cd)
make reactos (in your source/reactos folder, all files are layedout like they are installed.)
make clean (if you changed anything in the source, even pic/sound, do this and then another make command.)

Finally! im testing another method too.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests