Problem:
I can't, for the love of Linus Torvalds, remove the goddamn read-only attribute from this Kingston 32 GB Micro SD Card. I want to wipe clean the whole card. I can't remove the read-only attribute from a Kingston 32 GB Micro SD Card. I want to wipe clean the whole card.
I was given a Raspberry Pi 3 and a 32 GB Micro SD Card and an Echo to play around with. The Micro SD Card was factory fresh when I got it. I downloaded a fresh Ubuntu 16.04 image and formatted the card using Etcher on Windows 10. After I was done, I plugged in everything for the Raspberry to work and noticed that nothing happened. I started to panic a little and thought to myself: "Good job Scrat, you utter moron. Why couldn't you simply wait a little and google a freaking tutorial."
Background story:
So, I'll be doing an internship for a small business in my city, and the boss asked me to find a solution for a some thing he wants me to do next month (Has to do with Amazon Echo's Alexa and an Apache Server) and for that he bought a Raspberry Pi 3 and a 32 GB Micro SD Card. He gave me his Echo, the Raspberry and the Micro SD Card to play around a bit. The Micro SD Card was factory fresh when I got it.
Cause of problem:
As you might've already guessed, I screwed up the card.
Overenthusiastic as I was, I made downloaded a fresh Ubuntu 16.04 image and formatted the card using Etcher on Windows 10. After I was done, I plugged in everything for the Raspberry to work and noticed that nothing happened. I started to panic a little and thought to myself: "Good job Scrat, you utter moron. Why couldn't you simply wait a little and google a freaking tutorial." After I recovered myself, I googled what could possibly have gone wrong and what I should've done, and had to discover that you can't just put any random Ubuntu Imageimage on it, it. It has to be one of the OSimages the creator provides (Inin my case Ubuntu Mate or Raspbian).
Already tried solutions and research:
After seeing my mistake I thought: "Alright, no problem, I'll simply reformat the card, clear everything from it by doing that and install Ubuntu Mate on it." ... But boy was I wrong.
With Windows:
So when
Attempted fixes with Windows
When trying to reformatreformat by right-clicking and reformating via the Windows Explorer, the first thing I encountered that the card was in read-only mode. Trying to access it in the Windows Explorer only showed me the EFI directory, of which I wasn't surprised by.
First
First thing I found on the internet is about a switch/lock on the cardswitch/lock on the card, but I debunked that pretty soon, due to my card does not havinghave any lock at all, neither. Neither the card itself, nor the Robson Mini Card Reader I use for reading.
Afterwards
Afterwards I tried to remember how to edit disks.
Mind that I'm still using Windows 10 at that moment, because I would've had to copy my old VM-Ware and system image from my external drive, and I didn't know where that was.
So I remembered something from first grade's IT class called DISKPART. So I opened a command line, run diskpart, and list all my disks via
list disk
I opened a command line, run diskpart, and list all my disks via
list disk
So followingFollowing the information I've got, I knew that Datenträger 2 aka. Disk 2 is the card I wanted to edit by doing:
select disk 2 select disk 2
attributes disk clear readonly attributes disk clear readonly
Which was also successfully executed.
But when I tried to do:
clean
But when I tried to do:
I got a Hardware Error Message (In German, thats why I'm not copying it here, but it essentially only said Hardware Error). That error also followed when trying to create primary partition or do other things.
At this point the panic in me started to grow more and more. But I tried to keep calm because I still had a few tricks up my sleeves.
So the next thing I tried were some things I found on the internet. I tried using the Programms: EaseUS Partition Master, Etcher (again) and SD Card Formatter which all failed due to the card being protected (read-only, write-protected).
I also tried using the registry edit to change the behaviour of Windows towards storage devices by creating the key (Which was not there yet):
clean
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
I got a "Hardware Error Message" (In German, thats why I'm not copying it here, but it essentially only said Hardware Error). That error also followed when trying to create primary partition or do other things.
At this point the panic in me started to grow more and more. But I tried to keep calm because I still had a few tricks up my sleeves.
I tried using the programs: EaseUS Partition Master, Etcher (again) and SD Card Formatter which all failed due to the card being protected (read-only, write-protected).
I also tried using the registry edit to change the behaviour of Windows towards storage devices by creating the key (which was not there yet):
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
and creating a new keyword (DWORD WriteProtect) and setting it to 0, which means no read-only.
With Linux
That
Attempted fixes with Linux
That didn't work either and I began loosinglosing my nerves with Windows, so I got off my butt and searched for my external drive (Which funnily enough was under the backseat of my car) and installed VM-WareVM-Ware and ran the Ubuntu 16.04 virtual machine I use for school.
Starting
Starting the VM I already noticed that Ubuntu was able to help me way more than Windows (Oror at least so I thought so, because as I soon had to notice, my Linux skills are kinda... limited in this aspect). So theThe first thing I see is a linked icon on the Desktop to the card called "Ubuntu 16.04.2 LTS amd64""Ubuntu 16.04.2 LTS amd64" in it are contained the various stuff Ubuntu needs to work seen in the image here.
But that wouldn't help me. So I went ahead and started a terminal and wrote:
But that wouldn't help me. So I went ahead and started a terminal and wrote:
lsblklsblk
fdisk -lfdisk -l
Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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: 0xa14a8cb2
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 62914559 62912512 30G 83 Linux
Disk /dev/sdb: 29,2 GiB, 31306285056 bytes, 61145088 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: 0x15e2543d
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 0 3035519 3035520 1,5G 0 Empty
/dev/sdb2 14432 19295 4864 2,4M ef EFI (FAT-12/16/32)
Which Immediately opened with an error messageerror message:
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Which
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Which I ignored because I thought it was no biggie, but right after ignoring the previous one the next error message popped upthe next error message popped up:
Partition(s) 1 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
So
Partition(s) 1 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
So I did what the message told me and rebooted. But that was of no use either, because the same two errors popped up again, so. I ignored them both this time and the good old trusty gparted window I knew from school opened.
But once
Once I changed to /dev/sdb it became confusing really fast. As you can see here, things are pretty weird, because now sdb is somehow considered my SSD instead of the card, but the image from the card is still mounted. At this point I was too angsty to continue doing anything further in fear of accidentally screwing up my Laptoplaptop as well.
By the way, I have also tried giving myself permissions to access the disk and try to use the
dd
command, but with the same error message(Access denied, read-only or something, I'm not exactly sure, but something in this direction).dd
command, but with the same error message (Access denied, read-only or something, I'm not exactly sure, but something in this direction).I really hope you can help me somehow because I'm really at the end with my Latin(Is that a saying in English, too? I hope so, otherwise I'll sound like a maniac). Also, I have already ordered another 32 GB Micro SD Card from Amazon, in case there is no more hope for the old one. But I'm not giving up yet.I have already ordered another 32 GB Micro SD card from Amazon, in case there is no more hope for the old one. But I'm not giving up yet.
P.S.:
(Sorry that some things are in German but I think those things are for the most part self-explanatory. If not, feel free to ask for translation, I will kindly help you help me :)