# Blue Screen Of Death when insert FreeBSD usb stick



## vall (Aug 28, 2017)

Sorry if I double the thread, but I didn't find answer.

If I write a usb stick img in the Windows (tried XP and 7) then after direct write finished I have BSOD and rebooting. The same if I just insert FreeBSD installation usb to the Windows machine. So if Windows try to mount FreeBSD installation usb it has a BSOD.

I tried on 4 different machines, 3 different usb sticks and in RMPrepUSB and dd. Everytime the same. So this is not my fault.

What is the root of this behavior? Probably I can disable automounting on the Windows machine (my wife's laptop) where I write a usb, but my wife likes automounting


----------



## Phishfry (Aug 28, 2017)

The secondary GPT table is not correct on the memstick. If you boot FreeBSD with it you will see the message.

Simply run `gpart recover da0` on it first and no BSOD.


----------



## Phishfry (Aug 28, 2017)

You may need to run `growfs` on the memstick to fill out the entire stick then run `gpart recover da0`.
The Memstick image is smaller than the memstick and even though it places the secondary GPT at the end of the image, that is not necessarily the end of the disk. This seems to crash Windows.

You can just `dd` zero it in FreeBSD first too if writing images from there.


----------

