Dear all,
I need to read some legacy floppy disks (3,5") which have been written a long time ago by Windows systems. I have a TEAC USB floppy-disk drive, and I have a test disk that I can read with a floppy disk drive included in a Windows computer. Actually, I want to read it on one of my openSuSE systems.
Unfortunately, the drive does not work. If I plug it into a USB slot, the device notifier pups up, OK telling me that I am not authorized to mount. I repated this as root. Now the device notifier says “Acessing …”, but after some time, again tells “You are not authorized to mount this device”.
Command lsblk shows at this point /dev/sdc as type “disk” without a mount point.
Command
mount /dev/sdc /mnt/floppy
takes a long time (several minutes) while the device is working, and after that lsblk shows the mount point. In addition,
I do not know an answer, but please do not make your post so difficult to read. Specaily the next part illustrates this:
Do not cut this in parts that obfuscate what you saw on the terminal. Copy/paste including the prompt/command line, all ouput and up to inclusing the next prompt, Example:
henk@boven:~> ls -a /mnt
. ..
henk@boven:~>
Only so do we see what you did and saw. Not much comment needed. Quicker to post, quicker to read and better to interprete.
I am afraid we need more information on what you did and experienced.
I assume you are then logged in in the GUI. What desktop? Does the device notifier tell you so at it firsts pop-up, or after you clicked something? I do not have enough fantasy to fill in all you leave out of the description.
This sounds as if you logged in in the GUI as root. Either I misunderstand, or that is something you should never do.
Where is that output? Do not tell, bit show!
Again skipping informationa and not showing. Did you create the directory /mnt/floppy?
Showing the mount command would of course have been better, with the remark that it took severtal minutes (the only thing we can not see) from the code.
[/QUOTE]
Note that there is no FSTYPE in the lsblk output. Maybe we can find out with (with the device mounted at /mnt/floppy):
mount | grep sdc
to show what all the mount parameters used are.
As bonus information, you may inform us about that device. Does it mimic a floppy device on USB? or does it just mimic a mass storage device with a file system of some type like other mass-storage connected through USB?
It’s been so long ago,
I’ve forgotten how to mount a floppy,
The following might describe how you can try mounting in your fstab (on boot) which might address any permission problems… Notice you also need to mount your file system, not just the device
First, the floppy disk must be readable; otherwise, it will not mount. Secondly, it must be in the floppy drive when you plug it in. Using KDE I simply plugged my USB floppy drive in with a 3.5" 1.4MB disk already in and it appeared in /run/media/john/.
So there is no problem with Leap 15.1 automatically mounting 3.5" 1.4MB floppy disks. However, yours is listed as 1.2M which suggests that it is formated for transitional reasons as a 5.25" 1.2MB disk. These came out in 1982 and were superseded by the 3.5" disk in 1986 but the transtional format was available for 3.5" floppy disks. So it is possible that this format is no longer/was never supported. My memory of the KDE Floppy disK formating program from 20 years ago is that it only offered 720KB and 1.4MB PC formats.
So, if Windows will read it, you may need to copy the data using Windows; I had to use a CP/M program to copy my CP/M files to 720KB PC disks when I made the move to Linux.
Things are quite different here. I bought a SABRENT USB floppy disk drive:
erlangen:~ # lsusb -v -s 001:008
Bus 001 Device 008: ID 0644:0000 TEAC Corp. Floppy
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0644 TEAC Corp.
idProduct 0x0000 Floppy
bcdDevice 2.00
iManufacturer 1 TEACV2.0
iProduct 2 TEACV2.0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0027
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
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 0x02 EP 2 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 0x81 EP 1 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)
erlangen:~ #
It works like any other disk drive, however:
erlangen:~ # time dd if=/dev/sdc of=floppy.iso
dd: error reading '/dev/sdc': Input/output error
2744+0 records in
2744+0 records out
1404928 bytes (1.4 MB, 1.3 MiB) copied, 77.1844 s, 18.2 kB/s
real 1m17.233s
user 0m0.000s
sys 0m0.035s
erlangen:~ #
I/O speed is abysmal. So you are better off with images.
erlangen:~ # losetup -f floppy.iso
erlangen:~ # mount -o loop /dev/loop1 /mnt/
erlangen:~ # ll /mnt/
total 1310
-rwxr-xr-x 1 root root 288 Feb 17 1995 ET4.MOD
-rwxr-xr-x 1 root root 1936 Feb 16 1995 EXA1.FOR
-rwxr-xr-x 1 root root 2091 Feb 16 1995 EXA2.FOR
-rwxr-xr-x 1 root root 1462 Feb 16 1995 EXA3.FOR
-rwxr-xr-x 1 root root 13948 Feb 20 1995 EXAMPL.FOR
-rwxr-xr-x 1 root root 47 Feb 20 1995 FORT.5
-rwxr-xr-x 1 root root 3490 Feb 13 1995 FORT.51
-rwxr-xr-x 1 root root 34816 Feb 12 1995 FORT.80
-rwxr-xr-x 1 root root 238937 Feb 20 1995 FORT.90
-rwxr-xr-x 1 root root 71828 Feb 15 1995 FUNK.FOR
-rwxr-xr-x 1 root root 269783 Feb 17 1995 KWUPLOT.FOR
-rwxr-xr-x 1 root root 691051 Feb 18 1995 KWUPOST.FOR
-rwxr-xr-x 1 root root 896 Feb 13 1995 KWUPOST.SH
-rwxr-xr-x 1 root root 318 Feb 20 1995 PL.SH
-rwxr-xr-x 1 root root 3490 Feb 13 1995 PROLOG.PS
-rwxr-xr-x 1 root root 2756 Feb 10 1995 STINIT.C
-rwxr-xr-x 1 root root 493 Feb 16 1995 V7VESA.MOD
erlangen:~ #
You may squash these:
erlangen:~ # mksquashfs /mnt/ floppy.sqsh
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on floppy.sqsh, block size 131072.
==============================================================================================================================================================================================================================|] 25/25 100%
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
compressed data, compressed metadata, compressed fragments,
compressed xattrs, compressed ids
duplicates are removed
Filesystem size 167.88 Kbytes (0.16 Mbytes)
12.84% of uncompressed filesystem size (1307.46 Kbytes)
Inode table size 306 bytes (0.30 Kbytes)
49.20% of uncompressed inode table size (622 bytes)
Directory table size 201 bytes (0.20 Kbytes)
69.31% of uncompressed directory table size (290 bytes)
Number of duplicate files found 1
Number of inodes 18
Number of files 17
Number of fragments 2
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
erlangen:~ #
Mount them as follows:
erlangen:~ # mount -t squashfs -o loop floppy.sqsh /mnt
erlangen:~ # ll /mnt/
total 1310
-rwxr-xr-x 1 root root 288 Feb 17 1995 ET4.MOD
-rwxr-xr-x 1 root root 1936 Feb 16 1995 EXA1.FOR
-rwxr-xr-x 1 root root 2091 Feb 16 1995 EXA2.FOR
-rwxr-xr-x 1 root root 1462 Feb 16 1995 EXA3.FOR
-rwxr-xr-x 1 root root 13948 Feb 20 1995 EXAMPL.FOR
-rwxr-xr-x 1 root root 47 Feb 20 1995 FORT.5
-rwxr-xr-x 1 root root 3490 Feb 13 1995 FORT.51
-rwxr-xr-x 1 root root 34816 Feb 12 1995 FORT.80
-rwxr-xr-x 1 root root 238937 Feb 20 1995 FORT.90
-rwxr-xr-x 1 root root 71828 Feb 15 1995 FUNK.FOR
-rwxr-xr-x 1 root root 269783 Feb 17 1995 KWUPLOT.FOR
-rwxr-xr-x 1 root root 691051 Feb 18 1995 KWUPOST.FOR
-rwxr-xr-x 1 root root 896 Feb 13 1995 KWUPOST.SH
-rwxr-xr-x 1 root root 318 Feb 20 1995 PL.SH
-rwxr-xr-x 1 root root 3490 Feb 13 1995 PROLOG.PS
-rwxr-xr-x 1 root root 2756 Feb 10 1995 STINIT.C
-rwxr-xr-x 1 root root 493 Feb 16 1995 V7VESA.MOD
erlangen:~ #
lsblk takes information from udev/sysfs. When floppy is connected via USB, it is queried by udev; as there is no medium, nothing is shown. When medium is inserted, there is no notification to kernel/udev - with floppy the only way to check for present medium is to attempt to access it. So device attributes are not updated. blkid should probe device directly. It would be interesting to compare output.
I guess something similar happens with GUI tools. When empty floppy drive is first connected, mount fails because it is empty. Later when floppy is inserted in drive, nothing informs GUI about it.
erlangen:~ # journalctl -b 0 _KERNEL_SUBSYSTEM=usb --since 12:00
-- Logs begin at Sun 2020-03-29 16:41:11 CEST, end at Wed 2020-04-01 12:09:28 CEST. --
Apr 01 12:05:59 erlangen kernel: usb 1-9: new full-speed USB device number 14 using xhci_hcd
Apr 01 12:06:00 erlangen kernel: usb 1-9: New USB device found, idVendor=0644, idProduct=0000, bcdDevice= 2.00
Apr 01 12:06:00 erlangen kernel: usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 01 12:06:00 erlangen kernel: usb 1-9: Product: TEACV2.0
Apr 01 12:06:00 erlangen kernel: usb 1-9: Manufacturer: TEACV2.0
Apr 01 12:06:00 erlangen kernel: usb-storage 1-9:1.0: USB Mass Storage device detected
erlangen:~ #
Thank you very much for the various comments and suggestions.
I’ll try to make my post more readable, while trying to answer some of the questions.
First of all, this is openSuSE 15.1 with KDE Plasma version 5.12.8, KDE Framework version 5.55.0.
Second, I am certainly aware not to use root. However, this was for testing only, because as a user the device notifier indicated a permission problem, as mentioned in the original post.
Third, I had created /mnt/floppy to have a mountpoint.
So, for this answer, I stay logged in as a user and connect the USB device with a floppy inserted. The device notifier detects a “Floppy Disk”, but says “You are not authorized to mount this device”.
However, with the floppy inserted when connecting, after the device notifier message, I see after switching to the console
/home/bs> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 477G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 476.5G 0 part
└─cr-auto-1 254:0 0 476.5G 0 crypt
├─system-root 254:1 0 40G 0 lvm /
├─system-swap 254:2 0 16G 0 lvm
└─system-home 254:3 0 420.5G 0 lvm /home
sdb 8:16 1 1.4M 0 disk /run/media/bs/disk
sr0 11:0 1 1024M 0 rom
The size of sdb is 1.4M - should be OK, right?
To see the filesystem type, I used:
Note that the 1.2M is the available space, not the full capacity. Also, note that no FSTYPE is reported.
However, despite the message, the floppy seems to be mounted.
I used the mount command as decribed in one of your answers:
/home/bs> mount|grep sdb
/dev/sdb on /run/media/bs/disk type vfat (rw,nosuid,nodev,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,uhelper=udisks2)
Seems to be vfat filesystem, right? Should be readable and writable, right? At least that is reported. Checking the contents of the floppy, I get a result as reported yesterday:
/home/bs> ls -a /run/media/bs/disk
. ..
I know from the test with the Windows system having an internal floppy drive that the medium does contain several files.
By the way, here is the lsusb output:
/home/bs> lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0a2b Intel Corp.
Bus 001 Device 005: ID 0644:0000 TEAC Corp. Floppy
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Does some of this information help to track down the problem? What additional information would you need?
In any case, you provided a lot of useful information. Thanks for that.
I also can see why your conclusions: detected by the kernel and given device file /dev/sdb. Contains a vfat file system. Mounted by the desktp at /run /media/bs/disk, where bs is the user (and made the owner because vfat has no owner by itself) and disk is probably a label (you could check what other identifiers are valid with
ls -l /dev/disk/* | grep sdb
).
Inpecting the contents with ls shows only the directory itself and it’s parent, no real contents.
lsblk says 13% used or 0.2 from 1.4 (leaving 1.2 available). Hm.
Could you try
erlangen:~ # mount|grep disk
/dev/sdc on /run/media/karl/disk type vfat (ro,nosuid,nodev,relatime,**uid=1000,gid=100**,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
erlangen:~ #
This is different. Try to add the missing options. If that does not help provide journal:
Apr 01 21:51:55 erlangen kernel: usb 1-10: new full-speed USB device number 17 using xhci_hcd
Apr 01 21:51:56 erlangen kernel: usb 1-10: New USB device found, idVendor=0644, idProduct=0000, bcdDevice= 2.00
Apr 01 21:51:56 erlangen kernel: usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 01 21:51:56 erlangen kernel: usb 1-10: Product: TEACV2.0
Apr 01 21:51:56 erlangen kernel: usb 1-10: Manufacturer: TEACV2.0
Apr 01 21:51:56 erlangen kernel: usb-storage 1-10:1.0: USB Mass Storage device detected
Apr 01 21:51:56 erlangen kernel: scsi host6: usb-storage 1-10:1.0
Apr 01 21:51:56 erlangen mtp-probe[17466]: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10"
Apr 01 21:51:56 erlangen mtp-probe[17466]: bus: 1, device: 17 was not an MTP device
Apr 01 21:51:56 erlangen mtp-probe[17470]: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10"
Apr 01 21:51:56 erlangen mtp-probe[17470]: bus: 1, device: 17 was not an MTP device
Apr 01 21:51:57 erlangen kernel: scsi 6:0:0:0: Direct-Access TEAC USB UF000x 2.00 PQ: 0 ANSI: 0 CCS
Apr 01 21:51:57 erlangen kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
Apr 01 21:51:57 erlangen kernel: sd 6:0:0:0: Power-on or device reset occurred
Apr 01 21:51:59 erlangen kernel: sd 6:0:0:0: [sdc] 2880 512-byte logical blocks: (1.47 MB/1.41 MiB)
Apr 01 21:52:00 erlangen kernel: sd 6:0:0:0: [sdc] Write Protect is on
Apr 01 21:52:00 erlangen kernel: sd 6:0:0:0: [sdc] Mode Sense: 00 46 94 80
Apr 01 21:52:00 erlangen kernel: sd 6:0:0:0: [sdc] No Caching mode page found
Apr 01 21:52:00 erlangen kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
Apr 01 21:52:00 erlangen kernel: ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting.
Apr 01 21:52:00 erlangen kernel: ldm_validate_privheads(): Cannot find PRIVHEAD 1.
Apr 01 21:52:00 erlangen kernel: sdc:
Apr 01 21:52:01 erlangen kernel: sd 6:0:0:0: [sdc] Attached SCSI removable disk
Apr 01 21:52:06 erlangen kwin_x11[2230]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 49862, resource id: 37750862, major code: 2 (ChangeWindowAttributes), minor code: 0
Apr 01 21:52:07 erlangen udisksd[1984]: Mounted /dev/sdc at /run/media/karl/disk on behalf of uid 1000
It is indeed strange, those uid= and gid= options should be there, added atomagicaly by a desktop mount.
You could at least check what the owners of the few files we have now are:
ls -la /run/media/bs/disk
(the ls -a alone is bit minimal).
disk seems to be a sort of default, no label shown in your output (only id and path).
Mountimg it yourself means that it should not be mounted by the desktop, or umount when already mounted.
But, as we are not interested at the moment about who should be the owner, but if there can be found files on it, I assume that we can go back to the ls -ls statement. When the owner and group are not bs and users (in the above output), please repeat as root the
Yes, they do not belong to bs, but that is at the moment of no importance (maybe we have to address that later when the files are there). Thing is that the file sytem is apparently a correct vfat file system, but there are no files in it.
That is not very strange at all, but you tell us there is definitely something there. Until now we simply believed you ;), but can you give us any more information (at best some listing made on another system) what is expected to be there?
And if I may comment already before Karl, that dd command should show a the complete 1.4 MB copied, because dd does not care about the contents, it only copies bytes. Thus an I/O error after only 8.2 KB points to some failure of the device IMHO.
Well, here is the output of a dir command on Windows XP (unfortunately in German):
Volume in Laufwerk A: hat keine Bezeichnung.
Volumeseriennummer: 3148-11E3
Verzeichnis von A:\
06/30/1999 11:15 AM 28,160 PYR1.doc
06/30/1999 11:25 AM 98,366 pyr1.bmp
06/30/1999 11:20 AM 1,644 Image21.gif
06/30/1999 11:20 AM 2,052 Image22.gif
06/30/1999 11:20 AM 1,715 Image23.gif
06/30/1999 11:20 AM 1,029 PYR1.htm
06/30/1999 11:39 AM 55,127 pyr1.pcx
07/01/1999 04:01 PM 127 WS_FTP.LOG
8 Datei(en) 188,220 Bytes
0 Verzeichnis(se), 1,266,688 Bytes frei
As you see, the number of bytes corresponds to the “used” space reported by the df command when the USB device with the disk is connected to the Linux machine.
Second piece of information for now is the result of the modified dd command as to Karl (now the device is sdc, because I used another USB device before):
/home/bs> sudo dd conv=noerror if=/dev/sdc of=floppy.iso
[sudo] password for root:
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 24.3848 s, 0.3 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 34.1764 s, 0.2 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 43.8404 s, 0.2 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 53.4405 s, 0.2 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 63.0405 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 72.6406 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 82.3047 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 91.9047 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 106.305 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 115.969 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 125.569 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 135.169 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 144.833 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 154.433 s, 0.1 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 168.833 s, 0.0 kB/s
dd: error reading '/dev/sdc': Input/output error
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 183.298 s, 0.0 kB/s
and this goes on (forever?), so I stopped the execution of the command.
I also noticed when trying to look into the craeted file (which of course contains a lot of unreadable stuff) some lines that may tell us something:
/home/bs> sudo more floppy.iso
�<�):ie%IHC��:f�|f;�W�u���V��s�3ɊF��fFVFыv`�F�V�� �� ;�r�ݾ}���t<�t ��
�V$��dar
@uB^
Iuw�'
Ungueltiges System �
E/A-Fehler �
Datentraeger wechseln und Taste druecken
��
��
��
��
�
(invalid system, i/o-error, change disk and press key). What is this?
The other suggestion of Karl, to use a live Tumbleweed USB, will take some more time, because I will have to read and understand what I am doing then. I will try that definitely too, but maybe the above will lead us further.