Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jan 2010 16:12:39 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Christoph Kukulies <kuku@kukulies.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Cannot boot FreeBSD (8.0) from USB stick (Dell Inspiron 9400)
Message-ID:  <20100123150802.F14027@sola.nimnet.asn.au>
In-Reply-To: <20100122235448.A229410656EE@hub.freebsd.org>
References:  <20100122235448.A229410656EE@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In freebsd-questions Digest, Vol 294, Issue 12, Message 1
On Fri, 22 Jan 2010 18:59:00 +0100 Christoph Kukulies <kuku@kukulies.org> wrote:

 > Here is some more info:
 > 
 > The file I copied to the USB stick was
 > 
 > ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/8.0/8.0-RELEASE-i386-memstick.img
 > 
 > Actually, I don't remember how I got the image to the USB stick. I 
 > believe I used a free tool from HP
 >  from within Windows XP.

This is likely your problem.  As on the release page referring to this 
image (but substituting i386 for amd64) it should have been made using:

 # dd if=8.0-RELEASE-i386-memstick.img of=/dev/da0 bs=10240 conv=sync

This works; I've no idea what a HP windows tool might do instead, though 
your fdisk below may offer clues; certainly the cylinders/heads/sectors 
arrangement seems wrong for a disk made from this image by dd as above.

 > kernel messages at the time usb stick is inserted:
 > ugen4.3: <USB 2.0> at usbus4
 > umass0: <USB 2.0 Flash Disk, class 0/0, rev 2.00/1.10, addr 3> on usbus4
 > umass0:  SCSI over Bulk-Only; quirks = 0x0000
 > umass0:1:0:-1: Attached to scbus1
 > (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
 > (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
 > (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
 > (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
 > (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have 
 > changed
 > (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
 > da0 at umass-sim0 bus 0 target 0 lun 0
 > da0: <USB 2.0 Flash Disk PMAP> Removable Direct Access SCSI-0 device
 > da0: 40.000MB/s transfers
 > da0: 1921MB (3935000 512 byte sectors: 255H 63S/T 244C)
 > GEOM: da0: media size does not match label.

While mine is only a 1GB stick, it shows an entirely different geometry, 
with 1MB per cylinder.

 da0: 967MB (1981440 512 byte sectors: 64H 32S/T 967C)

 > # fdisk /dev/da0
 > ******* Working on device /dev/da0 *******
 > parameters extracted from in-core disklabel are:
 > cylinders=244 heads=255 sectors/track=63 (16065 blks/cyl)

Here instead fdisk /dev/da0 sees:

 cylinders=967 heads=64 sectors/track=32 (2048 blks/cyl)

 > # fdisk /dev/da0
 > ******* Working on device /dev/da0 *******
 > parameters extracted from in-core disklabel are:
 > cylinders=244 heads=255 sectors/track=63 (16065 blks/cyl)
 > 
 > parameters to be used for BIOS calculations are:
 > cylinders=244 heads=255 sectors/track=63 (16065 blks/cyl)
 > 
 > Media sector size is 512
 > Warning: BIOS sector numbering starts with sector 1
 > Information from DOS bootblock is:
 > The data for partition 1 is:
 > <UNUSED>
 > The data for partition 2 is:
 > <UNUSED>
 > The data for partition 3 is:
 > <UNUSED>
 > The data for partition 4 is:
 > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
 >     start 0, size 50000 (24 Meg), flag 80 (active)
 >         beg: cyl 0/ head 0/ sector 1;
 >         end: cyl 1023/ head 254/ sector 63

The reason fdisk (bogusly) shows this as slice 4 is that this image is 
so-called 'dangerously dedicated' to FreeBSD, ie it is an unsliced disk, 
and needs to be mounted as /dev/da0a (not da0s1a or da0s4a).

It contains a bsdlabel allocating 16 sectors for boot code (/boot/boot1 
and /boot/boot2) with partition 'a' beginning at offset 16 (8KB).  It 
boots just fine (though slowly as a 4x CDROM :) on my 2002 IBM Thinkpad 
T23 with only USB 1.0, after having promoted it in the BIOS boot order.

I suggest remaking the image using dd exactly as above and trying that.

cheers, Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100123150802.F14027>