NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: noob Question: How to format a floppy on a USB floppy disk drive (on RPi 4) ?
On Tue, Nov 15, 2022 at 04:04:05PM -0800, Michael Cheponis wrote:
> Nov 15 23:42:22 arm64 /netbsd: [ 1728677.3990874] sd1(umass1:0:0): not
> ready, data = 00 00 00 00 3a 00 00 00 00 00
> Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2630115] sd1: detached
> Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2630115] atapibus0: detached
> Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2670131] umass1: detached
> Nov 15 23:42:22 arm64 /netbsd: [ 1729062.2700137] umass1: at uhub2 port 1
> (addr 3) disconnected
>
> Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0440298] umass1 at uhub2 port 1
> configuration 1 interface 0
> Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0480306] umass1: TEACV0.0 (0x0644)
> TEACV0.0 (0x0000), rev 1.10/2.00, addr 3
> Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0550327] umass1: using UFI over
> CBI with CCI
> Nov 15 23:42:29 arm64 /netbsd: [ 1729069.0560337] atapibus0 at umass1: 2
> targets
> Nov 15 23:42:29 arm64 /netbsd: [ 1729069.1262885] sd1 at atapibus0 drive 0:
> <TEAC, USB UF000x, 0.00> disk removable
> Nov 15 23:42:30 arm64 /netbsd: [ 1729069.9404460] sd1: 1440 KB, 80 cyl, 2
> head, 18 sec, 512 bytes/sect x 2880 sectors
A bit strange, but otherwise ok. A real SCSI device would attach
as sd1 in offline mode and will become online when the medium is
recognized.
> I see other unexpected behavior; when I copy to identical files that are
> exactly 1/2 of 1.4 MB long
> # ll f1 f2
>
> -rw-r--r-- 1 mac wheel 737280 Nov 15 02:53 f1
> -rw-r--r-- 1 mac wheel 737280 Nov 15 02:54 f2
>
> Each of these is 1440 sectors (std 512-byte sectors); I know the diskette
> is 'perfect' (no defects), yet when I write both of these files to the
> mounted "/a" filesystem, only f1 gets fully written, and then it complains
> there's not enough room for f2:
A filesystem needs to store more data than just the file contents.
> total 2592
> -rwxr-xr-x 1 root wheel 737280 Nov 15 08:06 f1*
> -rwxr-xr-x 1 root wheel 589824 Nov 15 23:59 f2*
>
> If I rm /a/f2 and then write it again, there is even less 'space':
>
> # rm /a/f2
> arm64# cp f2 /a
> cp: /a/f2: No space left on device
> arm64# ll /a
> total 1568
> -rwxr-xr-x 1 root wheel 737280 Nov 15 08:06 f1*
> -rwxr-xr-x 1 root wheel 65536 Nov 16 00:00 f2*
This looks like a bug somewhere, but maybe you did remove the
mounted medium at some point?
So what kind of filesystem did you use? FFS? FAT?
My guess is that you need to use fsck to fix the inconsistencies
and find out when they occur. The usual culprits are media removal
while mounted, hard reset of the system, or failure to unmount
when rebooting.
Home |
Main Index |
Thread Index |
Old Index