Subject: Re: Boot from USB key problem
To: Brad du Plessis <bradd@cat.co.za>
From: Pierre Bourgin <pierre.bourgin@pcotech.fr>
List: port-i386
Date: 01/14/2005 19:27:14
Hello,

Is it correct that your (NetBSD) primary partition start at sector 32 ? I 
guess it should start at 63, as it's performed on "regular hard drive" ?

The 63 first sectors are required in order to create a MBR, as it's done on 
PC hard drive (old DOS scheme).

Since you put an FFS FS into sd0a, the correct installboot command is :

   installboot -v /dev/sd0a /usr/mdec/bootxx_ffsv1

You did not forget to format (newfs command) the sd0a also ?

Regards,

Pierre Bourgin

Brad du Plessis a écrit :
> 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: 
> 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
>