diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2024-02-19 09:31:40 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-02-20 11:47:31 +0100 |
commit | 7dd66e63d887f15565434218f768df22cfd31182 (patch) | |
tree | 9d4dc324eba09f0bba1ae9e02ee8796d9838c8c1 /include | |
parent | bdc3cb54dc802f13404cd16cc0acb32b49b011ae (diff) | |
download | barebox-7dd66e63d887f15565434218f768df22cfd31182.tar.gz barebox-7dd66e63d887f15565434218f768df22cfd31182.tar.xz |
commands: add parted
This adds a parted command which behaves pretty much like the GNU parted
program. Unlike other partition manipulation programs parted has a quite
convenient command line API suitable for scripting. The tool supports
these commands:
print - print a partition table
mklabel - create a new partition table
rm - remove a partition
mkpart - create a partition
unit - change input/display units
refresh - refresh a partition table (barebox specific)
Multiple commands can be given on a single call so that a full partition
table including partitions can be created with a single command.
Examples include:
Print a partition table:
$ parted mmc0 print
create a new partition table:
$ parted mmc0 mklabel gpt
create a new partition table and add a partition beginning at offset
1MiB ending at offset 128MiB:
$ parted mmc0 mklabel gpt mkpart rootfs ext4 1MiB 128MiB
The same, using KiB as unit and printing the result at the end:
$ parted mmc0 unit KiB mklabel gpt mkpart rootfs ext4 1024 131072 print
The "refresh" command is barebox specific and is useful when for example
the alternate GPT is missing. This happens when an image is written.
Link: https://lore.barebox.org/20240219083140.2713047-13-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions