Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [gdisk]

Questions related to gdisk which is a set of text-mode partitioning tools for Linux and other operating systems.

Filter by
Sorted by
Tagged with
0 votes
0 answers
273 views

How do I change the partition format that was accidentally changed to MBR back to GPT?

The first time my storage looked like this: because I'm dual booting Ubuntu with Windows. but accidentally my hard disk ends up like this: After I checked with gdisk I got something like this: HGST ...
Muhammad Iqbal's user avatar
0 votes
0 answers
125 views

Proper Way to Produce Image of Truncated GPT Drive

Another question addresses a scenario where truncate damages an image of a GPT drive. If I understand correctly, the advice there is to use gdisk to repair the damage. I would rather not cause the ...
Ray Woodcock's user avatar
0 votes
0 answers
83 views

Trying to restore Drive that I accidentally used DD on

I was attempting to use the DD command to create a bootable Ubuntu server USB. By accident, I ran the command to my boot drive. It ran for a few minutes, then I noticed and pressed control+z to halt ...
dpc's user avatar
  • 1
1 vote
2 answers
146 views

I need 2 create a partition on my USB flash drive with block/cluster size of 256 KB, but cant find the dialog box 2 specify this block size in Disks

I'm using Gnome's Disks program 2 format my USB flash drive. I want only 1, 0700 Microsoft basic data partition, covering the whole disk. The disk will be used to transfer 2-8GB video files between ...
michal roesler's user avatar
1 vote
1 answer
196 views

Will gdisk or sgdisk commands delete my data? (mdadm e-mail alert)

I currently try to fix my mdadm /dev/md0 raid5 partition. I was informed via e-mail notification from mdadm e-mail alerts that there is a fail event and a DegradedArray event. I found this as a ...
befaro's user avatar
  • 13
1 vote
0 answers
1k views

gdisk MBR and GPT damaged

I'm trying to clone my SSD into a bigger one using CloneZilla, but I got a problem saying that my disk contains mismatched gpt and mbr partition. I tried the gdisk command to see what is wrong in ...
Maystro's user avatar
  • 111
0 votes
1 answer
88 views

After switching drive from USB enclosure to internal SATA, disk doesn't show data

On Ubuntu 20.04.4 LTS amd64. I swapped a GPT partition, formatted with GParted with a single LUKS partition while connected with a USB 3.0 enclosure, to an internal SATA connection. After being moved ...
terriblyinept's user avatar
0 votes
1 answer
1k views

Gparted or mkfs corrupting GPT backup header/table

------- Edit -------- This question is not about how to install Ubuntu to a USB drive (I already know how to do that). This question is about why standard utilities are corrupting GPT tables. ------- ...
Tracy's user avatar
  • 427
0 votes
1 answer
345 views

NTFS partition on external drive not automounting (20.10)

After resizing an NTFS partition on an external GPT drive using Gparted the volume doesn't seem to automount on Ubuntu anymore (or other distributions, like OSMC). It has worked fine previously. It ...
Andreas's user avatar
  • 931
0 votes
0 answers
745 views

Corrupted ext4 disk with windows disk manager

I am the main linux person in our team (which is a sad state of affairs), and am trying to fix a problem created by one of our windows users. They had a 5TB drive with a single ~5TB ext4 partition ...
Chris Hall's user avatar
0 votes
0 answers
124 views

Bitlocker windows data partition broken after partition manager apply

I was trying to install ubuntu on my laptop. I tried to move some partitions and extend other ones. One of them was a data partition, that was partitioned using Windows, so it was probably controlled ...
veltres's user avatar
  • 11
1 vote
0 answers
600 views

Restoring a partition table using gdisk output

I seem to have messed up the partition table of my mobile phone, and I was wondering whether I can recreate it from the gdisk output that I still have, using the Ubuntu installation on my laptop. This ...
Pthagonal's user avatar
4 votes
2 answers
8k views

how to truncate a disk image file of unused space without corrupting GPT partition table (end pointer)

Lots of info on taking a image of a disk and shrinking the root (bionic) filesystem partition and then truncating the image to remove the part that became free space. Like https://softwarebakery.com/...
DKebler's user avatar
  • 153
1 vote
1 answer
118 views

Recover data because I wiped out GPT data structure on the wrong disk

I wanted to install ubuntu on dual boot on my computer, but when I was doing the installation, I got "This computer currently has no detected operating systems". The issue is well explain here : http:...
Matthieu Veron's user avatar
1 vote
1 answer
2k views

Cannot mount drive under ubuntu server 18.04

I have upgraded my home server from ubuntu 12.04 to 18.04. The system holds 2 disks of 2.0TB in Raid 1. When I try to mount them on the 18.04 I get the following error. mount -t ntfs /dev/md126 /mnt/...
Jeroen's user avatar
  • 13
1 vote
0 answers
963 views

Possible to rescue SSD that doesn't show any partitions?

I had a laptop SSD suffer water damage. The rest of the laptop appears to work fine, however the SSD, a Kingston SNS8152S3256GG2, seems to have completely failed and the OS won't boot at all, so I am ...
qwr's user avatar
  • 2,852
3 votes
1 answer
959 views

Startup USB drive made with "Startup Disk Creator" is reported to have multiple issue with its GPT

I created a startup USB drive with Startup Disk Creator from 18.04.1 image and successfully used it to install Ubuntu. Then I decided to inspect it with GPT fdisk, and gdisk reported "invalid main ...
Alexey's user avatar
  • 773
