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

Questions tagged [gdisk]

Questions about GPT fdisk (aka gdisk), the text-mode interactive program for creation and manipulation of partition tables. For scripting with gdisk see sgdisk.

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

Error Formatting Disk - Drive Missing

So I had a somewhat faulty HDD (missed partition table) and plugged it in my linux in the SATA port. It was only showing as /dev/sda , no /sda1 whatsoever. In order to reformat its partition table I ...
Yuri Teixeira Mendes's user avatar
0 votes
0 answers
57 views

Problems after migrating drives to HBA-connected disk shelf

I had 4 drives (2x3TB, 1x4TB, 1x18TB) in USB SATA docks connected to my proliant server. I finally got my HBA to recognize my IBM disk array, and managed to get the drives recognized in Ubuntu server ...
Devin Gardner's user avatar
2 votes
1 answer
713 views

KDE Partition Manager not seeing full disk size after cloning Windows 10 (UEFI) to larger SSD: how to move the secondary GPT table?

(Solved. See below) After having cloned a SSD to a larger one, I want to move the Recovery partition at the end of the clone, and then expand the Windows partition to benefit from the additional ...
OuzoPower's user avatar
  • 241
2 votes
0 answers
150 views

Recover data from deleted (still intact) raid 5

So through a shell script gone sideways I accidentally deleted my mdadm raid5 (3 HDDs) and the partitions from the disks (so disks still connected according to lsblk as {sdb|sdc|sdd}). I have not ...
50x's user avatar
  • 21
3 votes
3 answers
2k views

Optimal partition sizes with Gparted and Gdisk

I am trying to chop a 4TB (4,000,225,165,312 bytes) drive up into even partitions of 1TB. I want these partitions to be further dividable to at least 1^3 Byte (~1GB) (1000000000) partitions. Okay, so ...
alchemy's user avatar
  • 637
0 votes
1 answer
552 views

How to mount a sparsed disk image

I have an image of the mSATA SSD disk of a PC. The disk contains the operating system and has a capacity of 512GB. I do not have that free storage, so I have cloned the disk into an image with dd ...
Fco Javier Balón's user avatar
0 votes
0 answers
58 views

Recovering data from a drive on which a partition table has been created

I have 2 drives on my computer, and was running out of space in one due to 2 OS on the one with smaller capacity. I was trying to partition the larger one(which has data on it), and looking up ...
OhMuzGawd's user avatar
0 votes
1 answer
1k views

Does gdisk partition and format it with xfs?

Using CentOS 8.5 I tried this on a new disk with no data or partition tables. GPT fdisk (gdisk) version 1.0.3 Partition table scan: MBR: not present BSD: not present APM: not present GPT: not ...
Cruise5's user avatar
  • 496
1 vote
1 answer
288 views

sas drive i/o error 5 via raid card - sed locked partition table

I am trying to find a better way to access my newly purchased SAS drives (deepdiscountserver 3tb IBM platters(used or refurb i think yes)), using a 2x4 LSI PCIe3 card. I think the card is only half ...
Brian Thomas's user avatar
0 votes
1 answer
84 views

Will I lose all mounts and symbolic links if I resize partitions with gdisk in Linux/Android?

I have a rooted Android tablet running Termux terminal. The device has 32gb built-in storage. 6gb is partitioned for "Internal Storage" and is used for apps/games/documents and such. 23gb is ...
silencedogood's user avatar
1 vote
2 answers
682 views

Why does resizing my raid to “max” cause a GPT error and is this dangerous?

I have replaced all my 2TB disks in my raid(6) with 4TB mdadm --grow /dev/md0 --size=max and fdisk reports the following error: The backup GPT table is corrupt, but the primary appears OK, so that ...
Camion's user avatar
  • 284
0 votes
1 answer
5k views

Unable to open device '/dev/sdb' for writing! Errno is 30! Aborting write!

