I have made great progress with my USB project so far, However I was wondering if there would be a way to DD multiple partitions into one Raw image file for redistribution. The following are the commands I have been using to achieve a full clone from usb to usb:
DD if=/dev/sd[x] status=progress | gzip > newredhat.raw.gz
however, the only issue with this, is that it copies the entirety of the USB stick, (meaning it would copy the volume as 28gb) and in some cases it doesn't work when trying to go to a smaller USB stick. I had tried doing the following to work around this :
dd if=/dev/sdb1 | dd if=/dev/sdb2 | dd if=/dev/sdb3 | gzip > newredhat.raw.gz
Which to my surprise worked, however I don't believe it is saving the file the way I would imagine it is. Is there any way that I can avoid copying the entire disk drive (SDB) and only copy the necesarry partitions SDB1, SDB2, and SDB3, in such a way that I save them to one image file, and then zcat that file to a new USB of variable size in order for it to then run?
Thanks for any and all help in advance!