0

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.

2
  • Can you access it with cfdisk /dev/mmcblk0 (not the partition, the whole drive)? – FelixJN May 29 '19 at 14:33
  • 1
    I always use 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 use gparted. – You'reAGitForNotUsingGit May 29 '19 at 14:46
0

dd if=/dev/zero of=/dev/sd* bs=512 count=32 should clear your partition table. Then you should be able to use gparted. Replace /dev/sd* with your device (not your partition. e.g: /dev/sda, not /dev/sda1) MAKE SHURE YOU USE THE CORRECT DEVICE FOR of=... OR BAD THINGS WILL HAPPEN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.