gpart bootcode

Can someone tell me if the following will do what I want it to?

gpart bootcode -p /tmp/mybootcode -i 6 da0

/tmp/mybootcode is the file I have extracted using dd from a USB stick which had UBCD installed on it. I copied the files and tried to boot using Grub's chainloader command and got a 'Non-system disk' error msg. Should the above command solve the problem?
That command will do what you expected, gpart(8) would have told you this as well. Bootcode would get written to the 6th partition. But whether this will make the system bootable or not remains to be seen, that heavily depends on how it got bootstrapped in the first place.