I'm using Ubuntu 20.04, after running below command on only my root partition sda4
, I checked gparted via live Ubuntu and it showed unallocated space for all partitions on my hard disk (not just for sda4
).
Can anyone guide me what actually happened and how I can access the other partitions now?
sudo dd if=/dev/zero of=/dev/sda4
Update:
I ran the command sudo gdisk -l /dev/sda
and it displayed this:
GPT fdisk (gdisk) version 1.0.4
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Warning: Invalid CRC on main header data; loaded backup partition table.
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!
Warning! One or more CRCs don't match. You should repair the disk!
Main header: ERROR
Backup header: OK
Main partition table: ERROR
Backup partition table: OK
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: damaged
Found invalid MBR and corrupt GPT. What do you want to do? (Using the
GPT MAY permit recovery of GPT data.)
1 - Use current GPT
2 - Create blank GPT```