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
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
There seem to be a lot of tutorials on the web on how to write images to USB drives as well as dumping an usb drive to file, but I haven't found anything on creating an image with a partition table.
The problem I'm trying to solve with this is to distribute a preformated USB stick, so there is no need for the stick to be bootable, and I would also like to make this process scriptable.