Subject: MBR not working (1.5)
To: None <port-i386@netbsd.org>
From: Anne Bennett <anne@alcor.concordia.ca>
List: port-i386
Date: 11/20/2001 18:09:13
I have clearly done something wrong, but what?

I needed to replace the SCSI disk on my Intel NetBSD 1.5 system.  I
inserted the new disk as sd1, labelled and partitioned it, newfs'd the
partitions and copied the data, and ran "installboot".  Then I took
out the old disk, renumbered the new one to SCSI ID 0, and tried to
boot.  "No operating system found".

I eventually figured out that I had forgotten to install a Master Boot
Record on the new disk.  After booting from floppy, I used "fdisk -aui"
to install an MBR on this Seagate ST34501W, and made it just the same as
that of another system I had around.  Here is the "fdisk sd0" output:

| NetBSD disklabel disk geometry:
| cylinders: 6576 heads: 8 sectors/track: 168 (1344 sectors/cylinder)
| 
| BIOS disk geometry:
| cylinders: 553 heads: 255 sectors/track: 63 (16065 sectors/cylinder)
| 
| Partition table:
| 0: <UNUSED>
| 1: <UNUSED>
| 2: <UNUSED>
| 3: sysid 169 (NetBSD)
|     start 0, size 16 (0 MB), flag 0x80
|         beg: cylinder    0, head   0, sector  1
|         end: cylinder    0, head   0, sector 16

Now when I try to boot, the machine accesses the disk, but gives no
messages on the console at all.  (I tried re-running "installboot"; no
difference.)  Clearly the code that "runs the countdown" is not
loading properly or not running properly.

I started booting from floppy, interrupted during the "countdown", and
asked for "boot sd0a:netbsd" -- the O/S came up fine, which suggests
that my disklabel is OK and my filesystems are OK.  What on earth could
be the matter with my MBR?

In case it matters, the disk label partitions are:

#        size   offset     fstype   [fsize bsize   cpg]
  a:    64512       63     4.2BSD     1024  8192    16   # (Cyl.  0*- 48*)
  b:  1038177    64575       swap                        # (Cyl.  48*- 820*)
  c:  8887137       63     unused        0     0         # (Cyl.  0*- 6612*)
  d:  8887200        0     unused        0     0         # (Cyl.  0 - 6612*)
  e:   408576  1102752     4.2BSD     1024  8192    16   # (Cyl.  820*- 1124*)
  f:  6558720  1511328     4.2BSD     1024  8192    16   # (Cyl. 1124*- 6004*)
  g:   817152  8070048     4.2BSD     1024  8192    16   # (Cyl. 6004*- 6612*)

I can't help but think I'm missing some obvious, trivial thing...


Anne.
-- 
Ms. Anne Bennett, Senior Analyst, IITS, Concordia University, Montreal H3G 1M8
anne@alcor.concordia.ca                                        +1 514 848-7606