Subject: Boot from USB key problem
To: None <port-i386@netbsd.org>
From: Brad du Plessis <bradd@cat.co.za>
List: port-i386
Date: 01/14/2005 17:10:35
Hi,

I'm trying to boot a netbsd 2.0 kernel (i386) from a USB key and have had no 
success.

The USB key I'm using is a Kingston 256Mb.

================================================
disklabel sd0:
# /dev/sd0d:
type: SCSI
disk: USB DRIVE
label: 1212
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 246
total sectors: 503808
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:    503745        63     4.2BSD   1024  8192    44   # (Cyl.    0*- 245)
 c:    499680        32     unused      0     0         # (Cyl.    0*- 243)
 d:    503808         0     unused      0     0         # (Cyl.    0 - 245)

===============================================
fdisk sd0:
Disk: /dev/rsd0d
NetBSD disklabel disk geometry:
cylinders: 246 heads: 64 sectors/track: 32 (2048 sectors/cylinder)

BIOS disk geometry:
cylinders: 984 heads: 16 sectors/track: 32 (512 sectors/cylinder)

Partition table:
0: sysid 169 (NetBSD)
    start 32, size 499680 (243 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder  975, head  15, sector 32
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>

================================================
file listing of sd0a:

total 7453
-r--------  1 root  wheel    53756 Jan 14 16:29 boot
-rwxr-xr-x  1 root  wheel  7564826 Jan 14 16:54 netbsd


================================================
I tried running:
# installboot -v /dev/sd0a /usr/mdec/bootxx_ffsv1

as well as:
# installboot -v /dev/sd0a /usr/mdec/bootxx_msdos

without success.

On bootup the key seems to be accessed so I would assume that this is not a 
BIOS problem. I get an "Invalid system disk" message.

Can anyone perhaps provide me with some indication as to what the problem 
may be, or point me to some documentation that describes how to get this 
setup working.

Thanks in advance.

Regards,
 Brad