The gdisk command in Linux is similar to fdisk and allows you to manipulate and create partitions. It was specially created to handle GPT partitions.
It automatically converts the Master Boot Record (MBR) to the new format called Globally Unique Identifier Partition Table (GPT).
This new partition allocation table scheme was created to work with the new EFI and UEFI motherboard firmwares. Windows XP 32-bit and earlier versions of Windows cannot normally read or write to drives formatted with a GUID partition table, however, Windows Vista and Windows 7 and Windows 8 have this capability.
This new standard uses logical block addressing (LBA) instead of the old cylinder-head-sector addressing. This addressing system does not have the limitation of placing the boot loader within the first 1024 cylinders.
The gdisk menus, although with more options, are very similar to that of fdisk. The gdisk options are:
In this example, a GPT-type partition was created on the /dev/xvdb disk. If nothing is entered at the interactive prompt, it will assume the default options:
# gdisk /dev/xvdb
GPT fdisk (gdisk) version 0.8.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-16777182, default = 2048) or {+-} size {KMGTP}:
Last sector (2048-16777182, default = 16777182) or {+-} size {KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): And
OK; writing new GUID partition table (GPT) to /dev/xvdb.
The operation has been successfully completed.
The sudo command on Linux executes a given command as if it were another user.…
The ss command on Linux is extremely useful for investigating sockets, providing various information about…
Free Linux command shows the amount of total memory in use and available, as well…
The shell has structures for testing conditions and executing certain program sequences several times (loop),…
The /etc/fstab file stores the configuration of which devices should be mounted and what is…
The Netcat Command in Linux or nc is a utility used to do “almost anything”…
This website uses cookies.