SD Surprise


John McDonough
 

Of course I recognized that an 8GB SD card isn't really 8GB, but I sort
of expected that all the manufacturers would use the same sleazy math
to inflate their size.  Not so.

The reason this is important is that the safest, easiest way to back up
a Raspberry Pi is to make an image copy of the SD card from time to
time.  Something happens, just restore the image onto a fresh card and
you are good to go.

*BUT*, it turns out that Kingston 8GB SD cards are more than 20MB
larger than SanDisk cards.  So if you made the original image on a
Kingston card, you can't restore it to a SanDisk card.

So perhaps I need to pick one or the other and stock up on them.

Bummer.

--McD


 

Yes, unfortunately, the best path is to have the same make and model of SD card for replication or restoration.


--


John D. Hays
K7VE

PO Box 1223, Edmonds, WA 98020-1223
   


Jeremy McDermond <mcdermj@...>
 

You may want to take a look at this script:

https://github.com/nwdigitalradio/pi-gen/blob/compass/export-image/prerun.sh

It’s a part of the “pi-gen” software that’s used to create Raspbian images. It will create an image file that is the smallest possible for the amount of data. This allows you to expand it when it’s put on a new card. You may be able to adapt it to your backup procedure to get a backup image that you can restore on more different sized cards.

On Oct 12, 2016, at 9:35 AM, John McDonough <wb8rcr@arrl.net> wrote:

Of course I recognized that an 8GB SD card isn't really 8GB, but I sort
of expected that all the manufacturers would use the same sleazy math
to inflate their size. Not so.

The reason this is important is that the safest, easiest way to back up
a Raspberry Pi is to make an image copy of the SD card from time to
time. Something happens, just restore the image onto a fresh card and
you are good to go.

*BUT*, it turns out that Kingston 8GB SD cards are more than 20MB
larger than SanDisk cards. So if you made the original image on a
Kingston card, you can't restore it to a SanDisk card.

So perhaps I need to pick one or the other and stock up on them.

Bummer.

—McD

Jeremy McDermond
nh6z@nh6z.net


VE3MIC
 

Due to the problems with different image sizes, and the variance in usable free  (advertized) space for the same size SD cards, I've abandoned Win32DiskImager.
I now use an image backup utility by Acronis. It can be "told" not to backup unused, free space unlike Win32DiskImager which requires 2 identical SD cards regardless of how much space is being occupied on the source image.
There are other "Free" programs out there that will ignore the unused partition space, but I have not tried any of them.
73 de Mike

On Wednesday, October 12, 2016 12:49 PM, Jeremy McDermond <mcdermj@...> wrote:


You may want to take a look at this script:

https://github.com/nwdigitalradio/pi-gen/blob/compass/export-image/prerun.sh

It’s a part of the “pi-gen” software that’s used to create Raspbian images.  It will create an image file that is the smallest possible for the amount of data.  This allows you to expand it when it’s put on a new card.  You may be able to adapt it to your backup procedure to get a backup image that you can restore on more different sized cards.

> On Oct 12, 2016, at 9:35 AM, John McDonough <wb8rcr@...> wrote:
>
> Of course I recognized that an 8GB SD card isn't really 8GB, but I sort
> of expected that all the manufacturers would use the same sleazy math
> to inflate their size.  Not so.
>
> The reason this is important is that the safest, easiest way to back up
> a Raspberry Pi is to make an image copy of the SD card from time to
> time.  Something happens, just restore the image onto a fresh card and
> you are good to go.
>
> *BUT*, it turns out that Kingston 8GB SD cards are more than 20MB
> larger than SanDisk cards.  So if you made the original image on a
> Kingston card, you can't restore it to a SanDisk card.
>
> So perhaps I need to pick one or the other and stock up on them.
>
> Bummer.
>
> —McD


Jeremy McDermond
nh6z@...




Richard - VE7CVS
 

If you shrink the filesystem before you save it, you can restore it and expand it to the size of the destination card.

I use tools like dd, resize2fs and fdisk to manipulate filesystems.

These commands are worth learning if you want to understand how filesystems and storage work.

But then, I rarely do things the easy way, and I have a compulsion to know how things work. :-)

- Richard, VE7CVS


John McDonough
 

On Wed, 2016-10-12 at 17:45 -0700, Richard - VE7CVS wrote:
If you shrink the filesystem before you save it, you can restore it
and 
expand it to the size of the destination card.

I use tools like dd, resize2fs and fdisk to manipulate filesystems.
I use dd to make the backups, and certainly I can muck with the
filesystem sizes, but it is just so convenient to just tell dd to copy
this file to this device with no messing around.  I suppose if I think
about it, a little bash pixie dust could automate the process tho.

These commands are worth learning if you want to understand how 
filesystems and storage work.

But then, I rarely do things the easy way, and I have a compulsion
to 
know how things work. :-)
hmmm ... sounds familiar ;)

- Richard, VE7CVS

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links:


VE3MIC
 

If your running Linux, DD is the way to go
de Mike


On Thursday, October 13, 2016 7:31 AM, John McDonough <wb8rcr@...> wrote:


On Wed, 2016-10-12 at 17:45 -0700, Richard - VE7CVS wrote:
> If you shrink the filesystem before you save it, you can restore it
> and 
> expand it to the size of the destination card.
>
> I use tools like dd, resize2fs and fdisk to manipulate filesystems.

I use dd to make the backups, and certainly I can muck with the
filesystem sizes, but it is just so convenient to just tell dd to copy
this file to this device with no messing around.  I suppose if I think
about it, a little bash pixie dust could automate the process tho.

> These commands are worth learning if you want to understand how 
> filesystems and storage work.
>
> But then, I rarely do things the easy way, and I have a compulsion
> to 
> know how things work. :-)

hmmm ... sounds familiar ;)
>
> - Richard, VE7CVS
>
>




John McDonough
 

On Thu, 2016-10-13 at 15:40 +0000, Mike Morneau via Groups.io wrote:
If your running Linux, DD is the way to gode Mike 

I am running Linux, but dd is available for Windows as well.  Problem
is, unlike most Windows programs, dd does exactly what you tell it to
do, no more, no less.  That would be pretty risky for most Windows
users.

--McD


Richard - VE7CVS
 

You can also do this using the Pi itself, with a couple of SD-card-to-USB adaptors.

You can use the command line or Raspbian GUI tools that manipulate filesystems.