Subject: Re: Booting troubles solved too
To: Olivier Boudry <oboudry@isrec-sun1.unil.ch>
From: Christopher R. Bowman <crb@glue.umd.edu>
List: port-mac68k
Date: 01/28/1997 01:56:20
>Hello!
>
>I had problems trying to have NetBSD run on my Q650. I just discovered that
>my hard drive (Conner CP30175E - 170Mb) doesn't works with NetBSD. Today, I
>tried to install NetBSD on a Zip disk, and now it works fine (not a lot of
>space, but I know it can run on my Mac).
>I had already noticed some troubles when using mkfs (1.3 and 1.4, not with
>the one included in the 1.2 package) on my Conner drive. I could only see
>the first partition. But first I thought it was a bug in mkfs. I don't know
>what's wrong with this hard drive, but I think you can add it to your list
>of non-working drives.
>
>Now, one more question: my Zip drive is number 5 in my scsi bus. And for
>the NetBSD file system, root is /dev/sd2a and swap is /dev/sd2b. I don't
>know why, but in the /etc/fstab the root is written as /dev/sd0a and swap
>as /dev/sd0b.
>I always my filesystem mounted as read-only, and when I try to modify it
>with the "mount -u /" command (as written in the faq), I get the following
>message:
>ufs: /dev/sd0a on /:
>specified device does not match mounted device.
>And as I am in read-only mode, I cannot edit the fstab file. What do I have
>to do to have sd2a mount as root filesystem? Is it possible to mount the
>devices manually?
>
>Thanks!
>
>Olivier

Ok I am guessing that you have monkeyed around with the scsi chane since
you did your install.

See when netbsd goes looking for scsi devices, it first looks for scsi id 0
and if it exists it assigns it to /dev/sd0 it then looks for scsi id 1 and
if it exist AND no device with scsi id 0 exist then IT get /dev/sd0, and so
on.

Basically the lowest number scsi device on your chain get /dev/sd0 the
second lowest becomes /dev/sd1 etc.

An example of mappins is given below.

NetBSD		SCSI
------		----
/dev/sd0	disk drive	ID #2
/dev/sd1	ZIP drive	ID #4
/dev/sd2	CDROM		ID #5
/dev/sd3	tape drive	ID #6

when you do an installation the /etc/fstab is written for you, my guess is
that it is done whenever devices are made.  So if you do an install with a
certian scsi chain configuration and later change it, the scsi chain by
either turning on a drive that wasn't on or turn one off or adding or
removeing one you will change the mapping.  If you don't update the
/etc/fstab you will be in the trouble you describe.

Solutions: see if building devices under the installer will update it for
you, be sure to turn on all drive you would have on and off all drive you
would have off when you run netbsd.  If you are in the installer, you can
check if /etc/fstab was update by choosing the mini shell menu item and
typing cat /etc/fstab

If that doesn't work, then you can fix this for sure by using the installer
running the minishell using the menu selection and cpout /etc/fstab edit
this with an editor under macos and then cpin it back into netbsd.

---------
Christopher R. Bowman
crb@eng.umd.edu
My home page