Subject: Requirements for a disk to boot
To: None <port-cobalt@netbsd.org>
From: Jonas Pasche <netbsd@jonaspasche.de>
List: port-cobalt
Date: 06/17/2002 00:43:20
Hi folks,

and thanks to Thierry for his help with the "panic on ext2fs mkdir"
issue. The 1.6A kernel worked perfectly with the partition.

Unfortunately, I cannot get my hard disk to boot within the RaQ2 again.
It worked once when using the original partition table, but it doesn't
after I used fdisk to make a better partition layout. I brought up the
debugger; here's what it said:

--- begin cut ---

Cobalt Microserver Diagnostics - 'We serve it, you surf it'
Built Tue May 25 15:58:41 PDT 1999

 1.LCD Test................................PASS
 2.Controller Test.........................PASS
 5.Bank 0:.................................64M
 6.Bank 1:.................................64M
 7.Bank 2:.................................0M
 8.Bank 3:.................................0M
 9.Serial Test.............................PASS
10.PCI Expansion Slot....................**EMPTY**
12.IDE Test................................PASS
13.Ethernet Test...........................PASS
16.RTC Test................................PASS
BOOTLOADER ramcode: selected partition /dev/hda1
Decompressing done
Executing bootloader kernel...
Jump_to_Real_Kernel: disk error, trying BFD again
BOOTLOADER ramcode: selected partition /dev/hdc1
Decompressing - done
Executing bootloader kernel...
Jump_to_Real_Kernel: disk error, trying BFD again
get_root_dev: nr_boot_failures 0x00000002 exceeds maxtries 0x00000002
for boot_index 0x00000000


 *** halting ***

--- end cut ---

I created the partition table under Linux because I'm much more familiar
with Linux' fdisk, and it seems to be more friendly with providing good
default values. Here's what NetBSD's fdisk says:

--- begin cut ---

# fdisk wd0
NetBSD disklabel disk geometry:
cylinders: 524 heads: 255 sectors/track: 63 (16065 sectors/cylinder)

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

Partition table:
0: sysid 131 (Linux native)
    start 63, size 48132 (23 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder    2, head 254, sector 63
1: sysid 169 (NetBSD)
    start 48195, size 8369865 (4086 MB), flag 0x0
        beg: cylinder    3, head   0, sector  1
        end: cylinder  523, head 254, sector 63
2: <UNUSED>
3: <UNUSED>

--- end cut ---

To be sure, my disklabels:

--- begin cut ---

# disklabel wd0  
# /dev/rwd0d:
type: ST506
disk: 
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 524
total sectors: 8418060
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

5 partitions:
#        size   offset     fstype   [fsize bsize cpg/sgs]
  a:  8369865    48195     4.2BSD        0     0     0   # (Cyl.    3 -
523)
  c:  8369865    48195     unused        0     0         # (Cyl.    3 -
523)
  d:  8418060        0     unused        0     0         # (Cyl.    0 -
523)
  e:    48132       63 Linux Ext2        0     0         # (Cyl.    0*-
2)

--- end cut ---

Looking at the FAQ: I have an fdisk-style partition table. My first
partition is Linux native. It is marked as active. It is formatted with
ext2fs and contains the gzipped kernel:

--- begin cut ---

# mount -t ext2fs /dev/wd0e /altroot
# cd /altroot/boot
# ls -l
total 796
-rw-r--r--  1 root  wheel  809784 Jun 16 15:15 vmlinux_raq-2800.gz

--- end cut ---

I don't know what to check next, and I couldn't find any more hints on
this issue in the list archives or through googling... any help?

Thanks, Jonas