1 vote
0 answers
433 views

invalid main GPT header after a memory swap

I'm trying to safely move space from Windows 7/8/10 to Ubuntu (GPT + UEFI Mode) with this tutorial. I tried to edit /etc/fstab to tell it about the new swap and check if there were any changes in the ...
Revolucion for Monica's user avatar
1 vote
0 answers
2k views

Ubuntu 18.04 installer is not showing partitions

I have an HP pavilion workstation, that came with windows 10 preinstalled, and I want to make it a dual boot with Linux. The problem is that even after doing all the following: Disabled secure boot ...
dimisjim's user avatar
  • 293
0 votes
0 answers
3k views

Recovering a GPT damaged partition

Problem: 4TB drive can't be mounted. The drive is visible in GParted and gdisk, but the GPT partition is reported as damaged. Background information: Initially my setup consisted of 2 storage ...
tuskerpi's user avatar
0 votes
1 answer
395 views

Is sudo gdisk sdX dangerous?

I need to install Ubuntu in UEFI mode, but for this thing I need to convert disk to GPT. Will command sudo gdisk X erase all data from HDD? Thanks for answer in advance!
Ervin Ahmedov's user avatar
0 votes
1 answer
49 views

Linux Error Reporting Removable Disk Size

I recently had a strange error while trying to partition removable usb drives. lsblk correctly reported the drive configuration. However when I tried to dd an image to the drive dd error'd, reporting ...
gryphonB's user avatar
  • 139
1 vote
0 answers
705 views

Ubuntu 16.04.3 LTS: UEFI install. Resized GPT partition and now can't boot

Before I did the resize, I had 3 partitions: root@panda1:/mnt1# gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.1 Partition table scan: MBR: protective BSD: not present APM: not present GPT: ...
chiwal's user avatar
  • 21
2 votes
1 answer
9k views

gdisk Warning: Secondary partition table overlaps the last partition by 33 blocks!

I’m going to change MBR to GPT using gdisk but when I type: sudo gdisk /dev/sda I have a warning tell me: Warning! Secondary partition table overlaps the last partition by 33 blocks! You will ...
Arthur Bernardo's user avatar
0 votes
1 answer
2k views

Accidentally created new partition table for boot drive

Yesterday I accidentally created a new (boot) partition with gdisk on my main drive instead of my external drive. However this created a new partition table, but since I am running Kubuntu on this ...
manu at Kubuntu's user avatar
0 votes
0 answers
6k views

Ubuntu 16.04.2 LTS: "The backup GPT table is corrupt, but the primary appears OK, so that will be used." fixed by gdisk yet come back after reboot [duplicate]

I have four drives that I put onto a Ubuntu 16.04.2 LTS. Recently during a fdisk task I saw the warning message "The backup GPT table is corrupt, but the primary appears OK, so that will be used.". I ...
Roy's user avatar
  • 101
0 votes
1 answer
155 views

Linux Ubuntu 16.04 Blank Screen

I have a DELL Inspiran laptop. Recently I had a problem my External Hard Disk is not detected. So I followed the below steps, sudo mount /dev/sdxn /mnt I got a message "GPT table corrupted"...
Sundar's user avatar
  • 101
2 votes
0 answers
612 views

Ubuntu 16 RAID5 running but primary GPT table is corrupt on 3 of 4 drives

RAID5 is operating but GPT has CRC error and/or is corrupt (depending on who give the error message). I have read all of the helps I can find on this and I did what they said and it worked... once ...
Micheal Morrow's user avatar
0 votes
0 answers
1k views

corrupt primary partition, no problem in gdisk

I have just installed ubuntu 16.04 on a macbook pro 7.1. I was having some difficulties, but eventually got it to work. Based on my original difficulties pertaining to the video card (see here: ...
MorrisseyJ's user avatar
1 vote
0 answers
43 views

NTFS mounting problem [duplicate]

I am trying to mount my old windows hdd with ntfs filesystem. The hdd was partitioned in 3 partitions. /dev/sdb1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT /dev/sdb2 ...
Norovis's user avatar
  • 11
2 votes
0 answers
821 views

GPT ext4 partition recovery - invalid backup header

When I run from a LiveCD to try to recover a non-booting system, I run gdisk /dev/sda and get Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header. ...
batflaps's user avatar
  • 121
1 vote
1 answer
899 views

Error message on 5TB Harddisk: Partition 1 does not start on physical sector boundary

I bought a Wester Digital Green 5TB harddisk and have difficulties to format it. fdisk -l shows the following message: WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk ...
Wolfgang's user avatar
0 votes
1 answer
3k views

How can I add msftdata flag to an ext4 partition?

I have moved my partitions around to make room for dualboot, and now Windows 10 is on sda1 and sd2, with my linux install on sda3 (boot) and sda4 (home). I would like to access sda4 from my Windows ...
Kendor's user avatar
  • 4,878
0 votes
1 answer
17k views

gdisk unable to write GPT table

I'm trying to recover a disk which appears to have a corrupt ID for the protective MBR. Yesterday I took a backup of the GPT and protective MBR, and dumped to file. At that time fdisk reported the ...
swedishhh's user avatar
  • 103
16 votes
2 answers
40k views

GDisk Hex Codes

During the use of gdisk, there an option to specify the hex code. I want to know what it is and why it's needed, see below. So for example, if I am creating a software RAID on my drive, I assume I ...
john smith's user avatar
  • 3,043