bootsector "total number of sectors" confusion

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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

bootsector "total number of sectors" confusion

Post by Pype.Clicker »

hello.

somehow odd ... i have a FAT12 floppy image (the good old 1.44MB "grub image" in case you wonder) whose "total number of sectors" field is 2879 rather than 2880 ... Iirc, this one was formatted using "mkdosfs" tool and i don't think i touched personnally at the bootsector.

Probably any tool would ignore this but mtools (3.9.9 icuw) just complains about "Total number of sectors not a multiple of sectors per track!"

Anyone of you has been toying with FAT and BPB recently and has clue on what the proper value should be ?

(crawling the FAQ at the same time ...)
octavio

Re:bootsector "total number of sectors" confusion

Post by octavio »

Pype.Clicker wrote: hello.

somehow odd ... i have a FAT12 floppy image (the good old 1.44MB "grub image" in case you wonder) whose "total number of sectors" field is 2879 rather than 2880 ... Iirc, this one was formatted using "mkdosfs" tool and i don't think i touched personnally at the bootsector.

Probably any tool would ignore this but mtools (3.9.9 icuw) just complains about "Total number of sectors not a multiple of sectors per track!"

Anyone of you has been toying with FAT and BPB recently and has clue on what the proper value should be ?

(crawling the FAQ at the same time ...)

floppy fat 12 partition uses the full disk,so it is
2880 but not because "Total number of sectors not a multiple of sectors per track!" ,modern hard disk don?t really have tracks , and i think that partition formats should be hardware independent.
The problem is that the docs are not enought explicit and then
every programmer does his way.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:bootsector "total number of sectors" confusion

Post by Pype.Clicker »

hmm yes. checked back the MS pdf "google://fatgen103.pdf", the osfaq (well, i remember i editted that portion, so wasn't quite sure i could trust myself ;) )

a fresh mkdosfs'd floppy do contains "0B40" sectors in the 'small count' so i guess i just messed up the image without noticing. I'll check the image offered for download on the FAQ doesn't suffer the same problem and fix it if it does...

oh, btw, found a nice page about GRUB's internals ... might worth checking later.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:bootsector "total number of sectors" confusion

Post by Candy »

Pype.Clicker wrote: oh, btw, found a nice page about GRUB's internals ... might worth checking later.
Sorry, this GeoCities site is currently unavailable.
The GeoCities web site you were trying to view has temporarily exceeded its data transfer limit. Please try again later.
Are we turning into a miniature slashdot nowadays? :)
Post Reply