Remove partitions / format uSD Card
Discussion
I have a micro SD card that used to be in use in a Moto G phone as 'phone' storage - by which, I mean the phone encrypted the card so it could only be used in that particular phone, to help expand the usable memory, rather than as simple additional storage that could then be read by any other system. It was a Moto G / Android function that encrypted the card, nothing after market or app based.
Having removed the card from the phone, i tried clear it / format it in my PC/laptop using the normal format routine. This didn't work and as I didn't have immediate access to the phone, tried a few other SD formatting tools which also didn't work, such as https://www.sdcard.org/downloads/formatter/ . Once I had access to the original phone again, I replaced the uSD card and tried format/remove the encryption but the phone no longer recognised the card, probably due to my meddling!
I've now installed (USB pen drive) Ubuntu 19.10 temporarily and tried GParted to remove the partitions, change the partition type, format the card in different file systems, all with no joy. I've also tried using dd to fill the card with zeros (sudo dd if=/dev/zero of=/dev/sdc) which 'timed out' with no more space, saying it had filled everything with zeros, but still the 2 partitions remain.
Within Windows, I can't 'see' the card but in Linux, I can see info on the 2 partitions. The info I get is:


Any tools I can try to get rid of these 2 partitions so I can get back to a 'normal' uSD card? I don't need to recover any info from the card.
Having removed the card from the phone, i tried clear it / format it in my PC/laptop using the normal format routine. This didn't work and as I didn't have immediate access to the phone, tried a few other SD formatting tools which also didn't work, such as https://www.sdcard.org/downloads/formatter/ . Once I had access to the original phone again, I replaced the uSD card and tried format/remove the encryption but the phone no longer recognised the card, probably due to my meddling!
I've now installed (USB pen drive) Ubuntu 19.10 temporarily and tried GParted to remove the partitions, change the partition type, format the card in different file systems, all with no joy. I've also tried using dd to fill the card with zeros (sudo dd if=/dev/zero of=/dev/sdc) which 'timed out' with no more space, saying it had filled everything with zeros, but still the 2 partitions remain.
Within Windows, I can't 'see' the card but in Linux, I can see info on the 2 partitions. The info I get is:
Any tools I can try to get rid of these 2 partitions so I can get back to a 'normal' uSD card? I don't need to recover any info from the card.
xeny said:
Does lsblk show anything if you compare it with a "good" card?
Have you tried dd'ing a good card (with a different partition arrangement) onto it?
My normal go to in this situation is dd if=/dev/zero, I'm slightly suspicious it has ended up toggled read only somehow.
I need to load Ubuntu onto an old SSD I have, as my pen drive is too slow to keep booting into it and it's a quicker operation for me to swap out disks in my laptop, so your first suggestion I'll try once I've loaded Ubuntu onto my SSD. I have tried dd'ing the Ubuntu pen drive (8Gb) onto the card but it wouldn't / couldn't complete the task (probably to do with the fact that the pen drive was in use...), so once I've loaded my SSD, I'll give that one a shot as well using another uSD card. As you know, I've tried the dd if=/dev/zero route and this didn't work.Have you tried dd'ing a good card (with a different partition arrangement) onto it?
My normal go to in this situation is dd if=/dev/zero, I'm slightly suspicious it has ended up toggled read only somehow.
Jinx said:
Have you another android phone you could reformat it in. Linux would be my goto normally but if gparted can't do anything with it I'd try another android phone. Dodgy android formatting by the look of things (so almost Linux but changed just enough to be a pain in the arse) .
I've just tried this in my Android phone (a Xioami Redmi 6A phone), which claimed to work but the phone still reported it as a non-recognised card (I tried twice), so then tried a Windows format (not fast format) but it couldn't complete it.Next task - load Ubuntu onto my old SSD and try xeny's suggestions
S6PNJ said:
I've tried, but (from memory) it said it can't find an entry for it in etc/fstab (not sure if I've remembered the right folder...)
that suggests your mount command either didn't specify a mount point, or the device you wanted to mount in it? (apologies if this is sucking eggs).xeny said:
S6PNJ said:
I've tried, but (from memory) it said it can't find an entry for it in etc/fstab (not sure if I've remembered the right folder...)
that suggests your mount command either didn't specify a mount point, or the device you wanted to mount in it? (apologies if this is sucking eggs).xeny said:
Does lsblk show anything if you compare it with a "good" card?
Running "lsblk /dev/sdb" I get:NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 29.6G 0 disk
??sdb1 8:17 1 16M 0 part
??sdb2 8:18 1 29.5G 0 part
Running against a USB pen drive, I get:
lsblk /dev/sdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdc 8:32 1 1.9G 0 disk
??sdc1 8:33 1 1.9G 0 part /media/phil/MYLINUXLIVE
Not sure what I'm looking for or what it is meant to tell me?
Edited to add:
Running sudo dd if=/dev/zero of=/dev/sdb
I get
dd: writing to '/dev/sdb': No space left on device
61962241+0 records in
61962240+0 records out
31724666880 bytes (32 GB, 30 GiB) copied, 9005.36 s, 3.5 MB/s
but then subsequently running Gparted I still see the 2 Android partitions.
Edited by S6PNJ on Friday 12th June 20:36
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


