Subject: big disk not bootable
To: None <netbsd-help@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 03/11/2002 14:00:37
I think we need a FAQ about this. I have read about it many times, but
don't always understand this.

Here's my problem today: A big scsi drive isn't bootable ("os not found").

This system was installed by someone else and I am a thousand miles away.

# egrep -i 'scsi|siop|sd0' /var/run/dmesg.boot
siop0 at pci0 dev 15 function 0: Symbios Logic 53c875 (ultra-wide scsi)
siop0: using on-board RAM
siop0: interrupting at irq 10
scsibus0 at siop0: 16 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...
siop0: target 0 using tagged queuing
sd0 at scsibus0 target 0 lun 0: <, , > SCSI2 0/direct fixed
siop0: target 0 using 16bit transfers
siop0: target 0 now synchronous at 20.0Mhz, offset 16
sd0: 57272 MB, 57272 cyl, 32 head, 64 sec, 512 bytes/sect x 117293056 sectors
boot device: sd0
root on sd0a dumps on sd0b

It boots fine when using a CD's boot loader and using "boot sd0a:netbsd".

The drive is some 60GB raid device. It appears as one disk. The same drive
the day before was bootable with Red Hat Linux.

fdisk says:
# fdisk sd0
NetBSD disklabel disk geometry:
cylinders: 57272 heads: 32 sectors/track: 64 (2048 sectors/cylinder)

BIOS disk geometry:
cylinders: 1024 heads: 255 sectors/track: 63 (16065 sectors/cylinder)

Partition table:
0: <UNUSED>
1: <UNUSED>
2: <UNUSED>
3: sysid 169 (NetBSD)
    start 64, size 117292992 (57271 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder  951, head  31, sector  0

disklabel says:
# disklabel sd0
# /dev/rsd0d:
type: unknown
disk: ocsmail
label:
flags:
bytes/sector: 512
sectors/track: 64
tracks/cylinder: 32
sectors/cylinder: 2048
cylinders: 57272
total sectors: 117293056
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:  2047936       64     4.2BSD     1024  8192    16   # (Cyl.    0*- 999)
  b:  2048000  2048000       swap                        # (Cyl. 1000 - 1999)
  c: 117292992       64     unused        0     0         # (Cyl.    0*- 57271)
  d: 117293056        0     unused        0     0         # (Cyl.    0 - 57271)
  e: 10240000  4096000     4.2BSD     1024  8192    16   # (Cyl. 2000 - 6999)
  f: 20480000 14336000     4.2BSD     1024  8192    16   # (Cyl. 7000 - 16999)
  g: 82477056 34816000     4.2BSD     1024  8192    16   # (Cyl. 17000 - 57271)

I did "fdisk -i" to try initializing mbr, but no go.

Also, tried "installboot -f /usr/mdec/biosboot.sym /dev/sd0a".

I am running sysinst to see what it says:

 BIOS # cylinders  heads   sectors
 ------ ---------- ------- -------
 0      1024       255     63

The installer chose "set by hand":
cylinders: 57272
heads: 32
sectors: 64

(He said these were the same as used under Red Hat.)

Now, I see that sysinst says: "If you have the BIOS set up to use > 1024
cylinders just truncate that number to 1024 here." So he should have set
it to "1024".

I don't know if the sysinst complained about making it bootable.

On his Linux system, it is like:
SCSI device sda: 117293056 512-byte hdwr sectors (60054 MB)

And the fdisk warns about the cylinders.

Disk /dev/sda: 64 heads, 32 sectors, 57272 cylinders
Units = cylinders of 2048 * 512 bytes

And the Linux lilo and kernel is on:
   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1      1000   1023984   83  Linux


I find it strange that the "offset" (under NetBSD) is 64.

Also, I wonder why it is 57272 MB instead of 60054 MB.

Can I change the geometry while it is live without reinstalling?

Or any other ideas to make it bootable?

Thanks for any advice or suggestions.

   Jeremy C. Reed
   http://bsd.reedmedia.net/