Hi Mike,

> The list membership is not that large.  You can assume that people are 
> busy or don't know the answer.

I was grepping though a backup of our FAQ (which is down, is it
worth the effort to replay a September 2008 backup? Apparently
SourceForge server directory structure changed...) but did not
find the topic discussed.

> As far as 4K blocks go, I wouldn't worry about it too much.  512 byte 
> sectors will be supported either natively or by emulation in the drive 
> itself for a long time to come - at least 5 to 10 years.  Too many 
> existing systems depend on a 512 byte sector and manufacturers are more 
> likely to demand reasonable 512 byte emulation from the hard drive 
> makers than to do anything themselves.

Interestingly, even 3 TB disks are still sold with 512 byte sectors.
Disks with 4096 byte sectors are not always supported for booting,
but that probably depends on how new your BIOS is. Using small 512
byte sectors with multi-TB disks means that you can no longer use a
MFT based partition table. Instead, GPT partitions have to be used:

(quoting some September 2009 notes about GPT partition tables)

> Luckily EFI does not seem to be complicated - EFI partitions
> ignore all CHS values and have a partition ID of 0xef, and
> classic partitions can coexist with them...
> 
> Header, padded to suitable power of 2 size:
> 
> qword 0x5452415020494645 / EFI PART
> dword 0x00010000 version
> dword header size
> dword header crc32
> dword 0
> qword lba address of THIS sector
> qword lba address of alternate header(?)
> qword first data block of partition?
> qword last data block of partition?
> 16 bytes GUID to uniquely identify disk
> qword lba address of GUID partition entry array
> dword array size
> dword array crc32
> padding
> 
> Partition entry, 128 bytes each:
> 
> 16 bytes partition type (0 if unused)
> 16 bytes GUID to very uniquely identify partition
> qword lba address of partition start
> qword lba address of partition end
> qword attribute bits (only low bit required?)
>   (high word reserved, middle 47 bits undefined?)
> 72 bytes UTF-8 (correct?) partition name string

(end quote)

We also had a long thread on freedos-user in April 2011
about the topic "Large drives with 4k sectors presenting
as 512b?" Note that the BIOS does not let you query the
sector size (e.g. eltorito.sys has to detect by trying:
either 512 bytes disk style or 2048 bytes raw CD/DVD/BD)
and that many apps just assume 512 bytes...

Also depending on your BIOS, you could have a limit of at
most 2^28, 2^32 or 2^48 sectors per disk. There also is a
DOS UIDE cache-and-driver. For example LBACACHE is one of
the tools which assume 512 bytes per sector and uses only
the first 2^32 sectors which is 2 TB for 512 byte/sector.

Even for disks with large native sectors, the BIOS or the
firmware of the harddisk may still support access to 512
byte units. I guess actual geometry of modern disks does
not have much to do with classic CHS or LBA-512-byte etc
anyway. Flash / SSD disks can be much faster when access
is done in aligned multiples of 4kB or even much larger.

Of course it is also simply INTERESTING whether we could
support 4 kB sector size. After all, eastern versions of
MS DOS also supported floppies with 1 kB sector size and
SMARTDRV and ramdisks also tend to support sectors of not
only 512 bytes size. This is also useful for caching CDs.
Note that CDRCACHE simply has a fixed 2 kB sector size...

By the way - a DRIVER could interface with any disk with
any sector size and then just provide an int13 or int25/26
interface with 512 byte "sector" size for data transfer to
DOS. For transfers which do not access (aligned) blocks of
4 kB size, performance will be worse than native, and you
cannot boot from such a disk, but at least this would WORK
and you could even have a driver as part of the boot chain
before DOS is loaded, just as Ontrack / Ezdrive MBR-loaded
drivers which added LBA support to PCs without a LBA BIOS,
decades ago. Making the KERNEL sector size of DOS 4 kB has
the side effect of BUFFERS also being 4 kB each - wasting
3.5 kB in each buffer when you access a 512 byte / sector
disk with such a kernel.

Regards, Eric


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to