On 11/06/2022 08:04, R.Wieser wrote:
marty,
I have ordered a 64GB card in case I ever need to make a new card from the >>> 32GB backup image. Not sure what else to do, it is a hassle.
As far as I know DD can be told to only copy upto a certain size.
Though the problems are than to :
1) find some way to shrink the (last) partition (of a new installation) so >> at the end there is some unused space (200 MB ?)
Use the gparted tool.
2) find out how to (automatically, scripted) obtain the "certain size"
(mentioned above).
Just knock off 0.1GB from whatever size card you are using.
---druck
use gparted to shrink the image size to the minimum needed
to create the image, and to expand into the full space of a
new SD card once the image is dd'd onto it.
R.Wieser <address@not.available> wrote:
As far as I know DD can be told to only copy upto a certain size.
Though the problems are than to :
1) find some way to shrink the (last) partition (of a new installation) so >> at the end there is some unused space (200 MB ?)
gparted will do that for you. I have a project at work where I do just that to image it across multiple Raspberry Pis: use gparted to shrink the image size to the minimum needed to create the image, and to expand into the full space of a new SD card once the image is dd'd onto it.
2) find out how to (automatically, scripted) obtain the "certain size"
(mentioned above).
I've not automated this, but once I have the partition size minimized, I use fdisk to get the last block of the last partition. Multiplying that by 2048 gets the image size in MB; pass that to dd as the "count" parameter, with "bs=1048576" to set the block size.
gparted knows enough of the different filesystems to be able to do that ? Hmmmm... Maybe I should take a look at it.
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 139:46:26 |
Calls: | 166 |
Files: | 5,389 |
Messages: | 223,236 |