Score:0

On SD card the patitions come back after removing them

us flag

A little funny problem I'm curious about the reason.

I found an old SD Card, I even don't remember that it was used for. So I want to remove the old partitions and use it for some of my devices.

And now the magic begins.

[root@localhost /]# parted /dev/mmcblk0
GNU Parted 3.4
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: SD 00000 (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  256MB   255MB   primary  fat32        lba
 2      257MB   16.0GB  15.8GB  primary  ext4

(parted) rm 2                                                             
(parted) p                                                                
Model: SD 00000 (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  256MB  255MB  primary  fat32        lba

(parted) rm 1                                                             
(parted) p                                                                
Model: SD 00000 (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start  End  Size  Type  File system  Flags

(parted) quit                                                             
Information: You may need to update /etc/fstab.

[root@localhost /]# parted /dev/mmcblk0                                   
GNU Parted 3.4
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: SD 00000 (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  256MB   255MB   primary  fat32        lba
 2      257MB   16.0GB  15.8GB  primary  ext4

(parted)

So basically, I remove the partitions, everything seems ok, when I quit parted the partitions came back.

Of course, it's the same situation if I use gparted or fdisk. The removed partitions come back once I exit the utility.

I'm very curious that is the explanation ? I never seen something like this before.

Nikita Kipriyanov avatar
za flag
Probably card is faulty and doesn't really record anything to the flash storage. Or it doesn't record the partition table, which is a feature. Anyway, this is off topic on ServerFault.
Score:1
ec flag

There are a lot of weird SD card devices out there. There are - for example - cards that have WLAN connectivity and can upload the files stored on them to an FTP server (which is really nice for digital cameras).

Having said that, maybe you have one of those SD cards that is not just a data store, but provides some extra functionality. Usually these functions work by reading/writing specific files on a specific partition, so the card ignores writes to the partition table area.

Paul Zakharov avatar
us flag
Thanks for replying. Globally it was also my guest, that the sd card is a little bit special. I saw a lot of usb-flash in my job. But for the moment I'm not sure that this is the explanation as it's my personal sd card and normally it should be just a normal sd card.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.