Page 2 of 2
Re: Bootloader things.
Posted: Fri Apr 24, 2009 10:01 am
by likeagunfire
Oh nevermind! It really does works with BPB on USB stick
!
Thank you Dex really much *worships*. By the way, do you mind if I ask you to give me some web page of what BPB really is and what it does. I did not find anything related to BPB in osdev wiki using BPB as a key word...
Re: Bootloader things.
Posted: Fri Apr 24, 2009 10:09 am
by Love4Boobies
Did you try Wikipedia or at least Google? You need to improve your searching-for-info skills.
The BPB (BIOS Parameter Block) is a data structure that some file systems (like FAT) have. It has nothing to do with BIOS; its purpose is to describe the layout of the volume. It is standadized by ECMA-107 and ISO/IEC 9293 so you can go ahead and read one of those document.
Re: Bootloader things.
Posted: Fri Apr 24, 2009 11:13 am
by Dex
Its part of the FAT file sys
http://support.microsoft.com/kb/140418
When a disk is formated FAT, it writes info to this structure about the formating
Bytes Per Sector ?
Sectors Per Cluster ?
Reserved Sectors ?
FATs ?
Root Entries ?
Small Sectors ?
Media Descriptor ?
Sectors Per FAT ?
Sectors Per Track ?
Heads ?
Hidden Sectors ?
Large Sectors ?
The OS users that info to read/write to the disk, now most people think that BIOS would not care whats on the disk, but they are wrong.
You can not boot usb under floppy emulation, unless its formated FAT12 or the BIOS thinks it is, beceuse it got the BPB.
Just think how many none fat12 formated floppy have you seen ?.
Now when you add your boot sector with BPB you have two chosers you can gess what the info would be, like the boot sector i posted or you tell the boot sector install program ( DD for windows in your case) to jump over the BPB in the usb and load your boot sector from the "start" label bit (you will need to make it smaller by the size of the BPB + jump etc).
But in usb case, its best to just add what you think it should be, like above.