Page 1 of 2

Understanding the work of NTFS...

Posted: Sat Mar 10, 2012 1:13 pm
by Yoda
Hi, NTFS profies!
Trying to dig and understand the work of NTFS. Have downloaded and read NTFS documentation from Linux NTFS project. But still have many unclear questions (even for file reading!).
As stated, if attributes don't fit to one MFT record, they pushed out to an attribute $ATTRIBUTE_LIST and located outside of the MFT record. But...
1. It is stated that attribute list can be resident, so it's data located at the same MFT record. Why?
2. If it is not resident, does $ATTRIBUTE_LIST data contain only data run list where the rest of attributes resides?
3. The description of the data of this attribute is very unclear. What is the structure of it's data in the case of residence and non-residence? Is that just a list of attributes with standard headers? Linux dox gives alternative table, but the fields are not described.
4. Do pushed attributes locate somewhere in disk space or in MFT table?

Re: Understanding the work of NTFS...

Posted: Thu Mar 15, 2012 5:58 am
by KernelDeveloper
NTFS is a burden to program.I would simply make some functions to read\write ,thats all for NTFS.You would go mad programming NTFS features.

Re: Understanding the work of NTFS...

Posted: Thu Mar 15, 2012 7:23 am
by Yoda
Yes, NTFS is monstruous file system. But there is nothing I can do about it. NTFS now is one of the most popular file systems (if count the number of drives formatted to that FS) and that will be a great bonus if I support this. Especially amongst Windows users.

Re: Understanding the work of NTFS...

Posted: Thu Mar 15, 2012 7:32 am
by bluemoon
To support windows user, there are mainly two cases:

1. You share the drive physically.
1a) On portable storage, this uses FAT
1b) On harddisk that multi-booted windows and your OS. You don't really want to interfere with NTFS drive, if you missed any undocumented steps or assumptions, which MS knows but you don't know) you may corrupt the drive or make windows un-bootable.

2. You share over the network. Do CIFS (smb).

I don't see huge advantage to even have write support on NTFS, considering the risk involved.
Having said that, the ability to read NTFS is nice to have.

ps. Even Mac OS X do not officially support writing to NTFS, they are smart guys.

Re: Understanding the work of NTFS...

Posted: Thu Mar 15, 2012 7:46 am
by Yoda
1c) On harddisk that multi-booted windows and my OS, and my OS runs in virtual file space like Ubuntu on Windows.
In this case I'll need the proper loader and disk virtualization mechanism.

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 2:32 am
by Combuster
1d) Install an Ext2/Ext3 driver under windows

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 2:36 am
by Solar
Combuster wrote:1d) Install an Ext2/Ext3 driver under windows
+1. Definitely recommendable. I do just this for years now (D:\ and /home/solar mapping to the same ext3 partition). (Although a certain few Windows applications stubbornly refuse to cooperate.)

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 5:54 am
by Yoda
What are you talking about? Driver for Windows?? Where is your OS at that time?
Look, my purpose is to run MY OS on a system that has Windows installed, has no more free space (for another partition) on user HDD and not to impel user to learn hard installation process and make risky manipulations on his working system.

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 6:22 am
by bluemoon
Yoda wrote:make risky manipulations on his working system.
The major risk is to manipulate NTFS by your OS without official document, which you could never get.

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 6:31 am
by Solar
The target audience for actually trying out a hobby OS is a bunch of people who, if they don't already have a partition set aside for just this purpose, can repartition their hard drive in a flash.

If your OS is at the point that you could work "in earnest" with that OS, demand a partition for yourself. Bundle gparted on your distribution CD, for example. If your OS is not at that point of maturity, I wouldn't want to install it in parallel to my "working" OS anyway.

Generally speaking: A maximum of one OS per partition. IMHO.

(I previously thought we were talking about data interchange, i.e. "D:\" partition, not parallel installation on "C:\".)

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 7:27 am
by Yoda
bluemoon wrote:The major risk is to manipulate NTFS by your OS without official document, which you could never get.
Say, where did I mention that I plan to manipulate NTFS by my OS??
Solar wrote:If your OS is at the point that you could work "in earnest" with that OS, demand a partition for yourself.
Say it to Ubuntu (Wubiloader).

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 7:34 am
by bluemoon
Yoda wrote:Say, where did I mention that I plan to manipulate NTFS by my OS
Did I misunderstood this?
Yoda wrote:Look, my purpose is to run MY OS on a system that has Windows installed, has no more free space (for another partition) on user HDD
So how do you run your OS on a system that has Windows(NTFS) installed, and has no more free partition, without manipulating NTFS?

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 7:52 am
by Solar
Yoda wrote:
Solar wrote:If your OS is at the point that you could work "in earnest" with that OS, demand a partition for yourself.
Say it to Ubuntu (Wubiloader).
Linux and I disagree on many things. Besides, Ubuntu / Linux has gone through the stage where it deserves its own partition, and has come out the other side (where it is actually useful for Windows-only users to have such a thing). That's a long way to go for a hobby OS...

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 9:02 am
by egos
bluemoon wrote:So how do you run your OS on a system that has Windows(NTFS) installed, and has no more free partition, without manipulating NTFS?
As variant install into MBR advanced MBR boot loader/first stage of boot manager/first stage of stage 2 boot loader from Windows. Now I making MBR boot loader that allows to make choice between booting from active partition and from any own choice sector that could hold stage 1 (completely or only its first part) for some other OS placed on the same active partition.

Re: Understanding the work of NTFS...

Posted: Fri Mar 16, 2012 9:15 am
by bluemoon
Egos: Either you or me missed the point. I totally understand chain loading, but...

He wanted to co-locate his OS at a windows NTFS partition, and at the same time he do not manipulate that drive, this is what confused me.