My father left me a batch of 3.5 inch "floppy" disks created with Windows 95 (Dutch). I want to copy their contents. My only computer with a floppy drive runs Ubuntu 12.04.5 LTS.

After installing the udisks package,

udisks --mount /dev/fd0

mounts the contents on /media/floppy0.

This is fine for files with standard (8.3) DOS filenames, but it goes horribly wrong when anything else is present:

ls -l /media/floppy0 /bin/ls: cannot access /media/floppy0/vï▐ffφl.: Input/output error /bin/ls: cannot access /media/floppy0/$Θh²çⁿ.tΘ: Input/output error /bin/ls: cannot access /media/floppy0/ëG╟+.|√═: Input/output error /bin/ls: cannot access /media/floppy0/t╛n}φa.2σ═: Input/output error total 13395579
-r-xr-xr-x 1 rp root 1476370920 Dec 25  1959 ╣?.???
-rwxr-xr-x 1 rp root  641204006 Jan 30  1980 └≤½Θ- ps.QR3
-r-xr-xr-x 1 rp root 1346403387 Dec 19  1905 6?|■└ó<|.í7|
-rwxr-xr-x 1 rp root      48514 Jan  1  1980 BL.WDB
-rwxr-xr-x 1 rp root       3728 Aug 25  2000 CADRE.WP
-rwxr-xr-x 1 rp root 2857697280 Dec 31  1979 COM d????????? ? ?  ?             ?            ? ??ëG?╟?+.|√═
-rwxr-xr-x 1 rp root 2294480508 Dec 11  1966 ï?=|Ω
-rwxr-xr-x 1 rp root     152428 Dec 23  1991 KAART2.WKS
-rwxr-xr-x 1 rp root      12909 Jan  1  1980 KABRO.WKS
-rwxr-xr-x 1 rp root       8554 Nov 28  1991 K.BRO drwxr-xr-x 2 rp root       1024 Nov 28  1991 KOPIE
-rwxr-xr-x 1 rp root      47250 Nov 28  1991 L39.ZND
-rwxr-xr-x 1 rp root          0 Dec 19  1991 LIJST39.WEK d????????? ? ?  ?             ?            ? t?╛n}φa.2σ═
-r-xr-xr-x 1 rp root 1963196670 Jan  6  2038 ├┬?.ⁿ?u d????????? ? ?  ?             ?            ? vï▐ffφl?.???
-rwxr-xr-x 1 rp root      21774 Dec 31  1979 WIELEK.WDB
-rwxr-xr-x 1 rp root      22612 Dec 31  1979 WIELGA.WDB
-rwxr-xr-x 1 rp root      23255 Dec 22  1991 WIEL.WBL
-rwxr-xr-x 1 rp root      27044 Jan  1  1980 WIEL.WDB
-rwxr-xr-x 1 rp root          0 Jan  8  1980 δ4ÉIBM.3.2 d????????? ? ?  ?             ?            ? $?Θh²çⁿ?.t?Θ
-rwxr-xr-x 1 rp root 3137341625 Nov 26  1907 Θ╨■φ? s?.├╛?

