TransWikia.com

Is there a "SD Memory Card Formatter" equivalent for Linux?

Unix & Linux Asked on December 10, 2021

I routinely need to completely erase SD cards.

This process is greatly speed up using SD Memory Card Formatter.

Unfortunately said program seems to be unavailable under Linux and alternatives (e.g.: dd or shred) take a LOOOONG time.

AFAIK SD/MMC cards have specific commands to mass-erase and I suspect that’s what used by "SD Memory Card Formatter" (as opposed to trying to erase using their content by overwriting).

Is there some tool using the same?

2 Answers

SD cards do not need to be formatted. "Formatting" is an old term specific for magnetic disks, where you prepare the tracks and sectors for actual data (they are not defined by disk, but by the head when you format the disk. So formatting is very slow.

Now "formatting" is not more such slow process, so it is not really formatting.

Often programs will just do a mkfs style formatting, so just creating the structure of file systems. Where to put data is already defined by card and internal controller.

Unfortunately I'm not find the command (given by controller) just to tell disk that sectors are not used. This may help, but possibly it is part of mkfs (hidden on kernel side). But do not do unnecessarily dd but on real magnetic harddisk: on SD, SSD, etc. they just consume the device.

Answered by Giacomo Catenazzi on December 10, 2021

If you use dd correctly it's extremely fast:

There is no reason to overwrite the whole card, that will always take a long time, no matter what software you use. You just have to remove the first sectors (partition table):

dd if=/dev/zero of=/dev/locationofcard bs=1024 count=1000

A way lower count will also do the job, but this should already be fast enough (seconds).

I am using 1000 as 'safe' value because i don't know by heart how low you can get.

Answered by Garo on December 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP