9

I wish to create a bootable DOS 3.3 installation floppy disk (3.5″, 1.44MB, 2HD, Sony branded) for my AST Premium Exec 386SX/20 laptop.

I have bought a new USB floppy disk drive and connected it to an Ubuntu virtual machine and I'm able to mount the drive and read the contents of the disk (although it takes a long time, over 1 minute just to get the root file listing).

I have attempted to use the following command to overwrite the diskette with an image file "Dos3.3.img" from https://www.allbootdisks.com/download/dos.html.

root@ubuntu64:~# dd conv=sync bs=512 if=/root/386_stuff/Dos3.3.img of=/dev/sdb ; sync
dd: error writing '/dev/sdb': Input/output error
97+0 records in
96+0 records out
49152 bytes (49 kB, 48 KiB) copied, 18.3361 s, 2.7 kB/s
root@ubuntu64:~#

The image is 1.44MB in size (e.g. a complete disk's worth), but it clearly fails with an IO error after only 96 sectors transferred. I've tried this a few times with different images (a "NEC" brand boot image from some other site had a similar failure though).

I believe the disks are new old-stock, they came shrink wrapped in their original packaging. The USB floppy drive is a generic thing with a TEAC chipset (according to dmesg).

I cannot tell if my method is faulty, or if it's the diskettes or the drive. Is there a better, more robust way to create a bootable DOS 3.3 floppy?

Supplemental: Output from lsusb -v relating to the floppy drive connected to the linux virtual...

Bus 001 Device 004: ID 0644:0000 TEAC Corp. Floppy
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0644 TEAC Corp.
  idProduct          0x0000 Floppy
  bcdDevice            2.00
  iManufacturer           1 TEACV0.0
  iProduct                2 TEACV0.0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      4 Floppy (UFI)
      bInterfaceProtocol      0 Control/Bulk/Interrupt
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             127
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

The output from ufiformat -v -i /dev/sdb...

root@ubuntu64:~/386_stuff/freedos_installation_media/144m# ufiformat -v -i /dev/sdb
inquire on device=/dev/sdb
vendor:  TEAC
product: USB UF000x
write protect: off
media type: 2HD
status      block size   kb
formatted    2880  512 1440
formattable  2400  512 1200
formattable  1232 1024 1232
formattable  2880  512 1440
13
  • 3
    A slight breakthrough: I was able to write an entire image to the diskette but only after I had overwritten the entire disk using dd if=/dev/zero of=/dev/sdb bs=512. I don't know why that should make a difference though. And the 386 laptop DOES boot successfully from that diskette! I guess that's progress, but this process feels a bit flimsy to me. Feb 24, 2022 at 19:23
  • I can’t say whether we’ll be able to say anything definitively regardless, but… does it always stop at this number? Were the disks low-level formatted? 96 sectors is a bit strange number, it’s not even a round number of tracks. (Also, lsusb -v is usually more detailed that dmesg.) Feb 24, 2022 at 20:00
  • For a given diskette and binary image file, then yes generally it appears that the error happens at the same place in the transfer each time. I'm wondering if the process of overwriting the diskette with zeroes (see info in my previous comment) is enough to destroy any low-level formatting and allow dd to simply use the entire disk for the actual DOS3.3 image verbatim without errors. I'll try the lsusb -v tip shortly... Feb 24, 2022 at 20:30
  • 2
    I''ve successfully done the same thing in Linux and macOS dozens of times, BUT I've never included "conv=sync" in my dd command.
    – Brian H
    Feb 24, 2022 at 20:38
  • 2
    Using dd conv=sync is a terrible idea here. If dd happens to get a partial read, it will corrupt your copy. There is no need for that option here. In fact, there's no need to use dd at all here, and I recommend you don't. Just use cat, or pv if you like a progress bar.
    – marcelm
    Feb 25, 2022 at 19:21

2 Answers 2

5

Your dd command looks valid. There should be nothing wrong with the method you're using.

I'd suggest trying the USB floppy drive in other machines, trying other USB floppy drives, or trying an internal drive instead if at all possible.

Unfortunately, I've had very little luck with USB external drives that were manufactured recently (2019+), myself. On Linux systems they would not work at all, and on Windows 7 they would work for five minutes seemingly perfectly and then show bizarre behaviour like not refreshing the contents of the directory or not reading or writing files yet claiming to have done so, to locking up the system.


For completeness, here's a link to Debian's documentation on writing floppy images on Linux, Windows, DOS and other systems.

You can use the following command on a Linux system:

dd if=filename of=/dev/fd0 bs=1024 conv=sync ; sync

With the following caveats:

  • "You will probably need root access to the system."
  • "Some systems attempt to automatically mount a floppy disk when you place it in the drive. You might have to disable this feature before the workstation will allow you to write a floppy in raw mode."

(Some examples use bs=512 as you tried, and optionally add count=2880 to the command (as 512*2880=1474560 is a 1.4Mb floppy image).)

6
  • 3
    Judging by the fd0 device name, that Debian manual was written when the most common kind of floppy drive was one that was connected to a floppy controller installed directly on the motherboard. I wouldn’t expect it to take into account any complications that USB floppy drives can bring. Feb 24, 2022 at 20:11
  • That's true, but ideally there shouldn't be any complications. I would (possibly naively) expect a usb floppy to act as a black box like-for-like substitute. :)
    – knol
    Feb 25, 2022 at 9:25
  • Being a black box is precisely why it fails; classic motherboard-driven floppy drives exposed lots of low-level functionality that USB drives sometimes do not make available at all. They tend not to support arbitrary geometries well (or at all), as has been noted before on this site. Feb 25, 2022 at 10:08
  • 2
    Turns out that my specific problem (not actually related to the Question) is that the floppy drive I bought is in fact nothing more than a 30 year-old drive (rusty and dirty), re-packaged in a flashy modern plastic shell and sold on as a brand new unit. It works a lot better now that I have cleaned the heads with isopropyl alcohol and added a drop of light machine oil to the stepper screw. I've got my 386SX booting into DOS 6.22 and have been playing with QBasic for the first time in probably 20 years! The lesson I learned: don't expect quality from cheap Ebay floppy drives. Feb 25, 2022 at 19:21
4

I'm able to mount the drive and read the contents of the disk (although it takes a long time, over 1 minute just to get the root file listing).

That's already an indication that something is wrong. Does the drive make some noise during this? You can usually hear the head moving, and also the typical "head reset" action when the head moves to track 0, and back to the track that had trouble.

dd: error writing '/dev/sdb': Input/output error

So: Has trouble reading, cannot write at least one sector.

I believe the disks are new old-stock, they came shrink wrapped in their original packaging.

First thing I'd try (if you haven't already done this) is to reformat the whole floppy, e.g. with ufiformat (commonly available in the ufiformat package).

1
  • mformat doesn't work on USB drives? I am disappointed now (but I still have internal floppy drives, so I was never in a situation to have to try that).
    – dirkt
    Feb 26, 2022 at 5:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .