Page 1 of 1

SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Sun Feb 10, 2019 2:35 pm
by deepakdeshp
I have an SD card , capacity 16 gb which had 3 partitions ,msdos 500MB , ext4 2gb and Ext4 12GB. After trying some dd commands which are required to write Raspbian, the card gave error

Code: Select all

The location is outside of the device /dev/sdb
. The 3rd partition is missing . I deleted all partitions and formatted both the partitions. The partition and the drive size shown is 4GB instead of the correct 16 GB
Any hints, help are welcome

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Sun Feb 10, 2019 3:22 pm
by fungus
When you dd a raspbian image onto a SD card, everything on that card is whiped, no way back from that. The reason why it only shows up as 4GB is because that is the size of the system partition and file system in the image. Whenever raspbian is actually run from the SD card, the file system will be expanded automatically and show up as 16-ish GB.

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Sun Feb 10, 2019 3:48 pm
by deepakdeshp
fungus wrote:
Sun Feb 10, 2019 3:22 pm
When you dd a raspbian image onto a SD card, everything on that card is whiped, no way back from that. The reason why it only shows up as 4GB is because that is the size of the system partition and file system in the image. Whenever raspbian is actually run from the SD card, the file system will be expanded automatically and show up as 16-ish GB.
I can't install Raspbian. It runs out of space as I try to install it. I didn't have any data on it, I am just trying to retrieve the card.

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Sun Feb 10, 2019 6:56 pm
by AndyMH
Try mkusb:

https://help.ubuntu.com/community/mkusb

As well as using it to create persistent bootable usbs, I've also used it to set usbs back to normal.

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Thu Feb 14, 2019 5:20 am
by deepakdeshp
bougti wrote:
Thu Feb 14, 2019 5:12 am
Beware of cheap cards being sold on Ebay. Many are fake. Apparantly there are those who try to pass off old low capacity cards as 16 GB cards. Some cards are listed as 16 Gb, which means 16 gigabits, or only 2 gigabytes. Many are fooled into thinking this means 16 gigabytes.
No the card worked with full 26 GB capacity, but later turned into less capacity storage after the dr command. Thanks for the input

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Thu Feb 14, 2019 5:30 am
by philotux
If you don't have any data on the card, make a new partition table and see if it helps.

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Thu Feb 14, 2019 11:44 am
by deepakdeshp
philotux wrote:
Thu Feb 14, 2019 5:30 am
If you don't have any data on the card, make a new partition table and see if it helps.
I deleted, recreated the partition, it didn't help. I surely feel it's very strange.

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Thu Feb 14, 2019 12:57 pm
by trytip
in gparted device > create partition table > select msdos or gpt (probably msdos if it's a flash drive used between a lot of devices and usually fat32 format)
this will destroy the first few sectors and get it ready to be formatted. after create partition table you can format with gparted or usb stick formatter from menu

Image

Image

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Thu Feb 14, 2019 2:23 pm
by mrmajik45
I use Etcher to write onto SD cards with no issues.

Re: SD card after dd commands shows 4GB capacity instead of 16 GB

Posted: Thu Feb 14, 2019 4:01 pm
by philotux
deepakdeshp wrote:
Thu Feb 14, 2019 11:44 am
philotux wrote:
Thu Feb 14, 2019 5:30 am
If you don't have any data on the card, make a new partition table and see if it helps.
I deleted, recreated the partition, it didn't help. I surely feel it's very strange.
Not a new partition, but a new partition table. please see the illustration above from trytip.