If Ubuntu doesn't format your USB Drive (possibly an Ubuntu USB stick) with an error saying
This partition cannot be modified because it contains a partition table; >please reinitialize layout of the whole device. (udisks-error-quark, 11)
Do this:
sudo dd if=/dev/zero of=/dev/sdb bs=1M