Subject: Re: whatever happened to my usr slice?
To: Jim Kannengieser <jimk@tuna.net>
From: Paul Goyette <paul@whooppee.com>
List: port-mac68k
Date: 11/09/1997 12:21:14
On Sun, 9 Nov 1997, Jim Kannengieser wrote:

> Here's the other part of the problem. My internal hard disk is at scsi id
> 6, and my external Syquest drive is at scsi id 2. MacBSD refers to the
> Syquest at /dev/sd0a and the internal disk as sd1a through whatever. the
> /etc/fstab.sd file refers to the usr slice as being on sd0g, which would
> put it on the Syquest. The Syquest does not have any NetBSD partitions on
> it, only one Mac partition. I tried referring to the /usr partition as
> /dev/sd1g and booting failed because the system couldn't find
> /usr/libexec/tty0e. I tried booting into single user mode to correct the
> problem, but the filesystem was read only. Do I have to start over from
> scratch with MacBSD, or can I salvage this installation.

As has been noted many times, the algorithm that NetBSD uses to assign
devices to SCSI ID's in somewhat less than intuitive.

Basically, it goes like this:

The SCSI bus is scanned in order, from target #0 to target #7.

The first disk it finds is assigned to sd0, the first tape it find is
assigned to st0, the first cd it finds is assigned to cd0, and the first
scanner it finds is assigned to ss0.  Additional devices are assigned to
the next available unit number for that device type.

So, what you're seeing is correct.  The first disk it finds is your
Syquest at target #2, so that becomes sd0.  The next disk is at target #6,
so that becomes sd1.

There was a problem with older versions of the Mac installer that
incorrectly just created sd0 entries in fstab, but I thought that that had
been fixed.  Maybe not.

Anyway, you will need to edit you /etc/fstab file to put all of your
partitions on the corrrect drive.  If you're booting from the internal
drive at target 6, you need to make sure that the root fs line looks like

	/dev/sd1a     /         ffs     rw          30    1

And if your /usr partition is on the same drive, make sure you have a line
like this, too:

	/dev/sd1g     /usr      ffs     rw          30    1

And please don't forget to put a line in for your swap partition:

	/dev/sd1b     none      swap    sw           0    0

> Sorry for the trouble, and thanks for your help so far.

No trouble - this always messes up the new user.

-----------------------------------------------------------------------------
| Paul Goyette       | PGP Public Key fingerprint:  | E-mail addresses:     |
| Network Consultant |     0E 40 D2 FC 2A 13 74 A0  |  paul@whooppee.com    |
| and kernel hacker  |     E4 69 D5 BE 65 E4 56 C6  |  paul_goyette@ins.com |
-----------------------------------------------------------------------------