I decided to ask Technologic Solutions also, and received this answer to my
question (haven't tried it yet but it makes sense):
The issue here is that there is no standard actual size for a "2GB" SD
card. Each model of card sets some blocks in reserve and supplies less
than 2GB for storage. If your source card is larger than the card you
are copying to, this will happen. The recommended solution is to create
an image that is a little smaller, leaving a cushion, (1.8 GB is safe)
and create other cards from that. To create such an image, you will
want to partition your card so that some blocks at the end are not used,
create a dd image of that card, and then truncate it intelligently.
--- In "Steve Drake" <> wrote:
>
> I have been using the 'dd' method of cloning cards as suggested by Pierre
> in his previous message, quoted below. It has worked a few times but has not
> been a reliable method so far. I am running Ubuntu 9.04 on my develpment PC
> where I am trying to do the card imaging.
>
> The source and destination SD cards are both 2GB in size.
>
> I create the image like this:
>
> $ sudo dd if=/dev/sde of=2gb-v1.07a2-image.dd
> 3962880+0 records in
> 3962880+0 records out
> 2028994560 bytes (2.0 GB) copied, 1964.36 s, 1.0 MB/s
>
> I frequently (>50%) get an error when I try to write the image to an SD
> card:
>
> $ sudo dd if=2gb-v1.07a2-image.dd of=/dev/sde
> dd: writing to `/dev/sde': No space left on device
> 3948545+0 records in
> 3948544+0 records out
> 2021654528 bytes (2.0 GB) copied, 5293.45 s, 382 kB/s
>
> I also tried writing the image to the SD card with pcopy, and got similar
> results:
>
> $ sudo pcopy 2gb-v1.07a1-image.dd /dev/sde
> Copying from 2gb-v1.07a1-image.dd to /dev/sde (start in 3 seconds)...
> Copied: 1927 MB (1 MB/sec) -
> pcopy: /dev/sde: Error: Write of 1048576 bytes failed at 2021654528: No
> space left on device
>
> Note that it runs a long time before it fails (an hour or two on my USB 1.0
> PC).
>
> How can there not be enough space on the destination drive? Is it common for
> SD cards to have bad blocks and would that be causing my trouble?
>
> I (also) tried making sure any/all partitions were deleted first from the
> target SD card with fdisk before starting the write operation to the SD
> card.
> That didn't help.
>
> I tried again to write the image to the card, with the 'direct' flag this
> time:
> $ sudo dd if=2gb-v1.07a2-image.dd of=/dev/sde oflag=direct
>
> But I lost patience after about 3 hours and aborted the command (and saw
> that
> it reported that it was only about 1/2 way done).
>
> In many dd command examples that I've looked at, the conv=notrunc,noerror
> options are used. According to 'man' this tells dd to not truncate the
> output
> file and not to stop on errors. But I don't know exactly what that means. So
> I decided to give it a try, but still got an error:
> $ sudo dd if=2gb-v1.07a2-image.dd of=/dev/sde conv=notrunc,noerror
> dd: writing to `/dev/sde': No space left on device
> 3948545+0 records in
> 3948544+0 records out
> 2021654528 bytes (2.0 GB) copied, 5129.66 s, 394 kB/s
>
> Now, even though I get errors, sometimes the SD card seems to boot and run
> okay in the TS-7350, but I am not sure I trust it. I've had cases where it
> did not boot/run okay.
>
> I just ran the same command on another SD card that is the same brand (PNY)
> and size (2GB), and this time no errors:
>
> $ sudo dd if=2gb-v1.07a2-image.dd of=/dev/sde conv=notrunc,noerror
> 3962880+0 records in
> 3962880+0 records out
> 2028994560 bytes (2.0 GB) copied, 5082.2 s, 399 kB/s
>
> What's going on? I'm running out of ideas so I am posting this to the forum,
> hoping someone has a suggestion. Thanks!
>
> Steve
>
> > ---------------------------------------------------------------------
> > 4b. Re: How to clone contents of flash memory
> > Posted by: "pierrot lafouine"
> > pierrotlafouine
> > Sat Nov 7, 2009 3:11 pm (PST)
> >
> > Take the FLASh out of the TS and put it on a SD card reader on your Linux
> > PC.
> > In console write commands :
> > dmesg | tail
> >
> > You should see someting like this :
> > [188307.934633] sd 8:0:0:0: [sdb] Assuming drive cache: write through
> > [188307.935617] sd 8:0:0:0: [sdb] 3842048 512-byte hardware sectors (1967
> > MB)
> > [188307.936240] sd 8:0:0:0: [sdb] Write Protect is off
> > [188307.936242] sd 8:0:0:0: [sdb] Mode Sense: 4b 00 00 08
> > [188307.936244] sd 8:0:0:0: [sdb] Assuming drive cache: write through
> > [188307.936247] sdb: sdb1 sdb2
> > In this specific case SD card reader is mounted on sdb (see [sdb])
> >
> > Then copy your flash to a file :
> > dd if=/dev/sdb of=/yourpath/yourfilename.dd
> >
> > To copy yourfilename.dd to new flash (must be same size):
> > dd if=/yourpath/yourfilename.dd of=/dev/sdb
> >
> > Just be careful with syntax and with dd commands, you can make big mess.
> > Cheers!
> >
> > Pierre
> >
> > > ---------------------------------------------------------------------
> > > To:
> > > From:
> > > Date: Sat, 7 Nov 2009 22:48:54 +0000
> > > Subject: [ts-7000] Re: How to clone contents of flash memory
> > >
> > > Ok, this posting appeared a long time ago, but it looks like nobody
> > > answered
> > > it so far.
> > >
> > > I have the same problem: One TS-7800 was set up with a lot of effort,
> > > and now
> > > I want to copy the whole flash memory to ten more TS-7800's as simple
> > > and
> > > less error prone as possible.
> > >
> > > Maybe via the SD-card or an USB-stick or even via SSH, I don't care, but
> > > what
> > > is the way to create several clones of one embeddedARM?
> > >
> > > Thanks a lot
> > >
> > > Achim
> > >
> > > ---------------------------------------------------------------------
> > > --- In Janne Mäntyharju <janne.mantyharju@>
> > > wrote:
> > >
> > > >
> > > > Hi!
> > > >
> > > > Is it possible to make image of whole flash memory contents using
> > > > redboot (kernel + root image)? How to write image back to new device?
> > > > I have one prototype of device using TS-7250 ready and I'm searching
> > > > for
> > > > easiest way to clone contents of it.
> > > >
> > > > Thanks for reply!
> > > >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|