Large Disks and the MBR

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
srg

Large Disks and the MBR

Post by srg »

Hi

It seems, from looking at the structure of the Master Boot Record, that the next hard disk limit will be 4TB. As a partition can only be 2TB in size and 2TB from the start of the disk. This the Relative sector and total sectors fields are only 32-bit.

Anyway, one thing that does confuse me is that when the BIOS is booting the disk, does it look at these or the CHS values (with it's 8.4GB limit).

Also, according to the Windows 2000 resource kit, Win95 OSR2 and Win98 only use the CHS values. Is this true, in that case does Win95 and 98 have an 8.4GB hard disk limit or do they also use the relative and total sectors fields. What about 98SE and Me?

thanks
srg

Just curiouse.
AR

Re:Large Disks and the MBR

Post by AR »

95,98,ME are all built on DOS, I think they do use the LBA Extensions in the BIOS though because FAT32 supports up to 32GB (IIRC).

The BIOS has absolutely nothing to do with the MBR, just how it has nothing to do with the BIOS Parameter Blocks in floppy disks, the bootsector containing the MBR contains code to understand the MBR and load the bootsector from the active partition into memory, the Win95b bootsector uses LBA Extended Disk Read for loading the partition bootsector at least.

When we hit the 4TB, probably not for a few years at least, they'll have to add two additional 32bit fields for a 64bit LBA Addresses, or even better, we might be able to finally drop DOS Compatible MBRs and use something better.
srg

Re:Large Disks and the MBR

Post by srg »

AR wrote: 95,98,ME are all built on DOS, I think they do use the LBA Extensions in the BIOS though because FAT32 supports up to 32GB (IIRC).

The BIOS has absolutely nothing to do with the MBR, just how it has nothing to do with the BIOS Parameter Blocks in floppy disks, the bootsector containing the MBR contains code to understand the MBR and load the bootsector from the active partition into memory, the Win95b bootsector uses LBA Extended Disk Read for loading the partition bootsector at least.

When we hit the 4TB, probably not for a few years at least, they'll have to add two additional 32bit fields for a 64bit LBA Addresses, or even better, we might be able to finally drop DOS Compatible MBRs and use something better.
hmm So if the Win95b bootsector uses LBA, it doesn't use the CHS values from the MBR (why would it want to when it can use the relative and total sectors values). In that case the Win2k online resource kit is wrong.

srg
AR

Re:Large Disks and the MBR

Post by AR »

LBA Extensions weren't a requirement until Win98, the CHS were probably just a fallback.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Large Disks and the MBR

Post by Candy »

srg wrote: It seems, from looking at the structure of the Master Boot Record, that the next hard disk limit will be 4TB. As a partition can only be 2TB in size and 2TB from the start of the disk. This the Relative sector and total sectors fields are only 32-bit.
Yes. I've mentioned this a few months ago in a different thread on this forum.
Anyway, one thing that does confuse me is that when the BIOS is booting the disk, does it look at these or the CHS values (with it's 8.4GB limit).
Old BIOSes look only at CHS values and can thus only boot below 8GB. Newer BIOSes use only the LBA values and can boot above 8GB.
Also, according to the Windows 2000 resource kit, Win95 OSR2 and Win98 only use the CHS values. Is this true, in that case does Win95 and 98 have an 8.4GB hard disk limit or do they also use the relative and total sectors fields. What about 98SE and Me?
That's not true. If the partition is marked as type 05 or 0B it's read with the CHS method (if the BIOS supports it...) and it will then make very weird bugs over 8GB (seen a box wrecking its own hd on a 13GB harddisk). If it's 0F or 0C however it'll be read with LBA and not cause a problem.
... because FAT32 supports up to 32GB (IIRC)
Well... it supports at least 32GB, but it also supports more.
2^9 bytes / sector * 2^6 sectors/cluster * 2^28 clusters / partition = 2^43 bytes / partition = 8 terabytes maximum.
why would it want to when it can use the relative and total sectors values
Because old disks can't do LBA (yes, compatibility) and because they're in the exact format for the BIOS call for read sector. You can just pluck them off there and use them verbatim, causing less trouble.
LBA Extensions weren't a requirement until Win98, the CHS were probably just a fallback.
IIRC, they still aren't.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Large Disks and the MBR

Post by Solar »

And because nothing convinces like hands-on experience, I'm using a 120G hard drive with Win98 SE, no problems.

(And before someone shouts bloody murder, it's a Linux dual-boot system, with Windows used for gaming only so Win98SE does fully suffice. And it's the only Windows I've got a license for. :-D )
Every good solution is obvious once you've found it.
AR

Re:Large Disks and the MBR

Post by AR »

BIOS must support INT 13h During the boot process, Windows assumes that support for communicating with the boot device, either hard disk drive or CD-ROM drive, is present in INT 13h when Windows loads because the NT Loader uses calls to INT 13h to access the disk. INT 13h support must comply with the "BIOS Enhanced Disk Drive Services - 2" specification and the "USB Mass Storage Specification for Bootability," The newer specification is considered the authority if the two specifications contradict each other.
http://www.microsoft.com/whdc/device/storage/usb-boot.mspx
I am aware that this page is on booting USB based devices but it appears to be referring to the boot process in general when it says "Windows assumes that support for communicating with the boot device, either hard disk drive or CD-ROM drive, is present in INT 13h ... must comply with the 'BIOS Enhanced Disk Drive Services - 2'"

I probably should point out that the LBA interface does work on drives without LBA support, the BIOS automatically translates the geometry. The only problem with LBA is if the BIOS itself doesn't have the interface, in which case you wouldn't be using more than an 8GB harddrive, or at least the active partition's bootsector would have to be in the first 8GB.

FAT32 does support more than a certain amount which I can't remember exactly, but Microsoft capped the maximum size Windows will let you create. Creating a large FAT partition is just stupid anyway, the filesystem is awful.
Post Reply