TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: HENRI DERKSEN
from: JAN PANTELTJE
date: 2018-08-08 08:36:00
subject: Re: Create NDIF disk imag

On a sunny day (Tue, 07 Aug 2018 11:47:00 +1200) it happened
nospam.Henri.Derksen@f1208.n280.z2.binkp.net (Henri Derksen) wrote in
:

>Hello Jan,

>Do you know if it is possible to get that USB Floppy disk drive working at a
Raspberry Pi?,


Interesting question.
Took it, removed the dust from it, and plugged it in the raspi running the
webserver.
Expected it to crash (How much power does it draw?), but:
root@raspberrypi:~# dmesg
[516954.521704] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[516954.674780] usb 1-1.3: New USB device found, idVendor=03ee, idProduct=6901
[516954.674817] usb 1-1.3: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[516954.674833] usb 1-1.3: Product: MITSUMI USB FDD 061M
[516954.674847] usb 1-1.3: Manufacturer: MITSUMI
[516954.678831] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[516954.691847] scsi0 : usb-storage 1-1.3:1.0
[516955.701095] scsi 0:0:0:0: Direct-Access     MITSUMI  USB FDD 061M     2.00
PQ: 0 ANSI: 0 CCS
[516955.814079] sd 0:0:0:0: Attached scsi generic sg0 type 0
[516959.925614] sd 0:0:0:0: [sda] Attached SCSI removable disk

So far so good.
Now to find a floppy..

Found some floppy with Linux filesystem
root@raspberrypi:~# fdisk /dev/sda
You will not be able to write the partition table.
fdisk: unable to read /dev/sda: Invalid argument
no go
lots of noises from the drive trying, disk is write protected it seems..

How about reading raw data?
root@raspberrypi:~# dd if=/dev/sda bs=512 count=1000 > q1
dd: reading /dev/sda': Input/output error
8+0 records in
8+0 records out
4096 bytes (4.1 kB) copied, 6.42305 s, 0.6 kB/s

Let's see what we got from the boot sector etc:
root@raspberrypi:~# hexedit q1

YES!!! lots of zeros and some data!



Other disk, old write protected backup ext2 format
root@raspberrypi:~# fdisk /dev/sda
You will not be able to write the partition table.
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
disklabel
Building a new DOS disklabel with disk identifier 0x72867184.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sda: 1 MB, 1474560 bytes
1 heads, 3 sectors/track, 960 cylinders, total 2880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x72867184

   Device Boot      Start         End      Blocks   Id  System



Still no sign of sda1, lemme see if I can mount it
root@raspberrypi:~# mkdir /mnt/sda1
root@raspberrypi:~# mount /dev/sda1 /mnt/sda1
mount: special device /dev/sda1 does not exist

Nope

root@raspberrypi:~# mount /dev/sda /mnt/sda1
mount: block device /dev/sda is write-protected, mounting read-only
AHA!!!

....
-rw-r--r-- 1 root root 28816 Jan  3  2002 new-timed.txt
-rw-r--r-- 1 root root 28794 Jan  3  2002 new-timed-strange-chars-test.txt
-rw------- 1 root root     0 Jan  3  2002 new-timed.ssa
-rw-r--r-- 1 root root 29238 Jan  3  2002 moving-new-timed.txt
-rw-r--r-- 1 root root 29251 Jan  3  2002 moving-new-timed-1.txt
....
-rw-r--r-- 1 root root  3727 Jan  3  2002 demo.ppml
-rw-r--r-- 1 root root   138 Jan  3  2002 cd-id.ppml
...

't works

I am not going to write to any of these disks, and have no free 3.5 inch disk.

root@raspberrypi:~# mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=219744k,nr_inodes=54936,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44784k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89560k)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p1 on /boot type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed
,errors=remount-ro)
/dev/sda on /mnt/sda1 type ext2 (ro,relatime) 
<-----------------------------------------------------

So, old ext2 from 3.5 inch floppy no problem reading on a raspi.
What surprises me, is that the rapi wallwart (voeding in Dutch) does not go
through its knees.
Must take some current that drive motor seeking back and forward.

So it works, write should work too on a not write protected disk.
Same for other filesystems.

Will it recognize and old windows disc?
This disc says: 'Windows 98 opstarten', probably win98 boot disc
root@raspberrypi:~# mount /dev/sda /mnt/sda1
mount: block device /dev/sda is write-protected, mounting read-only
root@raspberrypi:~# mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=219744k,nr_inodes=54936,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44784k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89560k)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p1 on /boot type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed
,errors=remount-ro)
/dev/sda on /mnt/sda1 type vfat
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed
,errors=remount-ro)

WORKS! vfat!
root@raspberrypi:~# l /mnt/sda1
total 1312
-rwxr-xr-x 1 root root   1431 May  6  1999 SETRAMD.BAT
-rwxr-xr-x 1 root root  12887 May  6  1999 RAMDRIVE.SYS
....
-r-xr-xr-x 1 root root      0 Mar 25  2000 EBD.SYS


root@raspberrypi:~# umount /dev/sda
root@raspberrypi:~# df
Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs           7610056 6962192    288436  97% /
/dev/root        7610056 6962192    288436  97% /
devtmpfs          219744       0    219744   0% /dev
tmpfs              44784     244     44540   1% /run
tmpfs               5120       0      5120   0% /run/lock
tmpfs              89560       0     89560   0% /run/shm
/dev/mmcblk0p1     57288   19864     37424  35% /boot


So, install win98 on your rapi?
That won't work. raspi has an ARM processor, needs X86.
But data you can read.
Even after 19 years.

Greetings
Jan

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.