I have a 8 GB pendrive. I used to write raw data into the pendrive (without creating filesystem) using the
Today, when I inserted the pen drive, the I am unable to write anything on to it. When I open
gparted it is showing the total space on the pen drive as 500 MB. I am unable to create a new partition table or a partition on the pen drive now.
Here is the
fdisk -l output.
Disk /dev/sdb: 0 MB, 512000 bytes 255 heads, 63 sectors/track, 0 cylinders, total 1000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00095df6
What's wrong with the pen drive? How can I recover the lost space?
Device Boot Start End Blocks Id System
When I open gnome-disks, it shows the total space as 8 GB but when I try to create a new partition using it, it shows the following error:
Error creating partition on /dev/sdb: Command-line parted --align optimal --script "/dev/sdb" "mkpart primary ext2 1MiB 7969177599b"' exited with non-zero exit status 1: Error: The location 7969177599b is outside of the device /dev/sdb. (udisks-error-quark, 0)