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

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

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

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
fungus
Level 4
Level 4
Posts: 386
Joined: Mon Sep 07, 2015 6:09 am

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

Post 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.
Linux Mint 17.3 64bit KDE @ Asus B150M-A, i3 6100, Crucial 16GB DDR4, Crucial BX100
One bit says: YES, the other answers: NO.. Guess who's he and who's she..! ;)
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

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

Post 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.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

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

Post 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.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

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

Post 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
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
philotux

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

Post by philotux »

If you don't have any data on the card, make a new partition table and see if it helps.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

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

Post 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.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

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

Post 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
Image
mrmajik45

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

Post by mrmajik45 »

I use Etcher to write onto SD cards with no issues.
philotux

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

Post 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.
Locked

Return to “Hardware Support”