I have a 2 GB memory card that I used as install media for Fedora 23 Design Suite. I want to reuse the same memory card for another Linux install media so I tried re-partitioning it with fdisk. The first time I tried, the fdisk utility has no errors. So I unplug the memory card, plug it back in again and do an lsblk command but the old partitions used by the Fedora media are still there:

$ lsblk
sdd         1.9G  disk
|- sdd1     1.8G  part   /run/media/foo/Fedora-Live-Dsgn-x86_64-23-10
|- sdd2       4M  part   /run/media/foo/EFI
|- sdd3    16.2M  part   /run/media/foo/Fedora Live

Thinking that the previous fdisk operation failed, I unmounted the mounted /dev/sdd partitions listed above and did a dd command, thinking it would just blank out the disk:

$ sudo dd if=/dev/zero of=/dev/sdd bs=4M; sync

So not I unplug and re-plug the memory card back in and lsblk gives me the expected result (no more partitions):

$ lsblk
sdd         1.9G  disk

So now I try to create a new partition table using fdisk but I'm surprised that it is reporting the disk to have 3.6 GiB of space!

$ sudo fdisk /dev/sdd
Command (m for help): p
Disk /dev/sdd: 3.6 GiB, 3881648128 bytes, 7581344 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: 0x61f8cba0

Device     Boot Start     End Sectors  Size Id Type
/dev/sdd1        2048 7579647 7577600  3.6G 83 Linux

So my question is how do I restore the memory card to its original state so that it has 1.9GB of disk space and when I do partitions management with fdisk it won't report that the memory card is double the size.

I'm using Fedora 23 Gnome (Design Suite spin) so if possible, the commands be specific to this distro.

  • I think everything is OK with the USB stick. When you dd a .iso to a USB stick, the stick reports the size of the .iso instead of the actual size. – Thomas Sep 7 '16 at 17:53

I think there's the bad memory card. Try to check it for bad sectors.

badblocks -wvs /dev/sdd

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.