Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Rob(R)

21.08.2019, 00:29
 

Updated utilities (Announce)

Hi everybody:

While I was surfing on the net, I have met again with two pages with useful updated utilities for DOS. They both are quite unknown; so, I give them some publicity. Maybe someone is interested.

http://rose.rult.at/
https://www.hdat2.com/

Good bye!

Laaca(R)

Homepage

Czech republic,
22.08.2019, 17:48

@ Rob

Updated utilities

Hello!
HDAT2 is not so unknown :-) But it is so specific tool that it is not for everyday using at all. More interresting for me would be some DOS tool for recoreving the dying flash disks...

---
DOS-u-akbar!

RayeR(R)

Homepage

CZ,
27.08.2019, 11:51

@ Laaca

Updated utilities

Interesting, I didn't know about HDAT2 yet! And it's from another Czech programmer. Seems to be powerfull tool. He must have a lot of knowledges, maybe he could help with ATA DMA commands to make me TRIM command call successfull finaly... My SMB can do a lot with ATA & SMART but not all and via menus.
The binary seems to me quite bloat - 2,5MB and I'm unable to compress with UPX as it crashes (the compressor, even older versions). Can be packed with some other packer - what to use for FP bins?

---
DOS gives me freedom to unlimited HW access.

Laaca(R)

Homepage

Czech republic,
27.08.2019, 16:34

@ RayeR

Updated utilities

Yes, the issue about UPX-ing of the FPC 3.x.y files is still not fixed yet.
But the alternative packer 32Lite should work.

---
DOS-u-akbar!

Zyzzle(R)

28.08.2019, 06:09

@ Laaca

Updated utilities

> Hello!
> HDAT2 is not so unknown :-) But it is so specific tool that it is not for
> everyday using at all. More interresting for me would be some DOS tool for
> recoreving the dying flash disks...

And also I had never seen HDAT2 before either.

The DOS port of testdisk seems about the best for recovering dying flash drives. I'd be more inerested in a DOS utility whose sole intention is to verify and work with SSDs, verifying them quickly, remapping bad 'sectors' (bad blocks), and giving SMART status, etc

And UPX seems very buggy and finicky. Doesn't compress some files (FP3, et al) and others it can't decompress properly, even when compressed with UPX itself.

Rugxulo(R)

Homepage

Usono,
30.08.2019, 02:21

@ Laaca

FPC vs. UPX

> Yes, the issue about UPX-ing of the FPC 3.x.y files is still not fixed
> yet.
> But the alternative packer 32Lite should work.

Don't forget about WDOSX's stubit (mirror). It compresses and adds its own DPMI host. But it can't be removed and doesn't mix well with CWSDPMI apps, so shelling out from one of those will cause a GPF ... but it's still better than nothing. (I think you can load HDPMI32 first, and then they will play well together.) UPX's LZMA compresses better, though. Long story short: keep backups of originals, and don't sweat the small stuff. :-D

EDIT: I've only rarely used 32lite (mirror) before, but it seems to be by the same guy (Jibz) that did the compression part of WDOSX's stubit.

RayeR(R)

Homepage

CZ,
02.09.2019, 11:23

@ Laaca

Updated utilities

I got reply that it's big due to debug info. I packed with 32lite but only down to 1,8MB. When I tried to remove debug via strip -s *.exe it complains that HDAT2.EXE is not in supported format (strip from FP and DJGPP too).

---
DOS gives me freedom to unlimited HW access.

Laaca(R)

Homepage

Czech republic,
02.09.2019, 13:08

@ RayeR

Updated utilities

> I got reply that it's big due to debug info. I packed with 32lite but only
> down to 1,8MB. When I tried to remove debug via strip -s *.exe it complains
> that HDAT2.EXE is not in supported format (strip from FP and DJGPP too).

So the only solution is a special custom build for you. The debug info generation can be easily disabled in the FPC setting.
Or the FPC can be set to use the external linker (not internal linker) which uses the more standard DJGPP format to be compressible with UPX (which can throw away the debug info)

---
DOS-u-akbar!

RayeR(R)

Homepage

CZ,
03.09.2019, 01:49

@ Laaca

Updated utilities

Aha, I don't know FP internals and though that it use standard binutils like DJGPP.

BTW HDAT2 ver 2.6 is out, here is FDD image that contains a CAB file with stripped HDAT2 and it can be packed with 32lite down to 371kB - good result :)

BTW2 I found HDAT 5.0 in my SW archive so I was aware of it but fortgot a long time ago and probably got it from some bootcd without visiting author's website.

---
DOS gives me freedom to unlimited HW access.

RayeR(R)

Homepage

CZ,
03.09.2019, 04:00

@ Zyzzle

Updated utilities

> I'd be more inerested in a DOS utility whose sole intention is to
> verify and work with SSDs, verifying them quickly, remapping bad 'sectors'
> (bad blocks), and giving SMART status, etc

It's not possible to go to such low level because it's a job of embedded controller in SSD and it's firmware that is instantly remapping bad flash sectors and hiding it from user (using ECC and wear leveling algorithms). When flash cells wear out and there are no left spare to remap data loss may suddenly happen. Or at least SSD switch to read-only mode in a better case. There is SMART attribute Total LBA written that may indicate you how many TB of data was written and compare it to typical SSD life. There may be also some other vendor specific SMART attributes that can tell better but it's not standardized, sigh...

---
DOS gives me freedom to unlimited HW access.

marcov(R)

04.09.2019, 12:00

