Subject: Re: still having problems with install
To: None <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 01/11/2003 21:27:55
On Sat, 11 Jan 2003 16:44:38 -0800, "Ezequiel Reyes"
<ezequiel@newhotel.com.cu> wrote:
>
> I created a particion NetBSD kind of
> ~2Gb, selected custom and divided it in label "a" with offset at the
> beginning of the BSD real particion and set its size to 1479 MB, then
> label"b" as swap with the remaining 600 MB starting at the end of the
> "a" labeled part and taking the rest of the space in the BSD particion.
> This time I selected to install a bootmanager (not installing it didn't
> work, so I gave it a try), but still it all dies with this message:
> "mount of device/dev/wd0a on / failed" 

I think you're trying too hard.  :)  Once you understand what the install
script is trying to tell/ask you, it's easier to get it to do the right
thing.  

It's confusing, because there are two kinds of partitions on an i386
NetBSD machine:  

1.  MBR partitions, not needed by NetBSD.
2.  disklabel partitions, used by NetBSD.

The *only* need for MBR partitions is to cooperate with other OSes that
might want to use (including boot from) the disk.  Apart from that, you
don't need an MBR.  AFAIK no other NetBSD port deals with "dual boot"
phenomena; it's part of the richness of the i386 world.  Ahem.  

The disklabel is placed within the MBR partition assigned to NetBSD.  Each
disklabel partition describes the physical location of a filesystem on the
disk.  By default on your system:
	a: /
	b: swap
	e: /usr

One point that confused me setting up my first system: the disklabel
describes the whole disk.  It so happens that a, b, and e will all be
constrained (if you're sensible, as the defaults are) to fit within the
MBR partition for NetBSD.  You can use disklabel(8) (later) to associate
its partitions with "foreign" filesystems, created by other operating
systems.  These filesystems obviously will have their own MBR partitions,
but disklabels don't know an MBR from a groundhog.  Disklabels describe
disks.  Here's one of mine (not a boot drive):

$ disklabel wd1
...
8 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  d: 40188960        0     unused        0     0         # (Cyl.    0 -
39869)
  e: 10233342       63       NTFS                        # (Cyl.    0*-
10152*)
  f:  2040255 10233405      MSDOS                        # (Cyl. 10152*-
12176*)
  g: 27904905 12273660     4.2BSD     1024  8192    16   # (Cyl. 12176*-
39859*)

Partition e holds the MBR record, f a FAT filesystem.  

There's something else that isn't obvious right away, when you are first
installing NetBSD.  The intallation utility is a shell script.  You can
interrupt it any time with ^Z, play with things at the shell prompt, and
resume (with "fg", but you know that).  Someone else asked, "is the
filesystem OK?"  Boot from the install floppies/CD, and when the install
menu first appears, hit ^Z and try to mount partiton "a" with "mount
/dev/wd0a /mnt".  That should work, if the filesystem was successfully
created.  

I suggest you try once more, letting sysinst do what it wants.  If you
don't get a bootable system, restart from the install disk, interrupt the
script, get copies of fdisk and disklabel output, and post them here. 
Someone will recognize what's wrong.  

And have fun.  

--jkl