Use a tool like gdisk
or parted
on Ubuntu to correct the GPT table. You can try the following:
sudo gdisk /dev/nvme0n1
Then, enter the command r
to repair the GPT structure, followed by w
to write the changes. Alternatively, using parted
to check and correct alignment issues might help:
sudo parted /dev/nvme0n1 align-check optimal 1