@ RayeR

Updated utilities

> Aha, I don't know FP internals and though that it use standard binutils
> like DJGPP.

Assembler is only used for odd ball architectures. GNU (G)AS is simply a slowing factor. So most major targets have direct .o generation from the compiler.

For the linker, binutils is the default if possible, though for some targets there is no functional one (e.g. 16-bit msdos, where it is openwatcom).

But if binutils are either too buggy, or too slow, or miss platform dependent features(like resources and various other PE tables, but historically it was dead code elimination related where every function was packed into a separate .o and all those .o's to a .a), also the linker gets built in.

This strangely includes targets you wouldn't expect like windows 64-bit, since FPC ran on windows 64-bit before gcc did, so there were no binutils at the time.

Afaik internal linkers in the upcoming fpc3.2 are for the dos targets (16-bit msdos, go32v2) and windows 32/64 targets as well as i386/arm-wince. win16 is still worked on in trunk, so probably won't make the release.

So, in summary basically everything for non *nix is internal, and even for *nix major ELF targets (x86/x86_64) the assembler is internal.

With the release of Debian Buster there is a new problem. 32-bit Linux changed calling conventions and now requires a 16-byte aligned stack, and the caller to align it. (LD 2.31 and above)

There is still a dependence on windres on 32-bits windows (but gorc is used for win64). Somebody works on an own resource compiler on and off, but that goes slowly.

Zyzzle(R)

05.09.2019, 05:10

@ RayeR

Updated utilities

> > I'd be more inerested in a DOS utility whose sole intention is to
> > verify and work with SSDs, verifying them quickly, remapping bad
> 'sectors'
> > (bad blocks), and giving SMART status, etc
>
> It's not possible to go to such low level because it's a job of embedded
> controller in SSD and it's firmware that is instantly remapping bad flash
> sectors and hiding it from user (using ECC and wear leveling algorithms).
> When flash cells wear out and there are no left spare to remap data loss
> may suddenly happen. Or at least SSD switch to read-only mode in a better
> case. There is SMART attribute Total LBA written that may indicate you how
> many TB of data was written and compare it to typical SSD life. There may
> be also some other vendor specific SMART attributes that can tell better
> but it's not standardized, sigh...

Yes, but I did find a feature in HDAT2 which will almost do it. When told to verify and mark bad the "Unrecoverable blocks" (URBs), this at least will make failing SSDs usable a little while longer. I've had SSDs close to failing which have given CRC errors on large files. And such files appeared to be written to the drive OK, with no errors, but reading them back produced CRC errors, because the bad block areas were NOT marked bad by either the SSDs firmware or the OS. So, in summary, HDAT2 will appear to be able to read the entire drive and if it encounters any URBs, it will mark them "unusable" in the FAT or NTFS block tables. So, that's a great feature of HDAT2 which I appreciate very much.

And version 6.6 compressed to 371 kb, as stated, thanks for the tip. I wonder if as the author claims, the next version will support NVMe SSDs, if so it will be an outstanding utility to be able to recognize and see info on such SSDs in pure DOS.

RayeR(R)

Homepage

CZ,
06.09.2019, 21:52

@ Zyzzle

Updated utilities

Uh, if I would see such failing SSD I will never want to use it anymore, just image it immediatelly and trash to bin. I had some failed USB sticks and all of them died suddenly and unrecoverable and as I heard from other users SSD died same way for them. If a cluster or LBA is marked bad or elimitated from FS usage it will not help becasue LBAs is still a high level that is translated to physical NAND FlashROM sectors via wear levelling algo. Once the FW decide to erase some block and move data elsewhere you will have problem again. It must be done in wear levelling FW to mark a physical sector bad. And I wonder it didn't do it as it have extra ECC spare memory part of a sector that should detect read errors and FW should remap them without user letting know it. At time when the reserved pool of spare sectors is exhaused by remaping it's too late and read errors can occur anywhere without being fixed by FW. Even it can happen that firmware stored in NAND too gets damaged ad you are f*****.

---
DOS gives me freedom to unlimited HW access.

Laaca(R)

Homepage

Czech republic,
07.09.2019, 10:00

@ RayeR

Updated utilities

It would be nice to have some simple utility or maybe some .BAT file calling externaly the HDAT2 which purpouse would be to perform a simple fast check of harddisks health.
Such utility would be in the AUTOEXEC.BAT file and quickly checks your drives. In case of serious problem it would warn you and let you press the "U" key. U like "understood".

---
DOS-u-akbar!

RayeR(R)

Homepage

CZ,
08.09.2019, 10:07

@ Laaca

Updated utilities

The fast check - you can check SMART status within less than a second (but it's not 100% that disk will not fail). It is possible via my SMB tool when you write a simple script and call it from command line with right parameter. I use it for this purpose in autoexec for years...
Some BIOSes also can check SMART status during POST and report a warning.

---
DOS gives me freedom to unlimited HW access.

RayeR(R)

Homepage

CZ,
10.09.2019, 03:27

@ RayeR

Updated utilities

My script:

#find standard IDE controller
ide_detect(0)
#check S.M.A.R.T. status of primary and secondary IDE on channel 0
ide_smart_status(0,0)
ide_smart_status(0,1)
exit

called by: smb.exe /dbg smbsmart.txt

---
DOS gives me freedom to unlimited HW access.

Back to the board
Thread view  Mix view  Order
16062 Postings in 1490 Threads, 272 registered users, 6 users online (0 registered, 6 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum