I have a SanDisk Ultra microSD card with 16 GB capacity.I connected it to my laptop using a Zebronics ZEB-230CR card reader.
I am facing issues with formatting the card.
I opened the Disks utility on Ubuntu 18.04 and formatted the whole drive to msdos layout. Disks utility shows that the drive has 16 GB unallocated space.
GParted also shows the same.
However when I add a FAT32 partition using GParted I get the following error:
Can't have a partition outside the disk!
The output of fdisk /dev/sdb -l is as follows:
I am unable to diagnose the problem from any previous answers. The partition fails to be created correctly. Is this an issue with the sd card or am I doing something wrong?
edit:
After formatting the disk using the "Disks" utility the output of fdisk is as follows
after formatting
edit:
Logs after attempting to create a partition
Blockquote
GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize
Libparted 3.2
Create Primary Partition #1 (fat32, 14.84 GiB) on /dev/sdb 00:00:05 ( ERROR )
create empty partition 00:00:00 ( SUCCESS )
path: /dev/sdb1 (partition)
start: 2048
end: 31115263
size: 31113216 (14.84 GiB)
clear old file system signatures in /dev/sdb1 00:00:05 ( ERROR )
libparted messages ( INFO )
Answer
Normally a fresh partition table shouldn't have any entries visible at all – even though it always has exactly 4 slots, they should be zeroed out and wouldn't appear in partitioning tools. That is, after creating one partition via fdisk, one partition is what you should see.
But in your screenshots, the remaining partition table entries aren't zeroed out – although their type is set to "Empty", the entries still have start/size and other values present. (Additionally, the first partition is ~31 GB even though it's on a ~15 GB disk, and no partitioning tool would have allowed this.)
This is probably not a software bug – the repeating pattern 0x0200'0200
(33554944) in all 'start' and 'size' fields makes me suspect it's a hardware problem (e.g. the card's flash memory going bad). Basically, even though the program tries to write zeros to the card, some bits are permanently stuck at '1' after reading the same data back.
(That's also why the first partition's start sector 2048 (0x0000'0800) suddenly becomes 33556992 (0x0200'0A00), and most likely the entire MBR is corrupted the same way.)
Try a different card on the same reader, and try the same card on a different reader – one of them probably needs to be thrown away. (Maybe clean the electrical contacts just in case?)
No comments:
Post a Comment