1st set of commands Using these commands with GDISK: > sudo gdisk /dev/sdb o n w I get: Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to ...
Megidd's user avatar
  • 1,559
1 vote
0 answers
2k views

setting partition type in non-interactive parted command

I have a new disk in Linux (Centos): # fdisk -l /dev/sdb Disk /dev/sdb: 536 MB, 536870912 bytes, 1048576 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 ...
Chris's user avatar
  • 4,151
1 vote
1 answer
277 views

Recover partition table from running system and encrypted disk

I've made a small mistake, I've removed my boot partition by mistake. Using testdisk I was able to recover the boot partition without problem but I either misused it or did not understand and only ...
Kiwy's user avatar
  • 9,575
2 votes
1 answer
1k views

script to gdisk to create a new partition

I'm trying to script to gdisk to create a new partition of LVM type (for pvcreate) so I typed this but I does not work : diskModelName=yourDiskModel diskSerialNumber=yourDiskSerialNumber ...
SebMa's user avatar
  • 2,179
6 votes
3 answers
11k views

unable to dd, smartmon, fdisk or anything on a working external Western Digital Hard Drive

I bought a WD HD on Amazon used because I wanted one that was exactly like another that I hosed. I can't do anything with the HD. The drive is definitely /dev/sdb, but it also mounts /dev/sr0 ~$ lsblk ...
geneorama's user avatar
  • 161
2 votes
1 answer
3k views

Repository or documentation for gdisk error codes?

I've thoroughly read through the gdisk man page and the author's walkthrough found here http://www.rodsbooks.com/gdisk/walkthrough.html I'm wondering if there is a repository of error codes out ...
Robert Houghton's user avatar
1 vote
1 answer
1k views

How to determine sizes using sgdisk partitioning in bash script

I'm using sgdisk in a bash script similar to this: sgdisk --clear /dev/vda --set-alignment=1 --new 1:34:2047 --typecode 1:EF02 -c 1:"grub" -g /dev/vda sgdisk --new 2:2048:16779263 --typecode 2:8300 -...
BugBuddy's user avatar
  • 648
3 votes
1 answer
7k views

Wrong sector size in NVMe

I bought a new NVMe SSD (SB-ROCKET-256) and installed Arch using gdisk for partioning. In theory, this SSD doesn't support 512e and I think the physical size should be 4096, am I wrong? How do I set ...
David Lilue's user avatar
1 vote
1 answer
930 views

disk partitioning gui RHEL CentOS 7

question: should it be /dev/sdb that is mounted or /dev/sdb1 that is mounted when dealing with disks other than your operating system disk? My issue is that with the Utilities - Disks from the ...
ron's user avatar
  • 6,797
2 votes
1 answer
5k views

ddrescue: Unaligned read error. Is sector size correct?

I'm trying to use GNU ddrescue to recover raw data from a failing SSD. System is Debian Stretch. Thus far, I have this info out of it: dmesg [Sun Sep 8 15:04:20 2019] sd 7:0:0:0: [sdd] 468862128 ...
Vlastimil Burián's user avatar
4 votes
1 answer
1k views

gdisk, make a non-permanent fix to a corrupted GPT table

My laptop is unable to boot. So, I run Ubuntu 18.04 live from a bootable USB. It didn't automatically mount the 500 GB hard disk /dev/sda, which uses GPT. lsblk shows only the disk, not the ...
BowPark's user avatar
  • 4,925
3 votes
1 answer
14k views

Change disk type from Microsoft Basic to Linux filesystem

I'm not clear where this is coming from and although it seems cosmetic I would like to change my disk type from Microsoft Basic to Linux filesystem WARNING: fdisk GPT support is currently new, ...
user avatar
3 votes
2 answers
3k views

Partitioning and formatting a 4k-emulated (512e) HDD

I just plugged into USB A 3.0 / C 3.1 my new external HDD to Debian Buster system. The disk was sold as LaCie 2.5" Porsche Design P'9227 2TB USB-C. Here is the output of fdisk -l /dev/sdc: Disk /...
Vlastimil Burián's user avatar
9 votes
1 answer
7k views

