I was making a bootable SD card for my raspberry pi on ubuntu 18.04 and accidentally I put my computer to sleep. I ended up running my SD card, it doesn't want to format nether be partitioned, I tried using Gparted with no results: there is a red exclamation sign next to a EXT4 partition name. I event tried to use the command:
sudo mkfs.vfat -F32 -v /dev/mmcblk0p2
It displays this and get stuck:
/dev/mmcblk0p2 has 4 heads and 16 sectors per track,
hidden sectors 0x18000;
logical sector size is 512,
using 0xf8 media descriptor, with 10452992 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 10192 sectors, and provides 1304072 clusters.
There are 32 reserved sectors.
Volume ID is 0538c1e1, no volume label.
Is there a way to fix my SD card ? Thank you for trying to help. Have a nice day.
cfdisk /dev/mmcblk0
(not the partition, the whole drive)?dd
to write zeros to the first 100MB or so of any device (USB stick, SD card, HDD) that has a screwed up partition table. Then I reboot and usegparted
.