1

Topic: Impossible to format USB micro SD card

Dear all,
Sorry for my english, I'm french.
I've a problem to format. I'd like to put pictures but I don't know how.
It's a usb with 2 partitions, when I delete I've "Impossible d'avoir des partitions qui se chevauchent".
Ignore
Then I've "La (les) partition(s) 3 a (ont) été écrite(s) sur /dev/sdb, mais impossible d'informer le système des changements, sans doute à cause de son (leur) utilisation. Ainsi, les anciennes partitions restent en usage. Vous devriez redémarrer maintenant avant d'effectuer d'autres changements."
Ignore
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb
Cancel
Consultez les détails pour plus d’informations.

IMPORTANT
Si vous souhaitez recevoir de l’aide, vous devrez fournir les détails enregistrés !
Consultez http://gparted.org/save-details.htm pour plus d’informations.

Thank you by advance

2

Re: Impossible to format USB micro SD card

When I delete partitions, it writes success but after refresh the partitions are still here.

3 (edited by Menama 2019-06-16 11:18:24)

Re: Impossible to format USB micro SD card

Gparted details


GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2
Supprimer /dev/sdb1 (fat32, 43.20 Mio) de /dev/sdb  00:00:02    ( SUCCÈS )
        
calibrer /dev/sdb1  00:00:01    ( SUCCÈS )
        
chemin : /dev/sdb1 (partition)
début : 8192
fin : 96663
taille : 88472 (43.20 Mio)
supprimer la partition  00:00:01    ( SUCCÈS )

========================================
Supprimer /dev/sdb2 (ext4, 14.79 Gio) de /dev/sdb  00:00:02    ( SUCCÈS )
        
calibrer /dev/sdb2  00:00:01    ( SUCCÈS )
        
chemin : /dev/sdb2 (partition)
début : 98304
fin : 31116287
taille : 31017984 (14.79 Gio)
supprimer la partition  00:00:01    ( SUCCÈS )

========================================
Créer Partition primaire #1 (fat32, 14.84 Gio) sur /dev/sdb  00:04:24    ( ERREUR )
        
créer une partition vide  00:03:38    ( SUCCÈS )
        
chemin : /dev/sdb3 (partition)
début : 2048
fin : 31115263
taille : 31113216 (14.84 Gio)
effacer les anciennes signatures de systèmes de fichiers sur /dev/sdb3  00:00:46    ( ERREUR )
        
write 512.00 Kio of zeros at byte offset 0  00:00:00    ( SUCCÈS )
write 4.00 Kio of zeros at byte offset 67108864  00:00:00    ( SUCCÈS )
write 512.00 Kio of zeros at byte offset 15929442304  00:00:46    ( ERREUR )
messages de libparted    ( INFO )
        
Impossible d'avoir des partitions qui se chevauchent.
La (les) partition(s) 3 a (ont) été écrite(s) sur /dev/sdb, mais impossible d'informer le système des changements, sans doute à cause de son (leur) utilisation. Ainsi, les anciennes partitions restent en usage. Vous devriez redémarrer maintenant avant d'effectuer d'autres changements.
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb
Argument invalide lors d'un positionnement pour écriture sur /dev/sdb

========================================

4

Re: Impossible to format USB micro SD card

It seems that there is an error in the actual partition definition.

If you want to delete all 2 partitions of the card, you can try to create a new partition table on this card.
Creating a new msdos-type partition table will delete the actual partition table. Perhaps this can overcome the partition table problem.

To attach images, you have to use some external host service and post the appropriate link (one link per post).  Posting images or other files directly on the forum server isn't allowed by the forum security settings.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: Impossible to format USB micro SD card

Thank you to help me class413,
I tried and it doesn't work. No information.
Just after validation, "exam of the devices".

6

Re: Impossible to format USB micro SD card

Do you get a specific error or problem message? Sometimes you can see yellow warning triangles in the GParted graphic screen. From these triangles you can get a description of the problem and perhaps a suggestion about how to fix it.

From the GParted details above I understand that there is a problem that makes GParted think that there are overlapping partitions ("Impossible d'avoir des partitions qui se chevauchent").
Furthermore, it seems that the system couldn't work on the partitions because they were probably mounted by the operating system. GParted can't modify partitions that are mounted. You have to unmount them before. This can be the case of GParted running from an installed Linux distribution that auto-mounts partitions. GParted live doesn't mount any partition by default.


Other solutions you can investigate:

- Use a newer GParted version (0.30 version is 2 years old). The latest stable version is 1.0.0.

- Use the latest stable GParted live cd/usb (you don't mention if you used GParted from GParted live media or from any Linux distribution installed.

- Use "testdisk" to check the card and eventually try to fix it. testdisk can be found in the GParted live cd/usb or in its own live cd from the www.cgsecurity.org web page.

- Try to manually delete the partitions using fdisk as root from the command line (fdisk is included in the GParted live cd as well as in most Linux distibutions).

*** It is highly recommended to backup any important files before doing resize/move operations. ***

7 (edited by Menama 2019-06-19 13:24:59)

Re: Impossible to format USB micro SD card

Thank you, lot of solutions to try.
On the interface, with my many tries, I've seen a problem of flag.
I'm on Linux Mint and up to date. I'll try live usb, I didn't know there had a big difference of version.

8

Re: Impossible to format USB micro SD card

With test disk
On boot partition
Can't open/dev/sdc1 : No such file directory
Cannot initialize
mlabel: Cannot initialize drive

When test to remove partitions then create primary partition
Can't have overlapping partitions
Then new error
Partition(s) 3 on/dev/sdc have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
Another
Invalid argument during seek for write on /dev/sdc

9

Re: Impossible to format USB micro SD card

This "unable to inform the kernel" error has been fixed in versions 0.31.x (2018) and later. That's why I suggested the use of the latest stable GParted live. Which are the GParted version and the o.s. you did use for this check?

Various Linux distributions can include older versions of support software like GParted or lack some libraries. GParted live contains the right library versions to assure that features work as needed.

Another remark:

You should reboot now before making further changes.

from the error message.
Did you try to reboot at that time?

*** It is highly recommended to backup any important files before doing resize/move operations. ***

10

Re: Impossible to format USB micro SD card

Sorry to not write it, my answer just before was with gparted-live-1.0.0-2-amd64.iso.

11

Re: Impossible to format USB micro SD card

I put the micro usb card in the trash.

12

Re: Impossible to format USB micro SD card

It is always possible that there was a hardware problem.
To look for this, you can use the command "dmesg" as root in the terminal window:

sudo dmesg

After launching the command, you insert the card in the reader. A few seconds later the card communicates with the o.s.
In case of problem you can observe many repeated attempts to communicate with the card that don't give a positive result.
This is valid for various external devices as USB sticks and external hard drives.


However I'm not sure that there was a hardware problem in this case. Overlapping partitions are sometimes generated in case of partitioning operations executed by various different tools.

If you keep the card, you can try another way to erase its content (including the master boot sector and partition table):
from the terminal as root, you can use the command "dd" to erase the few first MiB of the data space.

Exemple

sudo dd if=/dev/zero of=/dev/sdb bs=1M  count=30

This will write zeros to the first 30 MiBs of the device /dev/sdb.
Please be very careful in specifying the output device (the device to erase). There is no UNDO!
After that, if the card hardware is good, GParted will see it as an empty card ready to partition.

*** It is highly recommended to backup any important files before doing resize/move operations. ***