Thursday, February 20, 2014

Using A: Legacy Floppy in todays 32bit or 64bit, Windows and Linux Operating Systems



Subtitle:  Legacy Floppy Compatibility with UEFI boot

Introduction: In search of a fully working A:


Summary:

Floppy Disk  DOES NOT work at all when booting using UEFI.

Floppy DOES work  when booting with BIOS in Linux, 32-bit Windows 8.1 and Windows Server

Floppy DOES work partially when booting 64-bit Windows 8.1.


There are exceptions see below, 360K 1.2MB and 1.44MB floppies do not behave the same


I am re-purposing an older Server computer to help with some Vintage Computer restoration and forensics.

It is critically important that I have the use of the A: floppy diskette drive, at least for the 'Operating System Guests' that will run inside the Server  (under VMware).   

But really the A: floppy, be it a 360K, 1.2MB or 1.44MB physical floppy should be accessible by both the booting Operating System and any Virtualised Guest OS.

Initial Building
A check of the presence (or not) of the A: drive might seem to be one of the first things to do.

However in the initial euphoria of Building a Windows 81.x64 system other protective measures like configuring the Anti-Virus or Backup or NIC-teaming seemed to jump in ahead.

Therefore it was not until recently that I was astonished to find that whereas the floppy diskette driver was loaded according to the OS,  the A: drive was 

MISSING!

The initial problem seemed to be Windows 8.1 x64 since I test installed Windows 8.1 x32 and it saw the floppy A: fine, on the same computer, with the same identical BIOS settings.

SO what did I find?
If Windows (be it 8.1 or 2012) installs via UEFI and generates a multiple partition UEFI style partition layout

NO FLOPPY ACCESS

If however you coax Windows into installing the old way, then (on the same computer) you WILL get a A: floppy.

Then you can use this floppy at the native OS level, or within a VMware guest, example Microsoft DOS 6.22 or Ubuntu Linux 


Come On, Do you really Need the Floppy?
Googling the answer bring you in touch with numerous Know-it-all's who either

a) suggest you use a USB floppy
b) make sarcastic or humorous comments (to them) about you being an idiot for needing a floppy

So, YES, actually I really need the floppy.  

Under DOS, if I am lucky I will use specialist tools to try and read the non DOS diskettes from old Cromemco Systems, and under Ubuntu/ Linux Mint we can read the diskettes with dd or read (and try to make sense of) the diskette image files of the Solid State Floppy Simulators I am testing.


Bad System with UEFI




Note the UEFI Disk Layout that is symptomatic of the issue



Good System
Before installing Windows 8.1 I used the Linux tool gParted to create 3 FAT partitions of 1GB each, leaving Windows no choice but to create a single MBR style 4th Windows Partition.


Registry Differences with UEFI Boot


 
On a UEFI boot system the HKLM registry entry for the floppy disk looks like the above.



Whereas on a system which has the A: drive notice the slight difference.  (I tried exporting the difference and importing but that does not work).

Further Issues even with BIOS style boots
Just when I thought everything was sorted I rechecked the compatibility using 

a) Physical 360K 5.25" diskette drive
b) Physical 1.2MB 5.25" diskette drive
c) Physical 1.44MB 3.5" diskette drive.

Well, blow me down, even some non UEFI i.e. regular MBR based BIOS booting systems let me down....



[In all cases BIOS is set to correct physical diskette size]

And most importantly even if the base OS works, then VMware might still not be able to pass these resources to a child OS ..

Windows 2012 R2 Storage Server x64
1.44 MB floppy WORKS FINE
xcopy fine
format fine

1.2MB floppy works FINE
format fine
copy fine

360K floppy in 1.2MB drive
command line fomat fine
copy fine

360K floppy
GUI format -> Windows can't format this type of disk
format a: /u /f:360    OK
GUI and command line copy OK



VMware diskette access

VMware Child OS Access - Fails

I've tried a clean boot and disabling AVG antivirus but still the VMware child cannot access A: of the native Server OS.


Windows 8.1 x64
1.44 MB floppy OK

1.2MB floppy  
can view files from GUI, but not format
format a: /u  OK
GUI and copy command work OK

360K floppy in 1.2M drive
format a: /u /f:360K    OK
GUI and copy command work OK

360K floppy  
GUI format -> Windows can't format this type of disk
GUI and command line copy  OK
format a: /u   OK

VMware guest  ... Example DOS partition
Freedos 1.1 Partition installed
Physical 1.44MB floppy passed to VMware guest and setup in VMware bios as 1.44MB ..


format a: /u OK
chkdsk a: OK



Windows 8.1 x32
1.44 MB floppy  not fully working
format a: -> Parameters not supported by drive
format a: /t:80 /n:9 -> Parameters not supported by drive
xcopy OK

1.2MB floppy
GUI format fails -> Windows can't format this type of disk
Command line format format a: /u  OK
GUI or cmd line copy OK

360K floppy in 1.2M drive
GUI format fails
format a: /u /f:360K   OK
GUI or cmd line copy OK

360K floppy
format a: /u /f:360K -> Cannot open volume for direct access
dir a: -> The parameter is incorrect


VMware guest  ... Example DOS partition
Freedos 11 Partition installed
Physical 1.44MB floppy passed to VMware guest and setup in vmware bios as 1.44MB ..

format OK
chkdsk OK

360K disk inside a physical machine (on attach) hangs Virtual Machine.  Eventually error is presented (Could not connect to Floppy A:.  It is being used by another virtual machine or some other progam)


Linux Mint 16 x64
1.44 MB floppy WORKS FINE
format works
cp copy works

1.2MB floppy 
mformat works
cp copy works

360K floppy in 1.2M drive  OK


360K floppy  FAILS
modprobe floppy
mformat a:  -> Can't open /dev/fd0  [But /dev/fd0 is not only there but I relaxed permissions also, and also did a modprobe]


VMware guest  ... Example DOS partition
Freedos 11 Partition installed
Physical 1.44MB floppy passed to VMware guest and setup in vmware bios as 1.44MB ..
format 1.44MB okay
chkdsk 1.44MB okay


Linux mint seems to have some clever options allowing for format of track 0 differently to other tracks.  This is exactly what Cromemco diskettes need.  What is actually needed is the ability to read such formatted diskettes.

With Mint I notice that even when diskette in /dev/fd0 is unmounted the head load light of the diskette drive is LIT continuously.


And Finally of course


  • Latest ATX and other consumer motherboards don't have any floppy drive electronics at all.
  • Latest consumer motherboards might only have UEFI so this again means no floppy


Links
UEFI boot loses floppy
FDC Legacy Tests
FreeDos 1.1