So I'm relatively comfortable using *dd* on a linux system to copy the 
contents of an sd card to an image file. Previously I had run the command...

sudo dd status=progress bs=512 count=$((8192+6955008)) if=/dev/disk4 of=
/path/to/image/storage/`date +%Y-%m-%d`_image_name.img

... and that usually does the trick. However, I'm a bit confused because 
the count value isn't lining up with the current card specs. I just created 
a flasher on a 16GB card using the aforementioned script. But when I insert 
that sd card to my development laptop and I run...

sudo fdisk -l /dev/sdb

... I get the following output:

$ sudo fdisk -l /dev/sdb
[sudo] password for troyw: 
Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x55866915

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     8192 31116287 31108096 14.9G 83 Linux

My confusion is that I recall the card should be 8192+6955008 sectors long, 
not 31116287 sectors long... So what happened? Did something change 
recently in the aforementioned flasher-making script? Does it now 
automatically expand to the sd card size? Do I need to re-partition the 
*/dev/sdb* device and *then* use the *dd* command? How would I determine 
how much I can shrink the partition without losing the data on the image?

Any help would be greatly appreciated.


On Monday, February 5, 2018 at 7:17:17 AM UTC-8, Dennis Lee Bieber wrote:
>
> On Mon, 5 Feb 2018 04:41:12 -0800 (PST), 
> 82am...@gmail.com <javascript:> declaimed the following: 
>
>
> > 
> >My problem is that I would like to save the images that were created in 
> the 
> >SD card in the PC, in order to have several releases saved. When I insert 
> >the SD card into the PC, I try to open it to make a copy of the image, I 
> >get a message saying that it can not be opened and also asks if I want to 
> >format the SD card. 
> > 
>
>         M$ Windows OS? 
>
> >Someone could help me to know how I can copy those images to my PC to 
> save 
> >them. 
> > 
>
>         The (apparently deprecated) Win32DiskImager program appears to 
> have the 
> ability to move in both directions -- so can generate an image file by 
> reading an SD card (Etcher appears to only support writing an image file 
> TO 
> SD card). 
>
>         However, as I recall, it was rather sensitive to the card used -- 
> I'd 
> tried to duplicate a card (both nominally 8GB) but the target card 
> (another 
> brand) was just different enough that the image could not be written (I 
> think the target card reserved more blocks for overhead, with the result 
> the original image was now too large for the target). 
> -- 
>         Wulfraed                 Dennis Lee Bieber         AF6VN 
>     wlf...@ix.netcom.com <javascript:>    HTTP://wlfraed.home.netcom.com/ 
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/1f3c92e7-48ab-49c5-b1ab-fc9f2382228e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to