cgpt(1)

cgpt1

Utility to manipulate gpt partitions with chromium os extensions

Usage

cgpt COMMAND [OPTIONS] DRIVE

Overview

Cgpt is a tool to manipulate a GUID Partition Table from the command line. Although several other utilities exist for the same basic purpose - some with more features and a captive user interface - cgpt is unique in that it also supports Chromium OS extensions. These extensions are not generally useful; they are specific to the u-boot firmware found on some Chromebooks. They may be used to change priority for kernel partitions and give other hints to u-boot Chromebook firmware. Use this utility only to manipulate a partition table for compatible Chromebooks.

Commands

Each action performed by this program - with the notable exception of the -h OPTION - is initiated by a command which tells cgpt the type of operation to perform. All available commands are described below.

create

Create or reset GPT headers and tables.

add

Add, edit, or remove a partition entry.

show

Show the partition table and entries.

repair

Repair damaged GPT headers and tables.

boot

Edit the PMBR sector for legacy BIOSes.

If no BOOT OPTIONS are specified, this command will just print the PMBR boot GUID.

find

Find a partition by its GUID.

If no DRIVE is specified, this command will scan all physical drives for a match.

prioritize

Reorder the priority of all ChromeOS kernel partitions.

If no options are specified, this command will set the lowest active kernel to priority 1 while maintaining the original order.

legacy

Switch between GPT and Legacy GPT.

Options

The options described in this section apply to every COMMAND supported by this program.

-h

For more detailed usage, use cgpt COMMAND -h

Examples

The following examples demonstrate valid syntax only. It is up to you to interpret them based on the documentation in this manual.

cgpt show /dev/mmcblk0
cgpt create /dev/mmcblk0
cgpt add -i 2 -S 1 -T 15 -P 15 /dev/mmcblk0
cgpt add -i 1 -t data -l "STATE" /dev/mmcblk0
cgpt add -i 2 -t kernel -l "KERN-A" /dev/mmcblk0
cgpt add -i 3 -t rootfs -l "ROOT-A" /dev/mmcblk0

Releases

6 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9–13

-h since Debian 9 (Stretch).

Author

This manual page was written by Karl Lenz <[email protected]> for the Debian project (but may be used by others).

From cgpt 0~R106-15054.B+dfsg-0.1 in Debian 13 (Trixie). Parsed by carta from the page's man source.