First Logical Cluster Help

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.
Post Reply
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

First Logical Cluster Help

Post by renovatio »

I'm trying to load a file from a FAT12 filesystem:

LBA = (Cluster - 2) * SectorsPerCluster

Why : Cluster - 2

Thanks. :)
User avatar
Khaoticmind
Member
Member
Posts: 29
Joined: Tue Nov 18, 2008 1:06 pm
Location: Brazil

Re: First Logical Cluster Help

Post by Khaoticmind »

If i got you right, and you are talking about the data area of the FAT, this happens because the first two entries on the FAT table are reserved. So the first sector of data is actually the third sector on the FAT.

Hope this helps.
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

Re: First Logical Cluster Help

Post by renovatio »

thanks, it's helpful,, but what is the first logical cluster and what does it point to?
User avatar
Khaoticmind
Member
Member
Posts: 29
Joined: Tue Nov 18, 2008 1:06 pm
Location: Brazil

Re: First Logical Cluster Help

Post by Khaoticmind »

renovatio wrote:thanks, it's helpful,, but what is the first logical cluster and what does it point to?
that depends, first logical sector of where? :)
If its from the disk than it points to the first physical sector of the disk.
If its the first logical sector of the data area it points well... to the start of the data on the fat, which probably is not the first logical sector.

If this maybe of some help, you can take a look at my bootloader to see if it makes things clearer for you
http://code.google.com/p/the-kos/source ... t/boot.asm

Cheers
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

Re: First Logical Cluster Help

Post by renovatio »

many thanks for your reply... :)
Post Reply