[beagleboard] restoring original factory image

Translating these directions for the linux shell:

do I need to start by reformatting the card, ie:

mkfs.vfat -F 32 -a /dev/hdX?

If I do need to reformat the card to start over and write the factory image do I need to simply format the entire block device i.e. /dev/hdb or should I partition the card first and write separate images to each partition?

to write the image file which of the following should be used?

dd if=imgfile.img of=/dev/hdb
cat imgfile.img > /dev/hdb
cpio imgfile.img /dev/hdb

or something else?

Eric