NetBSD Problem Report #55628

From www@netbsd.org  Sun Aug 30 18:38:01 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B84701A923A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 30 Aug 2020 18:38:01 +0000 (UTC)
Message-Id: <20200830183800.6B04A1A923F@mollari.NetBSD.org>
Date: Sun, 30 Aug 2020 18:38:00 +0000 (UTC)
From: joernc@gmail.com
Reply-To: joernc@gmail.com
To: gnats-bugs@NetBSD.org
Subject: inserting blank disk into USB Floppy drive panics NetBSD 9.0/amd64
X-Send-Pr-Version: www-1.0

>Number:         55628
>Category:       kern
>Synopsis:       inserting blank disk into USB Floppy drive panics NetBSD 9.0/amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 30 18:40:00 +0000 2020
>Last-Modified:  Sun Aug 30 20:05:01 +0000 2020
>Originator:     Joern Clausen
>Release:        9.0/amd64
>Organization:
>Environment:
NetBSD itix.joern.loc 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
I have an old USB Floppy drive. This is logged when plugging it in:

[    84.478242] umass1 at uhub3 port 3 configuration 1 interface 0
[    84.478242] umass1: TEAC (0x644) TEAC FD-05PUW (0000), rev 2.00/0.00, addr 6
[    84.478242] umass1: using UFI over CBI with CCI
[    84.478242] atapibus0 at umass1: 2 targets
[    84.558295] sd1 at atapibus0 drive 0: <TEAC, FD-05PUW, 3000> disk removable
[    84.628340] sd1: drive offline

When inserting a blank disk, it is read for a second, that the machine crashes:

[    93.874370] fatal integer divide fault in supervisor mode
[    93.874370] trap type 8 code 0 rip 0xffffffff809716b3 cs 0x8 rflags 0x10246 cr2 0x756bf954a000 ilevel 0 rsp 0xffff9a0064c929b0
[    93.874370] curlwp 0xffff96a32578a540 pid 1010.1 lowest kstack 0xffff9a0064c902c0
[    93.874370] panic: trap
[    93.874370] cpu3: Begin traceback...
[    93.874370] vpanic() at netbsd:vpanic+0x160
[    93.874370] snprintf() at netbsd:snprintf
[    93.874370] startlwp() at netbsd:startlwp
[    93.874370] alltraps() at netbsd:alltraps+0xbb
[    93.884376] scan_mbr() at netbsd:scan_mbr+0x3e
[    93.884376] readdisklabel() at netbsd:readdisklabel+0x110
[    93.884376] dk_getdisklabel() at netbsd:dk_getdisklabel+0xc8
[    93.884376] dk_open() at netbsd:dk_open+0x120
[    93.884376] spec_open() at netbsd:spec_open+0x175
[    93.894383] VOP_OPEN() at netbsd:VOP_OPEN+0x4c
[    93.894383] vn_open() at netbsd:vn_open+0x241
[    93.894383] do_open() at netbsd:do_open+0x103
[    93.894383] do_sys_openat() at netbsd:do_sys_openat+0x8b
[    93.894383] sys_open() at netbsd:sys_open+0x24
[    93.894383] syscall() at netbsd:syscall+0x157
[    93.904389] --- syscall (number 5) ---
[    93.904389] 756bf88429fa:
[    93.904389] cpu3: End traceback...

