Subject: Making a disk bootable
To: #List NetBSD i386 <port-i386@netbsd.org>
From: Paul Goyette <paul@whooppee.com>
List: port-i386
Date: 04/08/2005 21:16:33
I'm having a real problem with fdisk and friends...

I used fdisk to update the boot code in the mbr using

 	fdisk -i.

I made sure that my NetBSD partition (the only one on the disk) is
active via

 	fdisk -a.

I copied /usr/mdec/boot to /boot, and then ran installboot to do
its magic

 	installboot /dev/rwd0a /usr/mdec/bootxx_ffsv1

Finally, I reboot the machine, and changed my BIOS settings to not
boot from my SCSI controller;  the only boot devices specified in the
BIOS is HDD (ie, wd0a) and floppy.

So I go boot and it tells me that I don't have a system disk.

If I put the SCSI device back into the BIOS list of boot devices, it
still works.  The primary boot code allows me to select hd1a and
wd0 is booted successfully.

Where did I go wrong?

Here's the current status of my system:

pc1:paul {102} fdisk wd0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 19854, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 20012832

BIOS disk geometry:
cylinders: 1024, heads: 240, sectors/track: 63 (15120 sectors/cylinder)
total sectors: 20012832

Partition table:
0: NetBSD (sysid 169)
     start 63, size 20012769 (9772 MB, Cyls 0-1323/144/1), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
pc1:paul {103} disklabel wd0
# /dev/rwd0d:
type: unknown
disk: mydisk
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 20012832
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
  a:   1059345        63     4.2BSD   1024  8192    16  # (Cyl.    0*-  1050)
  b:   1018080   1059408       swap                     # (Cyl. 1051 -  2060)
  c:  20012769        63     unused      0     0        # (Cyl.    0*- 19853)
  d:  20012832         0     unused      0     0        # (Cyl.    0 - 19853)
  e:  17935344   2077488     4.2BSD   1024  8192 46472  # (Cyl. 2061 - 19853)
pc1:paul {104}

----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
|  & World Cruiser | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------