Understanding the work of NTFS...

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Understanding the work of NTFS...

Post 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?
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
KernelDeveloper
Posts: 15
Joined: Tue Mar 13, 2012 11:25 am
Location: Earth
Contact:

Re: Understanding the work of NTFS...

Post 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.
No one is perfect in the world!!! :)

Make sure you visit this:
http://tinyurl.com/kerneldeveloper
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: Understanding the work of NTFS...

Post 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.
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Understanding the work of NTFS...

Post 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.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: Understanding the work of NTFS...

Post 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.
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Understanding the work of NTFS...

Post by Combuster »

1d) Install an Ext2/Ext3 driver under windows
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Understanding the work of NTFS...

Post 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.)
Every good solution is obvious once you've found it.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: Understanding the work of NTFS...

Post 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.
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Understanding the work of NTFS...

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Understanding the work of NTFS...

Post 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:\".)
Every good solution is obvious once you've found it.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: Understanding the work of NTFS...

Post 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).
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Understanding the work of NTFS...

Post 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?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Understanding the work of NTFS...

Post 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...
Every good solution is obvious once you've found it.
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Understanding the work of NTFS...

Post 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.
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Understanding the work of NTFS...

Post 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.
Post Reply