parted Flashcards

1
Q

parted

A

parted is a program to manipulate disk partitions. It supports multiple partition table formats, including MS-DOS and GPT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

parted

  • l
  • m
  • s
  • a
A
  • l, –list, Lists partition layout on all block devices.
  • m, –machine, Displays machine parseable output.
  • s, –script, Never prompts for user intervention.
  • a, –align alignment-type, Set alignment for newly created partitions.

Alignment types:

none: Use the minimum alignment.
cylinder: Align partitions to cylinders.
minimal: Use minimum alignment as given by the disk info.
optimal: Use optimum alignment as given by the disk info.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

parted [COMMANDS]

[device]

A

The block device to be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

parted [commands [options]]

align-check type partition

mklabel label-type

mkpart part-type [fs-type] start end

A

align-check type partition

Check if partition satisfies the alignment constraint of type. type must be minimal or optimal.

mklabel label-type

Create a new disklabel (partition table) of label-type. label-type should be on of: aix, amiga, bsd, dvh, gpt, loop, mac, msdos, pc98, sun

mkpart part-type [fs-type] start end

Make a part-type partition for filesystem fs-type (if specified), beginning at start and ending at end (default MB). part-type should be one of primary, logical, or extended.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

parted [command [options]]

name partition name

print

quit

rescue start end

A

name partition name

Set the name of partition to name. This option only works on mac, pc98 and gpt disklabels.

print, Display the partition table.

quit, Exit from parted.

rescue start end

Rescue a lost partition that waas located somewhere between start and end. If a partition is found parted will prompt to create an entry in the partition table for it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

part [command [options]]

resizepart partition end

rm partition

select device

A

resizepart partition end

Change the end position of partition.

rm partition

Delete the partition.

select device

Choose device as the current device to edit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

part [command [options]]

set partition flag state

unit unit

toggle partition flag

A

set partition flag state

Change the state of the flag on partition to state. Supported flags: boot, root, swap, hidden, raid, lvm, lba, legacy_boot, irst, esp, palo

state should be: on, off

unit unit

Set unit as the unit to use when displaying locations and sizes. Unit can be: s(sectors), B(bytes), kB, MB, MiB, GB, GiB, TB, TiB, %, cyl, chs(cylinders, heads, sectors), compact.

toggle partition flag

Toggle the state of flag or partition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly