I have a failed SanDisk Extreme III (30 MB/s 4GB) card.
I successfully recovered everything that mattered a couple of weeks
ago using ddrescue:
$sudo ddrescue -f -n /dev/sdd ./from-site-`date +%F`.dd logfile
The resulting image is 4110188544 bytes in size.
Today used dd to put the recovered image onto a new Sandisk Extreme
40MB/s 4GB card:
$ sudo dd bs=1M if=from-site-2013-06-25.dd of=/dev/sdd
dd: writing ‘/dev/sdd’: No space left on device
3816+0 records in
3815+0 records out
4000317440 bytes (4.0 GB) copied, 1313.42 s, 3.0 MB/s
When I boot from the new card, I get "Attempt to access beyond the end
of device" in /var/log/messages, although these attempts only come
from access to /dev/sda5 which is the swap partition.
So, what do I do?
As far as I can tell all I need to do is fix the partition table and
reduce the size of the swap partition. I did try firing up fdisk and
deleting and recreating the partition but it just created it the same
size, presumably because fdisk believes the disk is the wrong size.
How do I fix that?
Possible solutions while booted into the box preferred but if I need
to take the card out and transfer to another PC via USB card reader I
can do that.
Mark Rogers
--
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG