Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

UPTIME (Announce)

posted by Torsten(R), 03.08.2017, 14:11


On Thu, Jul 27, 2017 19:28 Raye R. wrote:
>DOS trim tool for SSDs. Maybe some code of zerofill could be reused
>for searching empty clusters [...] and then send ATA trim commands
>to sectors that have to be discarded.

I consider this as technically impossible. Tools like FILL-0 or ZEROFILL
write a perpetually rising file containing zeroes (00h) to every empty
cluster of a disk or disk image.

Only the operating system understands (and needs to know) where this file
is actually written. While there are some DOS tools which address clusters
directly (DISKEDIT, DEFRAG), deliberate TRIMming of particular clusters
(or, rather sectors) requires a close interaction with the file system
which, on it's side, needs to support this as well.

Under Linux, TRIM became available for ext4 since mkefs 1.41.10; or for
NTFS with Windows 7. If I got things right, both file systems store the
required data (information on TRIMmable sectors) within their structures.
FAT32 could hardly be extended in a similar manner.

At least, issuing ATA Security Erase commands is possible from within DOS.
In 2000, Alex Mina had written an ATA Password Tool, search for "atapwd"
(Readme in Ukranian or so, if you understand this). I had once used it to
unlock a password protected disk, but ATAPWD.EXE knows ERASE commands as
well. Never tested them, nor do I know how they work on SSDs. Used fstrim
and hdparm only.

I hope you don't mind me quoting from a personal mail here, it's because
your reflections may be of interest for others.

On Tu, Aug 3, 2017 03:25, Raye R. wrote:
>The trim tool is just in an idea state. I could look at the new
>ATA spec how exactly the TRIM command looks like. I would expect
>it accepts a list of LBA sectors address to discard. Then it would
>be needed to scan the entire FAT for unused clusters and send TRIM
>for all sectors of that clusters.
>I have a multiboot system with windows and linux so I can run a
>fstrim command to do the job

Nice idea, didn't consider this: while FAT/FAT32 cannot store information
on discardable sectors itself, it is still possible to collect such data
independently, and to pass these to an appropriate TRIM tool. Due to the
complexity of file system structures, reliable tools are difficult to implement.
For example, a FAT32-capable DEFRAGger is still unavailable, the
same applies to CHKDSK (only found the buggy DOSFSCK), and
ReactOS 0.4.4's CHKDSK[X] cannot correct neither FAT nor FAT32.
Essentials ought to come first.

Regards, Torsten


Complete thread:

Back to the forum
Board view  Mix view
15096 Postings in 1355 Threads, 245 registered users, 19 users online (0 registered, 19 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum