The VMS Shark

OpenVMS Notes: USB - UCM - Mtools etc.

  1. The information presented here is intended for educational use by qualified OpenVMS technologists.
  2. The information presented here is provided free of charge, as-is, with no warranty of any kind.
  3. Is this text too small? You have two options:
    1. hold down the CTRL key while rolling the mouse wheel (zoom-in, zoom-out)
    2. use your keyboard like so:
      • hit: CTRL with "-" key to zoom smaller
      • hit: CTRL with "+" key to zoom larger
      • hit: CTRL with zero key to reset zoom

*** This is a work in progress ***

Edit: 2017-10-25 (new page)
Edit: 2017-11-21 (changes)

USB thumb-drive caveat (2017)

You will have limited options when initializing USB sticks using native tools on Windows-7 and later. For example, in the tests below I am using an older USB stick with a small storage capacity of 128-MB (in 2017 it is virtually impossible to purchase a thumb-drive under 1-GB). Even though I am using a small capacity device, Windows-7 native tools will only allow me to choose between two formats: exFAT and NTFS.

With Windows-10 the choices are exFAT, FAT32, and NTFS.

Whether W7 or W10, you will not have total control of your target device. To get more control you want to use RUFUS (Reliable USB Formatting Utility) which can be downloaded from here:

With smaller devices like my 128-MB stick you will see an option called SUPER FLOPPY which allowed me to format the stick to look like FAT-16 for DOS-5. Why am I using such a small capacity USB stick? Many formatters will only offer older formats for smaller devices (assuming they are still being used in a more primitive ecosystem)

USB via UCM (Universal serial bus Configuration Manager)

  1. USB devices are managed on OpenVMS via the UCM (Universal serial bus Configuration Manager) utility
  2. This sparsely documented OpenVMS application appears to have features which would facilitate decent hacking. For example, lots of info is quietly written to log file SYS$MANAGER:USB$UCM_EVENTS.LOG which can be viewed directly from DCL or indirectly viewed from UCM command using the command "show events" (more on this a bit later)
  3. Your results will vary:

demo #1

  1. In the following examples I inserted a 128-MB USB stick which has been formatted on Windows-7 using RUFUS. Here, UCM created DNA10 which was then made available to OpenVMS.
    <ur>	user response
    <sr>	system response
    <enter>	hit the ENTER key (only shown once then assumed)
     ...	some kind of response
    <sr>	$						! my DCL prompt
    <ur>	ucm <enter>					! fire up the UCM application
    <sr>	Universal Serial Bus Configuration Manager, Version V2.1
    <ur>	reload						! preferable to RESTART (see HELP)
    <sr>	UCM>
    <ur>	show dev
    <sr>	Bus 0 (OHA0)
    	    Root Hub               - 3 port(s) -> KBD0    - HP Virtual Management Device -> MOU0    - HP Virtual Management Device -> MOU3    - Logitech USB-PS/2 Mouse M-BA47
    	Bus 1 (OHB0)
    	    Root Hub               - 2 port(s) -> KBD3    - Chicony USB Keyboard -> HID0    - Chicony USB Keyboard
    	Bus 2 (EHA0)
    	    Root Hub               - 5 port(s) -> DNA7    - HEWLETT PACKARD INTEGRITY SERVER -> DNA10    - USB Mass Storage Device
    <ur>	exit						! back to DCL
    <sr>	$						!
    <ur>	sh dev/full DNA10:				! see OpenVMS device details
    <sr>	...
  2. At this point I recommend all hackers to do the following:
    <sr>	$
    <ur>	type	SYS$MANAGER:USB$UCM_EVENTS.LOG		! lots of technical stuff seen here
    <sr>	...
    <ur>	type	SYS$SYSTEM:USB$UCM_DEVICES.DAT		! lots of technical stuff seen here
    These commands are important because you "might" be able to use the UCM commands: "add", "modify" and "delete" to make entries in file SYS$SYSTEM:USB$UCM_DEVICES.DAT when UCM auto-config fails for some reason

demo #2a

After plugging in a USB device, do the following:

<sr>	$
<ur>	ucm
<sr>	Universal Serial Bus Configuration Manager, Version V2.1
<ur>	show dev

You may see (on occasion) this message like this "not configured by OpenVMS". So try the following:

<ur>	sho dev /unconfig
<sr>	something

If you see something then type this

<ur>	add dev dna

Now unplug the device, wait a few seconds, then reconnect the device. If everything worked then UCM will have created a device visible to OpenVMS

playing with Mtools for OpenVMS

caveat: only for DOS-formatted media

Downloading / Installing

Version 3 caveat

Time stands still for no one or no thing and this is especially true of software. Steven's latest port of MTOOLS is based upon version 3 code from 2007. Since then, Linux has become very popular and is giving both UNIX and Windows a run for their money when it comes to features. This caused the original developers of mtools to add support for lots of cool stuff like VFAT to name just one of many, but all that was done in mtools-4. If you need any of the newer formats I suggest you contact Steven and urge him to anOpenVMS-specific port of mtools-4.1.18 which is dated 2013

source code and docs:


Implementation Caveat

Steven has added a really neat feature to this implementation which is only possible on OpenVMS. The original author required the owner/operator to manually edit changes in the config file which could be prone to error not to mention repetitious. If you wanted to use the configuration line associated with USB you needed to edit it. In Steven's implementation you only need to create a logical name called TOOLS_U then point it at the device you wish to reference.

An example session (UCM to mtools)

<sr>	$
<ur>	ucm
<sr>	Universal Serial Bus Configuration Manager, Version V2.1
<ur>	sh dev d
<sr>	Bus 2 (EHA0)
	    Root Hub               - 5 port(s) -> DNA7    - HEWLETT PACKARD INTEGRITY SERVER -> DNA10    - USB Mass Storage Device

<ur>	exit
<sr>	$
<ur>	sh dev dn
<sr>	Device                  Device           Error    Volume         Free  Trans Mnt
	 Name                   Status           Count     Label        Blocks Count Cnt
	KAWC99$DNA7:            Online wrtlck        0
	KAWC99$DNA8:            Offline              0
	KAWC99$DNA9:            Offline              0
	KAWC99$DNA10:           Online               0  
<ur>	mount DNA10/foreign
<sr>	%MOUNT-I-MOUNTED,  mounted on _KAWC99$DNA10:
<ur>	def MTOOLS_U dna10				! this is so cool
<sr>	$
<ur>	mtools						! see available sub-commands
<sr>	Supported commands:
	mattrib, mbadblocks, mcat, mcd, mclasserase, mcopy, mdel, mdeltree
	mdir, mdoctorfat, mdu, mformat, minfo, mlabel, mmd, mmount
	mpartition, mrd, mread, mmove, mren, mshowfat, mtoolstest, mtype
	mwrite, mzip
<ur>	mtools -c minfo    u:				! info of u: (eg. MTOOLS_U)
<sr>	device information:
	sectors per track: 63
	heads: 255
	cylinders: 16

	mformat command line: mformat -t 16 -h 255 -s 63 u:
	bootsector information
	sector size: 512 bytes
	cluster size: 4 sectors
	reserved (boot) sectors: 4
	fats: 2
	max available root directory slots: 512
	small size: 0 sectors
	media descriptor byte: 0xf8
	sectors per fat: 250
	sectors per track: 63
	heads: 255
	hidden sectors: 0
	big size: 256000 sectors
	physical drive id: 0x80
	serial number: 12176684
	disk label="NO NAME    "
	disk type="FAT16   "
<ur>	mtools -c mdir u:				! dir of u: (eg. MTOOLS_U)
<sr>	Total number of sectors not a multiple of sectors per track!
	Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
<ur>	ed .mtoolsrc.
	append mtools_skip_check=1 to line containing MTOOLS_U
	exit with save
<sr>	$
<ur>	mtools -c mdir u:				! dir of u: (eg. MTOOLS_U)
<sr>	 Volume in drive U is 131MB      
	 Volume Serial Number is 1217-6684
	Directory for U:/

	autorun  inf       208 2017-10-25  11:08 
	autorun  ico     34494 2017-10-25  11:08 
	test     txt        14 2017-10-25  11:09 
        3 files              34 716 bytes
                        130 758 656 bytes free
<ur>	mtools -c mshowfat u:autorun.inf		! dir of u: (eg. MTOOLS_U)
<sr>	U:/autorun.inf <2>
<ur>	mtools -c mshowfat u:autorun.ico		! dir of u: (eg. MTOOLS_U)
<sr>	U:/autorun.ico <3-19>
<ur>	dismount dna10:					! unmount this device
<sr>	$

Other USB Devices

USB Floppy not recognized by UCM (because no device serial number?)
USB Hard Drive (1TB) recognized by UCM


can format any block-structured device as a Files-11 device

...more information to follow...

Native OpenVMS

Can format any block-structured device as an ODS2 files-11 device. (not sure about ODS5)

...more information to follow...

External Links

...more information to follow...

Back to OpenVMS
 Back to Home
Neil Rieck
Kitchener - Waterloo - Cambridge, Ontario, Canada.