Filesystems, Ext2 / swap / FAT
Happy new Linux year!
Is there a guru out there who could try to explain to a newbie how the Ext2 and swap partitions are formatted? How do they differ from each other, and from FAT?
Thanks.
hpoppe@c2i.net
Linux
Happy new Linux year!
Is there a guru out there who could try to explain to a newbie how the Ext2 and swap partitions are formatted? How do they differ from each other, and from FAT?
Thanks.
hpoppe@c2i.net
by bradleyr
by hpoppe
I know how to partition. The question was abot how the Ext2 FS is organized as opposed to FAT, and how the actual formatting of the swap is done. How does the Ext2 and swap FS work? Not the partitions.
hpoppe@c2i.net
by zbrain75
To learn about the ext2 filesystem go to:
http://e2fsprogs.sourceforge.net/ext2.html
http://e2fsprogs.sourceforge.net/ext2intro.html
Many of the differences involve the fact that the FAT filesystem does not support user level security. That is, they do not keep records about the owners of files nor information about access rights. I used to be a guru on the DOS filesystem writing file recovery programs. I will try to remember and give a brief description.
The DOS filesystem is organized by sectors (512 bytes I think). In the area where files are stored, data is stored in clusters. Clusters are groups of sectors, usually 4, 8, 16, or 32. The DOS filesystem has several main areas of storage which are:
1. Boot sector
2. FAT information (sectors) - I think FAT information was originally divided into 24 bit records. It may have been 16.
3. Directory information (sectors)
4. File information (clusters)
The boot sector is where a bootstrap program may reside to passcontrol to an operating system.
The Directory information section contains sets of records for each file entry including file name, extension, date, file size, some bits such as archive, read only, system bits, and most importantly the number of the cluster the file begins on.
The FAT section is a table pointing to where the next part of the file is (when the file size exceeds the size of the cluster). If the file ends at that sector, the value is FFF hexadecimal (16 bit FAT). I believealso, the first entry in the FAT section tells the type of disk indicating the size of the FAT section, the directory section, and how many sectors per cluster. I can't remember if this is exactly correct but believe it was based on some value. Ifyou need more detailed information, I have a book about it (in my basement) and may be able to find it and look it up.
by zbrain75
(The rest of the answer)
Anyhow, this way the system knows where to look for the first part of where file information is stored.
When a file is accessed the process works like this. The system looks up the file name entry and finds the numberof the starting cluster. It then uses that value to locate the data on the filesystem. It reads the first cluster and determines by the FAT entry for that cluster where the next part of the file is. It may not be contiguous (may be fragmented). It continues until it reads the last cluster, and by the value of the last cluster, can tell the file has been read. It also uses the filesize to tell how many bytes of the last cluster to read.
Realizing the size of sectors, there is a limit to the maximum partition for a FAT filesystem. It is 512 bytes times 2^24 times the maximum sectors per cluster (I think 32).
Also there are two other types of FAT:
1. VFAT
2. FAT32
FAT32 uses 32 bit clusters and has some other enhancements. VFAT allows long filenames to be used since the original FAT only supported 8 + 3 (extension).
The original IBM Technical Reference Manual has excellent information about the inner workings of the original file systems with full details including BIOS code listings, if you can find a copy.
by hpoppe
Thanx,
your links answered most of this.
The question was a difficult one, and U get the points. Do you (or anyone else know where to get a copy of "The original IBM Technical Reference Manual"?? I'm still looking for in-depth answers to the question, and will reward 1000 techpoints to whoever can give even better answers. to get the points; mail me at: hpoppe@c2i.net.
Thanx!!!
by hpoppe
This discussion is closed to new replies.
Sort by Trending