Subject: Re: 128MB MO Drive with NetBSD
To: Mark Andres <mark@ratbert.aisol.net>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-help
Date: 11/08/1997 21:01:09
At 14:49 Uhr +0100 08.11.1997, Mark Andres wrote:

>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.

Welcome to the club...  What brand is it? Epson, Fujitsu?

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

The 128MB MO should behave no different than the 230MB ones (possibly apart
from quirks).


>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 :


I do not quite see why you'd have to fiddle with disklabel stuff on MacBSD
at all.
As you can see from its boot message the kernel has made perfect sense of
the drive and the media size. When you insert a media that has a MacOS
partition table on it (i.e. it was formatted with a MacOS formatter) the
kernel will make up an in-core disklabel from the partition table data when
the disk is accessed for the first time and this will be all you ever need.

You do not even need to format the media you use for dump(8) and tar(1);
simply write to the raw device (/dev/rsd1c) and you're set.

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

Looks sensible to me, but there is no partition defined that you could use
without overwriting the disklabel (c is the whole disk in MacBSD).

>Using a GENERIC (non-SBC) kernel, if I try to do
>
>  disklabel -w -r sd1 mo128
>
>I get a kernel panic.

ICK. Should not happen -- apart from the question whether writing "real"
BSD disklabels is enabled at all.

Scott? Allen?

[...]

>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.

o  Format the media under MacOS
o  Partition it (say, "A/UX SYSVR2 USR")
o  Boot NetBSD
o  Assuming the MO is your 2nd drive in the SCSI chain:
	Do a "disklabel /dev/sd1c" to see the kernel's notion
	of the partition letter (used to be "g", but might be
	"d" after Allen's changes, I am assuming "g" here).
o  Do a "newfs /dev/rsd1g", respectively
o  Scribble down the locatin of some superblock copies as fsck
	might want them some day.  ;)
o  Do a "mount /dev/sd1g /mnt"

In short, ignoring the disklabel(8) business at all should get you going.
On the other hand, while reading is fine, I have had my share of nasty data
corruption with writing to a Fujitsu M2512 through the 53c80 (mainly sbc
driver). Depending on your harddisk you may be happier with ncrscsi; the
040 esp driver is definitely more stable wrt. MOs.

Good luck,

	hauke



--
"It's never straight up and down"     (DEVO)