[    93.904389] dumping to dev 0,1 (offset=611511, size=972259):
[    93.904389] dump Skipping crash dump on recursive panic
[    94.794968] panic: pr_item_bitmap_put: [ataspl] 0xffff96a338d39038 already freed
[    94.794968] cpu3: Begin traceback...
[    94.794968] vpanic() at netbsd:vpanic+0x160
[    94.794968] snprintf() at netbsd:snprintf
[    94.794968] pool_put() at netbsd:pool_put+0x492
[    94.804975] ahci_bio_complete() at netbsd:ahci_bio_complete+0x177
[    94.804975] ahci_intr_port() at netbsd:ahci_intr_port+0x23e
[    94.804975] ahci_bio_poll() at netbsd:ahci_bio_poll+0x2b
[    94.804975] ata_xfer_start() at netbsd:ata_xfer_start+0xaa
[    94.804975] atastart() at netbsd:atastart+0x1d2
[    94.804975] ahci_ata_bio() at netbsd:ahci_ata_bio+0x5f
[    94.814982] wd_dumpblocks() at netbsd:wd_dumpblocks+0x111
[    94.814982] dk_dump() at netbsd:dk_dump+0x172
[    94.814982] dumpsys_seg() at netbsd:dumpsys_seg+0xd0
[    94.814982] dump_seg_iter() at netbsd:dump_seg_iter+0x107
[    94.814982] dodumpsys() at netbsd:dodumpsys+0x268
[    94.814982] dumpsys() at netbsd:dumpsys+0x1d
[    94.824988] vpanic() at netbsd:vpanic+0x169
[    94.824988] snprintf() at netbsd:snprintf
[    94.824988] startlwp() at netbsd:startlwp
[    94.824988] alltraps() at netbsd:alltraps+0xbb
[    94.824988] scan_mbr() at netbsd:scan_mbr+0x3e
[    94.824988] readdisklabel() at netbsd:readdisklabel+0x110
[    94.834995] dk_getdisklabel() at netbsd:dk_getdisklabel+0xc8
[    94.834995] dk_open() at netbsd:dk_open+0x120
[    94.834995] spec_open() at netbsd:spec_open+0x175
[    94.834995] VOP_OPEN() at netbsd:VOP_OPEN+0x4c
[    94.834995] vn_open() at netbsd:vn_open+0x241
[    94.834995] do_open() at netbsd:do_open+0x103
[    94.845001] do_sys_openat() at netbsd:do_sys_openat+0x8b
[    94.845001] sys_open() at netbsd:sys_open+0x24
[    94.845001] syscall() at netbsd:syscall+0x157
[    94.845001] --- syscall (number 5) ---


This is the backtrace using crash(8) on the generated kernel dump and core (from a second attempt, so some values differ to the above output):

Crash version 9.0, image version 9.0.
System panicked: trap
Backtrace from time of crash is available.
db> crash> bt
_KERNEL_OPT_NARCNET() at 0
?() at ffffb50064d10000
vpanic() at vpanic+0x169
snprintf() at snprintf
startlwp() at startlwp
calltrap() at calltrap+0x11
scan_mbr() at scan_mbr+0x3e
readdisklabel() at readdisklabel+0x110
dk_getdisklabel() at dk_getdisklabel+0xc8
dk_open() at dk_open+0x120
spec_open() at spec_open+0x175
VOP_OPEN() at VOP_OPEN+0x4c
vn_open() at vn_open+0x241
do_open() at do_open+0x103
do_sys_openat() at do_sys_openat+0x8b
sys_open() at sys_open+0x24
syscall() at syscall+0x157
--- syscall (number 5) ---
78440f4429fa:

>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 NetBSD 9.0/amd64
Date: Sun, 30 Aug 2020 20:49:07 +0200

 On Sun, Aug 30, 2020 at 06:40:00PM +0000, joernc@gmail.com wrote:
 > NetBSD itix.joern.loc 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
 > >Description:

 Can you please update (at least the kernel) to a newer 9.0_STABLE and retry?

 Martin

