AnswerBun.com

How do I reformat a hybrid-mbr sd card?

Unix & Linux Asked by dave mankoff on January 12, 2021

I have 32GB sd card that was flashed to a premade image using a utility some months/years ago. I want to reclaim the card and start fresh. Every attempt I have made at reformatting it and/or erasing the partition table has failed, however. Often the utilities say they did something, but the partition table still remains. Even the (very slow) attempt at wiping it with dd left the partition table intact:

$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=8192
# many hours later...
dd: error writing '/dev/mmcblk0': No space left on device
3895873+0 records in
3895872+0 records out
31914983424 bytes (32 GB, 30 GiB) copied, 11577.2 s, 2.8 MB/s

The card appears to have what is known as a "hybrid mbr". I have tried fdisk, gdisk, wipefs, parted, gparted, gnome-disks, and I am sure others that have been lost to my bash history. What secret incantation am I missing?

$ sudo gdisk /dev/mmcblk0
GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/mmcblk0: 62333952 sectors, 29.7 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 6A9E3D38-090C-48BA-A14D-7682BA479872
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 62333918
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048           67583   32.0 MiB    0C01  hassos-boot
   2           67584          116735   24.0 MiB    8300  hassos-kernel0
   3          116736          641023   256.0 MiB   8300  hassos-system0
   4          641024          690175   24.0 MiB    8300  hassos-kernel1
   5          690176         1214463   256.0 MiB   8300  hassos-system1
   6         1214464         1230847   8.0 MiB     8300  hassos-bootstate
   7         1230848         1427455   96.0 MiB    8300  hassos-overlay
   8         1427456        62333918   29.0 GiB    8300  hassos-data

Add your own answers!

Related Questions

Recently downloaded files using wget

1  Asked on December 17, 2020 by mohammad-qodrati

   

watch tail -20 ls -ltr?

1  Asked on December 17, 2020 by dong-gi-kang

   

Route all traffic via OpenVPN

1  Asked on December 17, 2020 by ihor_dvoretskyi

   

Evince ‘save as’ permissions

1  Asked on December 17, 2020 by stan-shank

   

change LS_COLORS behaviour

1  Asked on December 16, 2020 by barud

       

How to adjust NVIDIA GPU fan speed on a headless node?

2  Asked on December 16, 2020 by aleksandr-dubinsky

       

Linux VM unresponsive

0  Asked on December 16, 2020 by ykaly

 

Upgrading Berkeley DB rpm in a Centos OS

1  Asked on December 16, 2020 by gr68

         

How to redirect all network traffic through Tor?

0  Asked on December 15, 2020 by ananthakrishna-k

     

Feed script variable to command that prompts for user input

1  Asked on December 15, 2020 by vishnu-sajeevan

   

Configuring SNMP Traps

1  Asked on December 15, 2020 by kubomd

   

Wrong notification system in KDE Plasma

1  Asked on December 14, 2020 by arthur-m

       

start chromium on startup using systemd

1  Asked on December 14, 2020

     

DRBD Failure: (127) Device minor not allocated

1  Asked on December 14, 2020 by tanatos-daniel

       

Using bash shell function inside AWK

7  Asked on December 13, 2020 by tiny

   

Chrome on Gnome randomly fails to go full screen

1  Asked on December 13, 2020 by mikev

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir