Score:0

Unabe to format SDCard with Disks (udisks-error-quark, 0)

in flag

I have an 8GB sdcard which was used to extend the storage on my android phone. It now is not detectable on android or windows. Ubuntu shows it but unable to format or delete partitions, I have tried the solutions from the other questions.

Here's the output of sudo fdisk -l /dev/mmcblk0

ubuntu@ubuntu:~$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 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: gpt
Disk identifier: 321960E8-BABE-4EF1-907A-84F301351CAA

Device         Start      End  Sectors  Size Type
/dev/mmcblk0p1  2048    34815    32768   16M unknown
/dev/mmcblk0p2 34816 15523806 15488991  7.4G unknown

Disks and gpart say operation successful when I try to format or delete partitions But it doesn't reflect, just shows the partition as unknown

https://i.stack.imgur.com/sm9CH.png

https://i.stack.imgur.com/Ob5CN.png

I've tried variations of the dd command

ubuntu@ubuntu:~$ sudo dd if=/dev/zero of=/dev/mmcblk0p1 bs=2048 count=32
32+0 records in
32+0 records out
65536 bytes (66 kB, 64 KiB) copied, 0.311052 s, 211 kB/s

ubuntu@ubuntu:~$ sudo dd if=/dev/zero of=/dev/mmcblk0p2 bs=2048 count=32
32+0 records in
32+0 records out
65536 bytes (66 kB, 64 KiB) copied, 0.000156408 s, 419 MB/s

ubuntu@ubuntu:~$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=2048 count=32
32+0 records in
32+0 records out
65536 bytes (66 kB, 64 KiB) copied, 26.9264 s, 2.4 kB/s

Kindly suggest if there is a way to delete this pesky partition or if this is a lost cause and the sdcard is not salvageable.

ubuntu@ubuntu:~$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The backup GPT table is corrupt, but the primary appears OK, so that will be used.

Command (m for help): p

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 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: gpt
Disk identifier: 321960E8-BABE-4EF1-907A-84F301351CAA

Device         Start      End  Sectors  Size Type
/dev/mmcblk0p1  2048    34815    32768   16M unknown
/dev/mmcblk0p2 34816 15523806 15488991  7.4G unknown

Command (m for help): d
Partition number (1,2, default 2): 1

Partition 1 has been deleted.

Command (m for help): d
Selected partition 2
Partition 2 has been deleted.

Command (m for help): p
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 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: gpt
Disk identifier: 321960E8-BABE-4EF1-907A-84F301351CAA

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

ubuntu@ubuntu:~$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The backup GPT table is corrupt, but the primary appears OK, so that will be used.

Command (m for help): p

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 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: gpt
Disk identifier: 321960E8-BABE-4EF1-907A-84F301351CAA

Device         Start      End  Sectors  Size Type
/dev/mmcblk0p1  2048    34815    32768   16M unknown
/dev/mmcblk0p2 34816 15523806 15488991  7.4G unknown

Command (m for help):
N0rbert avatar
zw flag
You should know that whole SD card is /dev/mmcblk0. The /dev/mmcblk0p1 is a partition. It may be an issue.
ViVekH avatar
in flag
Thanks, updated the question
luisito_36 avatar
th flag
I solved the similar problem: https://askubuntu.com/a/1478086/849328
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.