Problems booting 9.0-BETA1 memstick

Jason Campbell jason.lee.campbell at
Wed Aug 31 00:22:01 UTC 2011

Downloaded FreeBSD-9.0-BETA1-amd64-memstick.img and verified the image
with md5sum. I wrote the image (from Linux):

dd if=FreeBSD.img of=/dev/sde bs=512
Rebooted and get "gptboot: Invalid backup GPT header"

Ran linux gdisk on usb stick to clear out old GPT info and found in
old FreeBSD -release announcements showing bs=10240 conv=sync, so

dd if=FreeBSD.img of=/dev/sde bs=10240 conv=sync
Rebooted and same gptboot error.

Completely cleared the usb stick with:

dd if=/dev/zero of=/dev/sde bs=512
dd if=FreeBSD.img of=/dev/sde bs=10240 conv=sync
Rebooted and same gptboot error.

I've booted FreeBSD via memstick images numerous times, so not sure
what the problem is. There a possible bug somewhere and what steps
would I take to help locate any bugs related to this?


Other info which may help:
Copied the image to my FreeBSD laptop, rechecked md5, and plugged in
the usb stick. dmesg had:

GEOM: da0: the secondary GPT header is not in the last LBA.

and ran:

[syskill at jupiter ~]$ sudo gpart show da0
=>     34  1333293  da0  GPT  (7.7G) [CORRUPT]
       34      128    1  freebsd-boot  (64k)
      162  1333165    2  freebsd-ufs  (651M)

Zeroed the stick again, from FreeBSD, and wrote the image from FreeBSD.

At this point, I have an idea if it fails booting again. I could gpart
the stick using the sizes shown in the "gpart show da0" above, then
write the image. This should force the backup header into the last

Sure enough, booting (before running gpart to force backup header into
the last LBA) failed. Then I found the recover option in gpart, so ran
"sudo gpart recover da0" and the gptboot error message is gone,
however, it auto reboots in about 5 secs from the time the spinning
characters start ( \ -- | -- /). Guessing this reboot is unrelated to
the gpt problem, but just in case, there something else I'm missing?

More information about the freebsd-current mailing list