Re: SSD Memory Card (was The Raspberry Pi that Took a Day Off.)
David Wright <deblis@lionunicorn.co.uk> writes:
> I've not heard of that problem. You were prevented from zeroing the
> entire device, which would have wiped the partition table anyway.
>
> What I would want to check is that the OS isn't doing something
> stupid, like trying to automount it, failing, and consequently
> setting the device readonly. By OS, I really mean DEs, or
> automounters in general.
>
> You could also try zeroing it in another machine, ± any adapters
> required. (Bear in mind that adapters do have readonly sliders.)
I suspect this is the crux of the problem. the adapter I
connected is a card reader. You put the SSD in a little plastic
jacket that holds the SSD in such a way that the card reader can
access the edge connector but the holder jacket has no electronics.
There is a small notch in the plastic of the jacket on the left
edge and the right front corner of the plastic carrier has a
diagonal cut to prevent someone from putting it in upsidedown.
Since I posted, there is good news but I still wonder if
I am not going bonkers because after unplugging the Sony card reader
and plugging it back in, I now am getting device /dev/sdg instead
of /dev/sdh. I was also able to do the following:
#sudo fdisk /dev/sdg
which gave me the fdisk utility as before so I did what crazy
people do which is to do the same thing as before, hoping for
different results.
By Joe, I got them.
I typed d to delete a partition and it put partition 2 up as the
default candidate as before so I selected it and then typed d
again which told me that only partition 1 was left so it was
deleted.
I had gotten this far before so wasn't too excited but type
w and this time got the message stating that the partition table
had been rewritten and fdisk then exited.
Now, doing sudo fdisk -l /dev/sdg yields
1wb5agz martin tmp $ sudo fdisk -l /dev/sdg
Disk /dev/sdg: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Disk model: USB HS-SD Card
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: 0x680226ff
The partitions are gone. My latest screwball theory is
that the Sony card reader went in to some sort of protective mode
after the dd operation overwrote the device. My unplugging the
reader and plugging it back in reran the driver which reset the
protective mode back to normal which may be why it all worked
right this time.
One last question: Since the image will still be too
large as it is, can tunefs be run on it or a copy of it to shrink
about 4 gb of user space? The good system I copied the image
from only had about 12% of the partition used so I should be
able to transplant it to the smaller disk if tunefs can do that
and still leave a bootable device.
Thanks for all useful ideas.
Martin McCormick
Reply to: