[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Resize a disk image from 32G to 4G or copy u-boot?



On Ma, 24 mar 20, 19:12:46, Gene Heskett wrote:
> 
> And nothing so far, and I have been watching, in the way of reducing a 
> filesystem to only the actual size occupied. Then it can be backed up 
> with dd and recovered, rewritten by dd, at a reasonable size for 
> storage.  And re-expanded to fit the media it finds.

You could do this with the 'sparse' option of dd (you might need to fill 
the partition with a file containing only zeroes first).

The resulting file must be handled with care as many tools (cp, rsync) 
will un-sparse it by default, as will writing it to a filesystem without 
support for sparse files (tar it first).

To see the actual size with ls you will have to use -s/--size.

> All of my attempts to do that with dd alone have been thwarted by the 
> fact that I have yet to find two u-sd's marked as such and such a 
> capacity, that actually were the same size.

Just create the partitions slightly smaller than the size of the SD 
card.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: