0

I'm was trying to delete all partition in a usb drive(a sd card with 64Gb storge), and by lsblk it showed that there is 12 partition and
pretty much correct total disk size(59.5/64)

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda           8:0    1 59.5G  0 disk 
├─sda1        8:1    1  3.5G  0 part /media/james/STATE
├─sda2        8:2    1   16M  0 part 
├─sda3        8:3    1  420M  0 part /media/james/ROOT-A
├─sda4        8:4    1   16M  0 part 
├─sda5        8:5    1    2M  0 part 
├─sda6        8:6    1  512B  0 part 
├─sda7        8:7    1  512B  0 part 
├─sda8        8:8    1   16M  0 part /media/james/OEM
├─sda9        8:9    1  512B  0 part 
├─sda10       8:10   1  512B  0 part 
├─sda11       8:11   1    8M  0 part 
└─sda12       8:12   1   32M  0 part /media/james/EFI-SYSTEM
mmcblk2     179:0    0 29.7G  0 disk 
└─mmcblk2p1 179:1    0 29.4G  0 part /var/log.hdd
                                     /
zram0       251:0    0  1.9G  0 disk [SWAP]
zram1       251:1    0   50M  0 disk /var/log
zram2       251:2    0    0B  0 disk 

but when i try to delete all of them by fdisk it returns a error suggest there is no partition exist

# fdisk /dev/sda

Welcome to fdisk (util-linux 2.38.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.

The device contains 'ext4' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Device does not contain a recognized partition table. Created a new DOS (MBR) disklabel with disk identifier 0xe34eee2c.

Command (m for help): d No partition is defined yet!

then the same thing happened with gParted(which suggest total drive size is only 1.8GB, and there is only 1.8Gb of unlocated space) sorry for my english

james
  • 185
  • 1
  • 10

2 Answers2

1

you formatted your partition table fully into ext4, this should not be done it into table area. do cfdisk /dev/sda , when you entered pseudo graphical UI, you would format its table type, you can use GPT table, but it would be fine when you check MS-DOS format for it. After generating this table, you should add partition from UI, and this will be /dev/sda1, after that, fsck.vfat /dev/sda1 to make fat partition.


Many thanks, Yunjin Lee

0

Then you may format /dev/sda, this is wrong format but this would eliminate previous datas. Then you can regenerate gpt partition table, and create the big one as linux partition, and try to format with ext4 fs. Ext4 is also good for fsck command