Spinrite and 4kn drives

  • Release Candidate 6
    Guest:
    We are at a “proposed final” true release candidate with nothing known remaining to be changed or fixed. For the full story, please see this page in the "Pre-Release Announcements & Feedback" forum.
    /Steve.
  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in:

    This forum does not automatically send notices of new content. So if, for example, you would like to be notified by mail when Steve posts an update to his blog (or of any other specific activity anywhere else), you need to tell the system what to “Watch” for you. Please checkout the “Tips & Tricks” page for details about that... and other tips!

    /Steve.

SteveA52

New member
Nov 28, 2023
4
0
I've been a SpinRite user for a long time. I'm glad to see 6.1. I downloaded the latest SRPR today (11/28/2023).

In my environment, I have 2 RAID systems that use 4kn drives. Before inserting a drive into the array, I'd like to test it with SpinRite. But in order to do that, I have to change it to 512e, then change it back to 4kn after SpinRite is done with it. This will let me know if there are problems with the drive but any bad sectors that are zapped will be "unzapped" by the transition back to 4kn. (Also, FreeDOS PANICs if it boots with a 16TB/4kn drive installed - have to boot without the drive, then insert the drive to run SRPR, FreeDOS gives warnings about the size of a 16TB/512e drive but boots successfully.)

The message I received from SpinRite was that 4kn will be supported in a future release.

Any idea when that will be?
 
(Also, FreeDOS PANICs if it boots with a 16TB/4kn drive installed - have to boot without the drive, then insert the drive to run SRPR, FreeDOS gives warnings about the size of a 16TB/512e drive but boots successfully.)
That may be fixed in the version of FreeDOS that comes with the latest release of WinSpin (a test release for the Windows part of SpinRite that creates boot media): https://www.grc.com/dev/SpinRite/WinSpin/SR61-R5.EXE

You can also just replace the kernel: https://www.grc.com/dev/SpinRite/KERNEL.ZIP
The message I received from SpinRite was that 4kn will be supported in a future release.

Any idea when that will be?
Version 7.
 
(Also, FreeDOS PANICs if it boots with a 16TB/4kn drive installed - have to boot without the drive, then insert the drive to run SRPR, FreeDOS gives warnings about the size of a 16TB/512e drive but boots successfully.)
Hi @SteveA52 : THAT is very interesting and not what I/we want! Could you confirm that the "build date" of that version of FreeDOS is 2023? Or might it be 2020 or older? I've tweaked the FreeDOS kernel with the intention of making it completely tolerant of non-FAT and non-512 sector drives... but perhaps I'm not 100% there, yet??

You can grab a copy of the latest kernel here: https://www.grc.com/dev/SpinRite/KERNEL.ZIP. Just copying over the older kernel with the new one (after removing its write protection) should replace it. Or you could use the current SpinRite Windows boot-prep which will also setup a new USB device with the latest FreeDOS kernel: https://www.grc.com/dev/SpinRite/WinSpin/SR61-R5.EXE.

Thanks!!
 
The drive is back to 4kn. It isn't part of the array yet, so I'll move it back to the SpinRite machine. I downloaded the new kernel yesterday but the machine was running SpinRite on the same disk as 512e. I'll move the disk and get back to you ASAP. I saved the old kernel so I can go back to it. The date on the old kernel is 02/20/2022, 46,256 bytes. The new one is 11/11/2023. I'll boot both and report back.
 
Booted with the new kernel and the 4kn drive installed. PANIC: MCB chain corrupted. I had to scale down the attached pic to attach it. It should be legible.
 

Attachments

  • FreeDOS_kernel_panic_50pct.jpg
    FreeDOS_kernel_panic_50pct.jpg
    179.4 KB · Views: 47
Thanks for the testing and feedback, Steve. I'm SURE I've run a 4kn drive with SpinRite since I needed to verify that its 4kn detection code was working properly. I'll try that again, though, since it's been awhile.

I'm pretty certain that @ColbyBouma has some 4kn's around, too... So he may be able to further test and confirm.

I doubt that my ZimaBoard's AMI BIOS will list any drive that it doesn't recognize... But it might be that your BIOS does, and that that's the difference in behavior.
 
Thanks for the testing and feedback, Steve. I'm SURE I've run a 4kn drive with SpinRite since I needed to verify that its 4kn detection code was working properly. I'll try that again, though, since it's been awhile.

I'm pretty certain that @ColbyBouma has some 4kn's around, too... So he may be able to further test and confirm.

I doubt that my ZimaBoard's AMI BIOS will list any drive that it doesn't recognize... But it might be that your BIOS does, and that that's the difference in behavior.
Here's the MSINFO32 output on the system that was in use. Anything else you want/need, let me know. Looks like the attach didn't work as a TXT file. Let me try a ZIP.
 

Attachments

  • SteveA52_msinfo32.zip
    107.5 KB · Views: 47
Are there any ATA commands for reading "long sectors" in 4KN or 512e AF drives?
I haven't looked into it closely yet. I presume that we simply transfer 4096 bytes when we address a sector, rather than the traditional 512 bytes. The reason I haven't looked at it closely (yet) is that my entire focus has been on updating SpinRite 6.0 to 6.1 as I promised to do, for no charge many years ago. So I want/need to fulfill that commitment. I promised to move IDE & AHCI (PATA and SATA) drives out from behind the BIOS to get them running as fast as they could, and for SpinRite to run on any drive of any size, and regardless of its file system (or lack of any). Since all of SpinRite's code has always assumed 512-byte sectors, it would be a significant change to add 4K awareness.

My intention is to get SpinRite 6.1 finished and published, then to immediately begin work on 7.0. SpinRite 7.0 will be a "from scratch" new SpinRite, written for an OS (RTOS-32) that can boot from either the BIOS or UEFI. Since the BIOS is not much longer for this world, anything for the future must be able to boot on a UEFI machine... but neither DOS nor the BIOS will. So I get to start over from scratch. The publisher of RTOS-32 discontinued it a year ago, so I purchased all of the source for it. RTOS-32 is a truly lovely piece of work and it's exactly suited for where I want to take SpinRite: https://www.on-time.com/rtos-32.htm.

For SpinRite 7 we get to have anything and everything we want... so I'm quite anxious to get to that... But first I need to resolve the last questions that have been arising with 6.1. (y)

Edit Note: I initially wrote “IDE & SATA” above when I meant “IDE & AHCI”.
 
Last edited:
I'm pretty certain that @ColbyBouma has some 4kn's around, too... So he may be able to further test and confirm.
Yes. I have a 4Kn drive and have never run into this. I was able to use it to upset early Alphas of 6.1, but it never crashed DOS :)
 
  • Like
Reactions: Steve
Does this mean that, other than the original 28-bit READ LONG ATA command, SR v6.0 had no long read capability for 137GB+ storage devices? If so, is this still the case for v6.1?
Oh!!! When you wrote “reading long sectors”, above, I assumed you meant reading long -- as in 4K byte -- sectors, not "ATA Read Long" commands. And yes, both SpinRite 6.0 and 6.1 test for and confirm the presence and functioning of a drive's support for ATA Read Long commands. And that support is still commonly seen on drives (despite its removal from the ATA spec) even on drives whose physical sectors are definitely 4K in size. (Some time ago, for example, you had provided a link to a Seagate drive that had a native USB interface. So it's a recent drive. And the specs for that drive explicitly stated that it supported ATA Real Long.)