REXX, SPF, Internet drafts



Some of my web pages are still messy and on their way to a new hoster, but there is a new version of checkmbr.rex (REXX script) maybe interesting for users of TestDisk. The script can analyze MBR disks on Windows platforms using \\.\PHYSICALDRIVEn for n=0..9, and identifies unused sectors caused by generous partitioning or by FAT and NTFS sizes not exactly fitting into their given partition. While at it the script creates base 64 backups of various boot sectors. Fixed bugs and new features:

  • The max. cluster numbers for FAT12/16/32 were "off by one". The hardwired limits are now 4084, 65524, and 268435444.
  • Added partition type 27h "WinRE" for a hidden windows recovery partition and file system NTFS.
  • exFAT uses partition type 07h also used by NTFS. This is unsupported and should result in lots of "NTFS errors" for exFAT (untested).
  • UEFI disks start with a protective MBR (partition type EEh). This is now reported, but checkMBR analyzes only MBR disks.
  • VFD (virtual floppy disk) and fixed VHD (virtual hard disk) files can now be given instead of a physical drive number.

The new VHD feature would fail for ooREXX 3.x and VHDs greater than 2 GB, get ooREXX 4.x. Many identified partition types are untested or ambiguous, e.g., I've never seen an EFI FAT type EFh roughly corresponding to a Windows system NTFS partition on MBR disks, or the partition types allegedly used by the FreeDOS FDISK tool to hide FAT, NTFS, or extended partitions.


frank said...

A quick note for any users downloading checkMBR yesterday: Please download it again, there was a minor output layout bug for valid VDFs (virtual superfloppy), a major bug (REXX error) for a non-existing VDF, and the obscure "+140" FreeDOS FDISK hidden extended partition types (91h=05h+8Ch and 9Bh=0Fh+8Ch) were not properly handled everywhere. Sorry.

frank said...
This comment has been removed by the author.
frank said...

After I figured out how a "Linux extended" partition type 85h is supposed to work I added it to checkmbr; and while at it I've removed the FreeDOS FDISK +140 cruft, because it is apparently long dead. The 85h code is untested, but as it is only a copy of the working 05h code fixing any bugs should be simple. Also see the Wikipedia article for an extended boot record.


Creative Commons Licencexyzzy blog
CC Attribution-ShareAlike 4.0 License
Search only IANA, ICANN, IETF, OpenSPF, Unicode, W3C, xyzzy

About Me

My photo
Hamburg, Germany