Bootloader things.

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.
likeagunfire
Posts: 11
Joined: Wed Apr 08, 2009 2:21 pm

Re: Bootloader things.

Post 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...
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Bootloader things.

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: Bootloader things.

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