Script to gdisk /dev/sdX and enter expert commands: x, z, y, y - how?

I am creating my first Arch Linux install script, and I want to automate the base installation as in the archwiki or you can find the same instructions but easier to read here: https://www....
Spacecow's user avatar
  • 203
1 vote
0 answers
3k views

Using gdisk on drive with valid MBR and corrupt GPT

All: I ran ddrescue from a 1.5 TB input (corrupted) Windows external drive that was formatted NTFS to a 8 TB (uncorrupted) Western digital external drive that was formatted ext4. The 8 TB drive was ...
user584936's user avatar
1 vote
1 answer
881 views

How to re-order partitions safely? Safe to use gdisk 'sort' option? Edit fstab + grub.cfg necessary?

I have a system that used to have 3 different Linux flavours running. I no longer wanted one of them so I moved and expanded with gparted and all is well, except I now have /sda3, /sda4, /sda7, /sda8 -...
Fiddy Bux's user avatar
  • 221
2 votes
1 answer
887 views

linux gdisk (on 4TB USB drive) followed my mkfs -- but mkfs doesn't see new partitions

I just bought two new 4TB external USB disks for backups http://www.bestbuy.com/site/wd-my-passport-4tb-external-usb-3-0-portable-hard-drive-black/5605533.p that came performatted with a single ...
John Forkosh's user avatar
3 votes
2 answers
8k views

Resize partition table using gdisk

I want to change my partition table (using openWRT Linux OS) due to a new flash memory card - 1GB instead of 256MB. For this, I've installed gdisk tool, and ran it using 'gdisk /dev/mmcblk0' command. ...
dear_tzvi's user avatar
  • 209
11 votes
3 answers
31k views

Remove all traces of GPT disk label

I've got an USB pen drive and I'd like to turn it into a bootable MBR device. However, at some point in its history, that device had a GPT on it, and I can't seem to get rid of that. Even after I ran ...
MvG's user avatar
  • 4,411
3 votes
1 answer
2k views

Recover partitions Mac OS internal HD

I booted to a live Ubuntu USB, wanting to delete partitions on an SD card, and ended up deleting all my partitions on my MacBook Pro's internal HD. I have already tried gpart (which gets stuck at &...
user3490458's user avatar
5 votes
2 answers
1k views

Changing HFSPlus UUID from PartedMagic

I needed to make a clone of my hard drive recently (bad blocks FTW). I was using Clonezilla at the time. However, Clonezilla refused to copy the HFS+ partition, so I did it manually. The problem is ...
Kaz Wolfe's user avatar
  • 485
8 votes
3 answers
26k views

Getting the extra GPT info; a "fdisk -l" equivalent

What is the equivalent for GPT using HDDs of: # fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info I got this from https://wiki.archlinux.org/index.php/disk_cloning (under "Create disk image") for ...
ConfusedStack's user avatar
13 votes
4 answers
11k views

How to renumber GPT partitions on an umounted disk?

I tried to sort (renumber) partitions on /dev/sdb via terminal, using gdisk from the operating system (running on /dev/sda) and none of the sdb partitions mounted but the only option I get is [-l] ...
BillV's user avatar
  • 141
3 votes
2 answers
10k views

GPT "Type device filename, or press <Enter> to exit?

I am attempting to install Arch Linux (for the hundredth time) and I recently ran across another problem. I am trying to find a list of my partitions. In order to do this I entergdisk When I do this ...
Griffin's user avatar
  • 509
39 votes
5 answers
174k views

Remove GPT - Default back to MBR

I keep receiving this error: Warning!! Unsupported GPT (GUID Partition Table) detected. Use GNU Parted I want to go back to the normal MBR. I found some advice here and did: parted /dev/sda ...
sayth's user avatar
  • 579