From: =?UTF-8?Q?J=C3=B6rn_Clausen?= <joernc@googlemail.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 NetBSD 9.0/amd64
Date: Sun, 30 Aug 2020 20:58:22 +0200

 --00000000000059f50005ae1cdfc9
 Content-Type: text/plain; charset="UTF-8"

 Where would I find this kernel? Temporarily replacing the kernel is no
 problem, but updating the complete system is not an option for me.

 On Sun, Aug 30, 2020 at 8:50 PM Martin Husemann <martin@duskware.de> wrote:

 > The following reply was made to PR kern/55628; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 >  NetBSD 9.0/amd64
 > Date: Sun, 30 Aug 2020 20:49:07 +0200
 >
 >  On Sun, Aug 30, 2020 at 06:40:00PM +0000, joernc@gmail.com wrote:
 >  > NetBSD itix.joern.loc 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28
 > UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC
 > amd64
 >  > >Description:
 >
 >  Can you please update (at least the kernel) to a newer 9.0_STABLE and
 > retry?
 >
 >  Martin
 >
 >

 -- 
 Joern Clausen
 https://www.oe-files.de/photography/

 --00000000000059f50005ae1cdfc9
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr">Where would I find this kernel? Temporarily replacing the =
 kernel is no problem, but updating the complete system is not an option for=
  me.<br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmai=
 l_attr">On Sun, Aug 30, 2020 at 8:50 PM Martin Husemann &lt;<a href=3D"mail=
 to:martin@duskware.de">martin@duskware.de</a>&gt; wrote:<br></div><blockquo=
 te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
 solid rgb(204,204,204);padding-left:1ex">The following reply was made to PR=
  kern/55628; it has been noted by GNATS.<br>
 <br>
 From: Martin Husemann &lt;<a href=3D"mailto:martin@duskware.de" target=3D"_=
 blank">martin@duskware.de</a>&gt;<br>
 To: <a href=3D"mailto:gnats-bugs@netbsd.org" target=3D"_blank">gnats-bugs@n=
 etbsd.org</a><br>
 Cc: <br>
 Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics<=
 br>
 =C2=A0NetBSD 9.0/amd64<br>
 Date: Sun, 30 Aug 2020 20:49:07 +0200<br>
 <br>
 =C2=A0On Sun, Aug 30, 2020 at 06:40:00PM +0000, <a href=3D"mailto:joernc@gm=
 ail.com" target=3D"_blank">joernc@gmail.com</a> wrote:<br>
 =C2=A0&gt; NetBSD itix.joern.loc 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00=
 :06:28 UTC 2020=C2=A0 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/co=
 mpile/GENERIC amd64<br>
 =C2=A0&gt; &gt;Description:<br>
 <br>
 =C2=A0Can you please update (at least the kernel) to a newer 9.0_STABLE and=
  retry?<br>
 <br>
 =C2=A0Martin<br>
 <br>
 </blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
 mail_signature">Joern Clausen<br><a href=3D"https://www.oe-files.de/photogr=
 aphy/" target=3D"_blank">https://www.oe-files.de/photography/</a></div>

 --00000000000059f50005ae1cdfc9--

From: Martin Husemann <martin@duskware.de>
To: =?iso-8859-1?Q?J=F6rn?= Clausen <joernc@googlemail.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 NetBSD 9.0/amd64
Date: Sun, 30 Aug 2020 21:01:44 +0200

 On Sun, Aug 30, 2020 at 08:58:22PM +0200, Jörn Clausen wrote:
 > Where would I find this kernel? Temporarily replacing the kernel is no
 > problem, but updating the complete system is not an option for me.

 	http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/

 I suspect this will make it work and you can use that kernel with your
 9.0 userland w/o problems.

 We usually are quite carefull with changes on release branches, so a userland
 update is quite low risc too (but I can understand avoiding it if everything
 just works).

 Martin

