How do I create a USB image with a partition table?

view full story

http://unix.stackexchange.com – I want to create an image of some directory tree that is writable directly to an USB drive, just like the images of many linux distributions. For example, with openSUSE you can download an ISO image that is writable directly the USB using dd. root@computer# dd if=openSUSE.iso of=/dev/sdb I tried to create images using mkisofs, but when I ran the dd command above with that image didn't get a partition table, which made windows not recognize the format of the drive and linux didn't present /dev/sdb1. I also tried to create an empty file, and then create a filesystem in that file using mkfs.vf (HowTos)