On 17/03/16 10:48, Mark Rogers wrote:
This is really just a sanity check!
Background: The current standard Pi Rasbian image is 3.8GB in size. If I write that to (say) an 8GB card it'll only give me access to that 3.8Gb until I resize the partition (for which Raspbian includes scripts).
Assume I *don't* do that resize.
I set things up the way I want on the Pi, and I then want to create a new image of the SD card to restore to another card (possibly a different size). "dd" will get me an 8GB image by default (since it's an 8GB card) but am I correct that I can safely limit the image to the exact size of the original Rasbian image?
The objective here is that (a) writing a 3.8GB image to a new card is much faster than writing an 8GB image, and (b) that it will safely write to any 4GB/8GB/16GB/etc card (where an 8GB image might not fit on a different model of 8GB card). The third benefit (c) of a smaller image is less of a concern as I can compress it anyway and unused space should pretty much disappear that way.
Not entirely sure on the working of DD, but...
If rather than resizing the partition initially to the full 8GB, you just increased it a bit, to give you enough room for your mods (4 1/2?) Then tweak you install, then image the 4.5gb partition, then you're sorted and don't have to tweak dd or limit anything.
You'd have to write more than 3.8GB, but still way less than 8GB.
Cheers Steve