Hi Bertho, trying to reiterate / re-explain my plan / idea:

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

As explained in a longer mail this week, it actually SHOULD
work: Only a few values in the boot sector would differ from
a native 4k sector FAT filesystem compared to a filesystem
where things work in "groups of 8 sectors" of 512 byte each,
which is exactly what you would get when you make a 4k disk
(containing a native 4k based FAT partition) visible as if
it would have 512 byte sized sectors instead.

This means you cannot make the RAW DISK visible to DOS that
way, but you ONLY have to show DOS a modified boot sector to
make the rest of an otherwise unchanged PARTITION work from
"native 4k sectors" into "show DOS 512 byte fake sec size".

Because DOS only checks partition tables at boot, it never
looks at a whole RAW DISK through block device drivers, not
counting those built into the kernel for your boot drives.

This means that it already is part of the normal job of any
loadable block device driver to process partition tables and
show "sectors" and "boot sector properties" to DOS. Software
has routinely modified boot sector properties on the fly to
show DOS tuned values for many years, e.g. for ramdisks etc.



Note, however, that the OTHER way round is NOT compatible
with other operating systems: You cannot FORMAT native 4k
sector disks in a way that uses areas of 512 byte size as
independent sectors and then show that disk to another OS
as 4k sector disk. The disk must be already formatted with
"groups" of 4k size in mind.

Again, you CAN safely use 4k disks with 4k FAT partitions
in a DOS with 512 byte sector size, as long as your block
device driver converts the boot sector BPB properties on
the fly into using 512 byte units. And as explained in my
earlier mail, this ALWAYS works on FAT32 partitions with
at most 2 TB size and at most 64 kB cluster size as limit.

A block device driver for accessing native 4k disks with a
fixed 512 byte per sector DOS kernel can easily show only
those partitions which are not more than 2 TB, 64k-cluster.

I mean my 15 Jan 2012 23:33 CET mail :-)



> This scheme won't work if the disk has to be usable aslo in other
> OSes like Windows XP, Linux, etc. that recognise the 4k sectors
> natively !

See above - disks partitioned and formatted in 4k compatible
way or simply using the native 4k sector size can be used in
all OSes in a compatible way, even in a 512 byte sector size
with the help of a "converted view on the boot sector" block
device driver in DOS which shows DOS each 4k sector as a row
of 8 "sectors" of 512. They also STAY compatible that way, so
DOS does not break anything by doing access in 512 byte units
on the block device driver size. It only is a bit SLOWER, as
the block device driver will still "talk in 4k sectors" when
talking to that native 4k sector size disk.



> Someone, maybe not Eric, asked what I have been using for accessing
> USB mass storage in DOS. Answer : a version of Panasonic's
> USBASPI.SYS. This allows access to 4k sectors using SCSI commands.

Interesting, but would that be easier than using Bret's or Georg's
USB storage drivers? As long as somebody explains me how to write
and read 4k sectors with those drivers, I should be able to show
how to show 512 sectors and a transformed BPB on the DOS side, in
that way making FAT32 partitions on that disk useable by unpatched
FreeDOS with a simple loadable block device driver in a safe* way.

*I cannot stop you from breaking the wonder by reformatting that
partition in a non-4k-compatible way, apart from write-protecting
the boot sector. You cannot repartition disks through block device
drivers anyway, so THAT part is safe. Also, DOSFSCK will be happy
(will not notice anything strange) and CHKDSK skips FAT32 anyway.

Regards, Eric



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to