From: =?UTF-8?Q?J=C3=B6rn_Clausen?= <joernc@googlemail.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 NetBSD 9.0/amd64
Date: Sun, 30 Aug 2020 21:21:11 +0200

 --000000000000fc71fe05ae1d30f9
 Content-Type: text/plain; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 Okay, the machine does not crash immediately! I can insert a floppy and get

 $ disklabel sd1
 # /dev/rsd1:
 type: ATAPI
 disk: FD-05PUW
 label: default label
 flags: removable
 bytes/sector: 512
 sectors/track: 0
 tracks/cylinder: 0
 sectors/cylinder: 0
 cylinders: 0
 total sectors: 536870911
 rpm: 0
 interleave: 1
 trackskew: 0
 cylinderskew: 0
 headswitch: 0           # microseconds
 track-to-track seek: 0  # microseconds
 drivedata: 0

 4 partitions:
 #        size    offset     fstype [fsize bsize cpg/sgs]
  a: 536870911         0     4.2BSD      0     0     0
  d: 536870911         0     unused      0     0

 Is it okay that sectors/track, tracks/cylinder and so on are 0 because they
 make no sense on a floppy?

 Trying to format the disk (newfs or newfs_msdos on /dev/sd1a or /dev/rsd1a)
 causes newfs* to core. Trying to copy the NetBSD install floppy with

 $ dd if=3Dboot1.fs of=3D/dev/rsd1d

 results in the same crash as before:

 [   273.925000] fatal integer divide fault in supervisor mode
 [   273.925000] trap type 8 code 0 rip 0xffffffff809fb829 cs 0x8 rflags
 0x10246 cr2 0x7e4a38da5000 ilevel 0 rsp 0xffffbf0063c16c90
 [   273.925000] curlwp 0xffff9e11ac420160 pid 2119.1 lowest kstack
 0xffffbf0063c142c0
 [   273.925000] panic: trap
 [   273.925000] cpu0: Begin traceback...
 [   273.925000] vpanic() at netbsd:vpanic+0x160
 [   273.925000] snprintf() at netbsd:snprintf
 [   273.925000] startlwp() at netbsd:startlwp
 [   273.925000] alltraps() at netbsd:alltraps+0xbb
 [   273.935009] dk_strategy1() at netbsd:dk_strategy1+0x17
 [   273.935009] dk_strategy() at netbsd:dk_strategy+0x12
 [   273.935009] physio() at netbsd:physio+0x2c8
 [   273.935009] spec_write() at netbsd:spec_write+0x58
 [   273.935009] VOP_WRITE() at netbsd:VOP_WRITE+0x50
 [   273.945016] vn_write() at netbsd:vn_write+0xfb
 [   273.945016] dofilewrite() at netbsd:dofilewrite+0x96
 [   273.945016] sys_write() at netbsd:sys_write+0x49
 [   273.945016] syscall() at netbsd:syscall+0x157

 On Sun, Aug 30, 2020 at 9:01 PM Martin Husemann <martin@duskware.de> wrote:

 > On Sun, Aug 30, 2020 at 08:58:22PM +0200, J=C3=B6rn Clausen wrote:
 > > Where would I find this kernel? Temporarily replacing the kernel is no
 > > problem, but updating the complete system is not an option for me.
 >
 >         http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/
 >
 > I suspect this will make it work and you can use that kernel with your
 > 9.0 userland w/o problems.
 >
 > We usually are quite carefull with changes on release branches, so a
 > userland
 > update is quite low risc too (but I can understand avoiding it if
 > everything
 > just works).
 >
 > Martin
 >


 --=20
 Joern Clausen
 https://www.oe-files.de/photography/

 --000000000000fc71fe05ae1d30f9
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div>Okay, the machine does not crash immediately! I can i=
 nsert a floppy and get</div><div><br></div><div>$ disklabel sd1<br># /dev/r=
 sd1:<br>type: ATAPI<br>disk: FD-05PUW<br>label: default label<br>flags: rem=
 ovable<br>bytes/sector: 512<br>sectors/track: 0<br>tracks/cylinder: 0<br>se=
 ctors/cylinder: 0<br>cylinders: 0<br>total sectors: 536870911<br>rpm: 0<br>=
 interleave: 1<br>trackskew: 0<br>cylinderskew: 0<br>headswitch: 0 =C2=A0 =
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # microseconds<br>track-to-track seek: 0 =C2=A0=
 # microseconds<br>drivedata: 0 <br><br>4 partitions:<br># =C2=A0 =C2=A0 =C2=
 =A0 =C2=A0size =C2=A0 =C2=A0offset =C2=A0 =C2=A0 fstype [fsize bsize cpg/sg=
 s]<br>=C2=A0a: 536870911 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 4.2BSD=
  =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 <br>=C2=A0d: 5368709=
 11 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 unused =C2=A0 =C2=A0 =C2=A00=
  =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2=A0 <br></div><div><br></div><div>Is it o=
 kay that sectors/track, tracks/cylinder and so on are 0 because they make n=
 o sense on a floppy?<br></div><div><br></div><div>Trying to format the disk=
  (newfs or newfs_msdos on /dev/sd1a or /dev/rsd1a) causes newfs* to core. T=
 rying to copy the NetBSD install floppy with</div><div><br></div><div>$ dd =
 if=3Dboot1.fs of=3D/dev/rsd1d</div><div><br></div><div>results in the same =
 crash as before:</div><div><br></div><div>[ =C2=A0 273.925000] fatal intege=
 r divide fault in supervisor mode<br>[ =C2=A0 273.925000] trap type 8 code =
 0 rip 0xffffffff809fb829 cs 0x8 rflags 0x10246 cr2 0x7e4a38da5000 ilevel 0 =
 rsp 0xffffbf0063c16c90<br>[ =C2=A0 273.925000] curlwp 0xffff9e11ac420160 pi=
 d 2119.1 lowest kstack 0xffffbf0063c142c0<br>[ =C2=A0 273.925000] panic: tr=
 ap<br>[ =C2=A0 273.925000] cpu0: Begin traceback...<br>[ =C2=A0 273.925000]=
  vpanic() at netbsd:vpanic+0x160<br>[ =C2=A0 273.925000] snprintf() at netb=
 sd:snprintf<br>[ =C2=A0 273.925000] startlwp() at netbsd:startlwp<br>[ =C2=
 =A0 273.925000] alltraps() at netbsd:alltraps+0xbb<br>[ =C2=A0 273.935009] =
 dk_strategy1() at netbsd:dk_strategy1+0x17<br>[ =C2=A0 273.935009] dk_strat=
 egy() at netbsd:dk_strategy+0x12<br>[ =C2=A0 273.935009] physio() at netbsd=
 :physio+0x2c8<br>[ =C2=A0 273.935009] spec_write() at netbsd:spec_write+0x5=
 8<br>[ =C2=A0 273.935009] VOP_WRITE() at netbsd:VOP_WRITE+0x50<br>[ =C2=A0 =
 273.945016] vn_write() at netbsd:vn_write+0xfb<br>[ =C2=A0 273.945016] dofi=
 lewrite() at netbsd:dofilewrite+0x96<br>[ =C2=A0 273.945016] sys_write() at=
  netbsd:sys_write+0x49<br>[ =C2=A0 273.945016] syscall() at netbsd:syscall+=
 0x157<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
 =3D"gmail_attr">On Sun, Aug 30, 2020 at 9:01 PM Martin Husemann &lt;<a href=
 =3D"mailto:martin@duskware.de">martin@duskware.de</a>&gt; wrote:<br></div><=
 blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
 eft:1px solid rgb(204,204,204);padding-left:1ex">On Sun, Aug 30, 2020 at 08=
 :58:22PM +0200, J=C3=B6rn Clausen wrote:<br>
 &gt; Where would I find this kernel? Temporarily replacing the kernel is no=
 <br>
 &gt; problem, but updating the complete system is not an option for me.<br>
 <br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://nycdn.netbsd.org/pub/NetBSD-d=
 aily/netbsd-9/latest/" rel=3D"noreferrer" target=3D"_blank">http://nycdn.ne=
 tbsd.org/pub/NetBSD-daily/netbsd-9/latest/</a><br>
 <br>
 I suspect this will make it work and you can use that kernel with your<br>
 9.0 userland w/o problems.<br>
 <br>
 We usually are quite carefull with changes on release branches, so a userla=
 nd<br>
 update is quite low risc too (but I can understand avoiding it if everythin=
 g<br>
 just works).<br>
 <br>
 Martin<br>
 </blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
 mail_signature">Joern Clausen<br><a href=3D"https://www.oe-files.de/photogr=
 aphy/" target=3D"_blank">https://www.oe-files.de/photography/</a></div>

 --000000000000fc71fe05ae1d30f9--

From: Martin Husemann <martin@duskware.de>
To: =?iso-8859-1?Q?J=F6rn?= Clausen <joernc@googlemail.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 NetBSD 9.0/amd64
Date: Sun, 30 Aug 2020 21:25:06 +0200

 Are there any kernel messages printed when inserting the disk?

 You quoted the dmesg from the empty drive at attack time, but that did
 not have any geometry data yet.

 Martin

From: =?UTF-8?Q?J=C3=B6rn_Clausen?= <joernc@googlemail.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55628: inserting blank disk into USB Floppy drive panics
 NetBSD 9.0/amd64
Date: Sun, 30 Aug 2020 22:04:34 +0200

 --00000000000018626a05ae1dccc8
 Content-Type: text/plain; charset="UTF-8"

 On Sun, Aug 30, 2020 at 9:25 PM Martin Husemann <martin@duskware.de> wrote:

 > Are there any kernel messages printed when inserting the disk?
 >

 No. There is brief access to the disk, but no messages are logged.

 You quoted the dmesg from the empty drive at attack time, but that did
 > not have any geometry data yet.
 >

 Without a disk inserted, disklabel shows

 disklabel: /dev/rsd1: Operation not supported by device

 Booting with a disk inserted results again in a crash. Right after sd1 is
 detected, the message

 sd1: unformatted media

 is shown. Although the kernel debugger is started, I cannot use it with my
 USB keyboard (which normally is the case). It looks as if USB is borked at
 that point.

 When I boot without the drive and attach it with a disk inserted, the same
 message as above is shown.

 According to the box the disks should be "IBM formatted". I just tried it
 on a Windows box, and the disk was shown as unformatted. After formatting
 it there, it is now usable under NetBSD:

 [ 867.6658131] sd1 at atapibus0 drive 0: <TEAC, FD-05PUW, 3000> disk
 removable
 [ 868.7570577] sd1: 1440 KB, 80 cyl, 2 head, 18 sec, 512 bytes/sect x 2880
 sectors

 $ disklabel sd1
 # /dev/rsd1:
 type: ATAPI
 disk: FD-05PUW
 label: default label
 flags: removable
 bytes/sector: 512
 sectors/track: 18
 tracks/cylinder: 2
 sectors/cylinder: 36
 cylinders: 80
 total sectors: 2880
 rpm: 7680
 interleave: 1
 trackskew: 0
 cylinderskew: 0
 headswitch: 0           # microseconds
 track-to-track seek: 0  # microseconds
 drivedata: 0

 4 partitions:
 #        size    offset     fstype [fsize bsize cpg/sgs]
  a:      2880         0     4.2BSD      0     0     0  # (Cyl.      0 -
 79)
  d:      2880         0     unused      0     0        # (Cyl.      0 -
 79)
 disklabel: boot block size 0
 disklabel: super block size 0

 $ mount_msdos /dev/sd1a /mnt

 $ df -k /mnt
 Filesystem    1K-blocks       Used      Avail %Cap Mounted on
 /dev/sd1a          1423          1       1422   0% /mnt

 And dd'ing the boot image to /dev/rsd1d now also works.

 I then tried "fdformat" on all combinations (sd1 and rsd1, partition a and
 d), but always got

 fdformat: Device `/dev/rsd1a' does not support floppy formatting:
 Inappropriate ioctl for device

 -- 
 Joern Clausen
 https://www.oe-files.de/photography/

 --00000000000018626a05ae1dccc8
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr">On Sun, Aug 30, 2020 at 9:25 PM Martin Husemann &lt;<a hre=
 f=3D"mailto:martin@duskware.de" target=3D"_blank">martin@duskware.de</a>&gt=
 ; wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" st=
 yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
 ing-left:1ex">Are there any kernel messages printed when inserting the disk=
 ?<br></blockquote><div><br></div><div>No. There is brief access to the disk=
 , but no messages are logged.</div><div> <br></div><blockquote class=3D"gma=
 il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
 04,204);padding-left:1ex">
 You quoted the dmesg from the empty drive at attack time, but that did<br>
 not have any geometry data yet.<br></blockquote><div><br></div><div>Without=
  a disk inserted, disklabel shows</div><div><br></div><div> disklabel: /dev=
 /rsd1: Operation not supported by device</div><div><br></div><div>Booting w=
 ith a disk inserted results again in a crash. Right after sd1 is detected, =
 the message</div><div><br></div><div>sd1: unformatted media</div><div><br><=
 /div><div>is shown. Although the kernel debugger is started, I cannot use i=
 t with my USB keyboard (which normally is the case). It looks as if USB is =
 borked at that point.<br></div><div><br></div><div>When I boot without the =
 drive and attach it with a disk inserted, the same message as above is show=
 n.</div><div><br></div><div>According to the box the disks should be &quot;=
 IBM formatted&quot;. I just tried it on a Windows box, and the disk was sho=
 wn as unformatted. After formatting it there, it is now usable under NetBSD=
 :</div><div><br></div><div>[ 867.6658131] sd1 at atapibus0 drive 0: &lt;TEA=
 C, FD-05PUW, 3000&gt; disk removable<br>[ 868.7570577] sd1: 1440 KB, 80 cyl=
 , 2 head, 18 sec, 512 bytes/sect x 2880 sectors</div><div><br></div><div>$ =
 disklabel sd1<br># /dev/rsd1:<br>type: ATAPI<br>disk: FD-05PUW<br>label: de=
 fault label<br>flags: removable<br>bytes/sector: 512<br>sectors/track: 18<b=
 r>tracks/cylinder: 2<br>sectors/cylinder: 36<br>cylinders: 80<br>total sect=
 ors: 2880<br>rpm: 7680<br>interleave: 1<br>trackskew: 0<br>cylinderskew: 0<=
 br>headswitch: 0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # microseconds<br>track=
 -to-track seek: 0 =C2=A0# microseconds<br>drivedata: 0 <br><br>4 partitions=
 :<br># =C2=A0 =C2=A0 =C2=A0 =C2=A0size =C2=A0 =C2=A0offset =C2=A0 =C2=A0 fs=
 type [fsize bsize cpg/sgs]<br>=C2=A0a: =C2=A0 =C2=A0 =C2=A02880 =C2=A0 =C2=
 =A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 4.2BSD =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=
 =A0 0 =C2=A0 =C2=A0 0 =C2=A0# (Cyl. =C2=A0 =C2=A0 =C2=A00 - =C2=A0 =C2=A0 7=
 9)<br>=C2=A0d: =C2=A0 =C2=A0 =C2=A02880 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=
 =A0 =C2=A0 unused =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2=
 =A0 =C2=A0# (Cyl. =C2=A0 =C2=A0 =C2=A00 - =C2=A0 =C2=A0 79)<br>disklabel: b=
 oot block size 0<br>disklabel: super block size 0</div><div><br></div><div>=
 $ mount_msdos /dev/sd1a /mnt</div><div><br></div><div>$ df -k /mnt<br>Files=
 ystem =C2=A0 =C2=A01K-blocks =C2=A0 =C2=A0 =C2=A0 Used =C2=A0 =C2=A0 =C2=A0=
 Avail %Cap Mounted on<br>/dev/sd1a =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01423 =
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01 =C2=A0 =C2=A0 =C2=A0 1422 =C2=A0 0% /mn=
 t</div><div><br></div><div>And dd&#39;ing the boot image to /dev/rsd1d now =
 also works.</div><div><br></div><div>I then tried &quot;fdformat&quot; on a=
 ll combinations (sd1 and rsd1, partition a and d), but always got</div><div=
 ><br></div><div>fdformat: Device `/dev/rsd1a&#39; does not support floppy f=
 ormatting: Inappropriate ioctl for device<br></div><div></div></div><div><b=
 r></div>-- <br><div dir=3D"ltr">Joern Clausen<br><a href=3D"https://www.oe-=
 files.de/photography/" target=3D"_blank">https://www.oe-files.de/photograph=
 y/</a></div></div>

 --00000000000018626a05ae1dccc8--

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.