Author Topic: bootloading dos and or xp  (Read 30376 times)

Offline dreamaco

  • Jr. Member
  • *
  • Posts: 19
Re: bootloading dos and or xp
« Reply #30 on: August 09, 2011, 03:53:01 AM »
Ya, also wanted to mention some fileysystems seem to "belong" together more than others with a MBR / GUID.

FAT-16 and FAT-32 usually comes with a MBR, and FAT-12 usually comes without a MBR, one could stop there but..
for example, using MBR with any filesystem, even FAT-12 is how you could get "superfloppy format or ZIP casette format, if anyone remembers those, very common in studios storing audio onto, as 1.4MB floppys where tad tiny to say the least).

I remember these used MBR's but they had a twist; only the 4th item of the partition table would be used, and the other 3 partitions had to be zeroed out. Also the 4th item had to have special set parameters in it CHS fields.

Anyway what I really wanted to say was;
It seems BIOS has much stopped looking at things like what bus a device uses to determine if its a floppy or HD etc. Instead they look at actual content of the first sector, determining is it a bootsector or a MBR.

If BIOS finds a MBR; it thinks it's a HD, regardless what media it really is on, and you get all advantages it brings.. the fine thing with this I find is.. that INT 13h extensions are enabled so you could use LBA instead, Thats's a big one, really useful!

This way you don't have to use CHS and disk geometrics with all its confusion.
So, putting a MBR on any media any filesystem is great way to make loader able to use simple tiny allaround loaders without special cases and fallbacks.

So for example..if first sector of media .. BIOS goes snooping to find something about it.
- If BIOS finds a MBR with 1 or several items, it would normally think of it as a HD.
- If it finds a MBR with only 4th item filled in, it would think of it as a superfloppy (this I think also has INT13h ext enabled)
- If it finds no MBR only a bootsector, it would think of it as a floppy (normally this wouldn't have INT 13h ext, but I think I've had a buggy BIOS that DID allow, but most shouldn't allow this as should)

Fooling media to be HD by putting a MBR regardless of what filesystem. And have smaller more simple loaders..

I've found this to be reliable.

Hope this helps! :)

EDIT: Some scary details next; The filesystemID of an partition in the MBR does also play a role if INT 13h ext is to be on or off.
This is a terrible way to intermix standards I feel. What does filesystems have to do with how you want to access the media?
But legacy and standards makes terrible mess.. For example 0c means LBAmapped (INT 13h extension enabled) FAT32. While 0b means the same with no INT 13h extension. So the filesystem DOES matter in that sense. This is what I didn't want to talk about details in the first place if not needed. There are ALOT of them.. 
For a better list check any list over MBR filesystem ID's, for example

« Last Edit: August 14, 2011, 12:34:12 PM by dreamaco »