Subject: 128MB MO Drive with NetBSD
To: None <port-mac68k@NetBSD.ORG>
From: Mark Andres <mark@ratbert.aisol.net>
List: netbsd-help
Date: 11/08/1997 22:49:41
Hi All,

I dusted off an old 128MB MO drive that I used to use for backups on my
Mac.  It's old and slow, but it would be perfect for backups if I can get
it to work with NetBSD.  So while I was rebooting my IIcx as part of
upgrading to 1.3-ALPHA, I slapped on the MO drive (SCSI, BTW).

Has anyone ever successfully used a 128MB MO drive with NetBSD?  If so, I
would reaaly appreciate some pointers.

Here is what I have done so far.

I found a web page in Japanese that has a section on setting up a 230MB MO
drive. (http://axefw.axe-inc.co.jp/~bsd/macbsd11/netbsd.html)
According to those instructions, you add an entry in /etc/disktab like
this:

  mo230:\
        :ty=removable:ns#32:nt#64:nc#217:\
        :pc#444416:oc#0:bc#8192:fc#1024:

Then, you should be able to do the following commands:

  disklabel -w -r sd1 mo230
  newfs sd1c
  mkdir /mo
  mount /dev/sd1c /mo

So I attached the MO drive to my Mac IIcx.  It seems to be recognized at
boot time.  Here is a snippet from dmesg:

  sd1 at scsibus0 targ 5 lun 0: <SONY, SMO-F331-10, 1.21> SCSI2 7/optical
  removable
  sd1: 121MB, 121 cyl, 64 head, 32 sec, 512 bytes/sect x 248826 sectors

So I naively entered the following entry in /etc/disktab :

  mo128:\
        :ty=removable:ns#32:nt#64:nc#121:\
        :pc#248826:oc#0:bc#8192:fc#1024:

Using a GENERIC (non-SBC) kernel, if I try to do 

  disklabel -w -r sd1 mo128

I get a kernel panic.  If I boot with a GENERIC-SBC kernel, I get 

  partition c: extends beyond the boundaries of the disk

and then a kernel panic.  The kernel panics in both cases say:

  kernel: MMU trap fault

[ lists kernel registers and kernel stack ]

  panic:  MMU fault

and I am dropped into the debugger.  If I do a trace, I get:

  _Debugger(8,f4396,f274c,f23e3,6c35fc0) + 6

The error message before the panic makes me assume that I don't have the
/etc/disktab entry set properly.  In any case, any help or pointers would
be greatly appreciated.

Mark Andres                  E-mail: mark@ratbert.aisol.net
          Running NetBSD, 100% Microsoft Free!
Me: /www2.giganet.net/~mark/ NetBSD: /bullwinkle.aisol.net/