(It's not just the nonsensical filenames: rsyncing the contents of this floppy gave me a 5GB file, at which point I ran out of disk space.)

My guess: VFAT pathname translation is attempted incorrectly or not at all.

How to rectify this?

Pages I found with Google, such as this one, suggest it's a matter of supplying appropriate values for the iocharset and codepage mount options.

Is this true? Which values to use? And, first of all: how to supply them?

udisks silently ignores any mount options supplied:

$ udisks --mount /dev/fd0 --mount-options='ro,iocharset=utf8,codepage=1252,foo=bar'
Mounted /org/freedesktop/UDisks/devices/fd0 at /media/floppy0
$ fgrep fd0 /proc/mounts
/dev/fd0 /media/floppy0 vfat ro,nosuid,nodev,relatime,uid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

(That's not what I said!)

A direct mount silently fails:

$ sudo mount -t vfat /dev/fd0 /mnt
mount: block device /dev/fd0 is write-protected, mounting read-only
$ fgrep fd0 /proc/mounts

(returns nothing; the mount just doesn't work).

At least this way I can check which codepages are valid:

$ sudo mount -t vfat -oro,codepage=850 /dev/fd0 /mnt
$ fgrep fd0 /proc/mounts
$ sudo mount -t vfat -oro,codepage=85 /dev/fd0 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/fd0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail  or s

but what I need is a way to actually mount with such a codepage.

What is wrong? What else can I try?

  • Dou you get anything if you fgrep for mnt instead of fd0 after directly mounting? – Florian Diesch Jun 4 '17 at 20:51
  • No, it just doesn't get mounted. – Reinier Post Jun 5 '17 at 1:32
  • 2
    @ReinierPost Are you sure that these floppies' filesystem is OK? Floppies were infamous for their bad reliability. If they were stored for a long time they may degrade and their FAT table can be broken. – whtyger Jun 9 '17 at 17:09
  • @ReinierPost Code page 85 doesn't exist, that's why your 2nd command shows an error, while 1st one shows no complains. Check this link. Also take a look at this wiki explaining codepage and iocharset options of mount command. Also it's better to insert a space between an option and its value. – whtyger Jun 13 '17 at 9:58
  • 1
    This seems like the floppies might be bad. That would explain the input/output error. – spark Jun 14 '17 at 2:46

Long storage may have affected these floppies and their FAT could be broken. This is highly possible, because even freshly written floppy could not be considered a reliable media. I often made 2 copies of the same data when used floppies many years ago.
There's a good wiki explaining the usage of codepage and iocharset options of the mount command for FAT file system.
Direct support of floppies in newer systems isn't reliable. Even in 12.04 their support was plagued with multiple bugs. One of them, for example.

  • This seems the likely cause. I've kept an ancient PC with floppy drive and Ubuntu 12.04 going to most all of my dad's floppies and I've copied the disk images along just in case I might want to verify this later. – Reinier Post Jul 28 '18 at 7:59

The mount command argument -t specifies the file system type. You are close in your usage however you need a space between the -t and the file system type. Change your command from:

$ sudo mount -tvfat /dev/fd0 /mnt


$ sudo mount -t vfat /dev/fd0 /mnt

Sorry I don't have access to my machines with floopy drives to show what the real life output looks like.

  • This is a red herring. The -t option accepts its arguments both with and without a space. – Reinier Post Jun 12 '17 at 15:19
  • I've changed it in the question. Thanks for your suggestion though. – Reinier Post Jun 12 '17 at 15:21

If you add up the file sizes of each file in your example that have legit filenames and creation dates, the total is 328,058. This is about the results one might expect to find on a floppy of that capacity (1MB).

Clearly, you aren't going to find a 5 GB file or a file created in 1959 or 2038 in a nearly 30 year old storage device.

If your issue is to recover legitimate files from these old floppies, that seems possible now by just copying the files with reasonable names, file sizes and dates.

I have no hardware to test anything this old and you can only assume that udisks supports these ancient drives. I'm guessing perhaps not. Or at least not flawlessly.

There may be a method to cobble a mount scheme that will properly read the file structure on these devices but that seems like a lot of work if all you want to do is recover the files.

sudo mount /dev/fd0 /floppy -t vfat

"ought" to work....

Win95 was a way long time ago and I don't think NTFS was around then. But of course one [albeit remote] possibility is that the floppy is not formatted as a FAT device.

Then there's always the compatibility issue of the native IDE controller versus a USB interface and whether the latter (which I assume you are using) faithfully communicates with the drive hardware and media.

  • I'm using an IDE interface. I know the mount command should work and it doesn't. As I wrote, mounting with udisks works fine and reading files with standard DOS filenames also appears to work fine, but there are additional files and directories with impossible names. – Reinier Post Jun 14 '17 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.