「Parted」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(ページの作成:「Category:ファイルシステム Category:システムリカバリ en:GNU Parted {{Related articles start}} {{Related|GParted}} {{Related|パーティショ...」)
(相違点なし)

2015年1月26日 (月) 18:58時点における版

関連記事

GNU Parted はパーティションテーブルを作成したり操作するためのプログラムです。GUI フロントエンドとして GParted が存在します。

インストール

公式リポジトリから partedインストールしてください。

使用方法

Parted には2つのモードがあります: コマンドラインモードとインタラクティブモードです。Parted は以下のように実行します:

# parted device

device は編集するハードディスクデバイスに置き換えて下さい (例: /dev/sda)。device を省略すると、parted が編集するデバイスを推測します。

コマンドラインモード

コマンドラインモードでは、1つまたは複数のコマンドを指定します。例:

# parted /dev/sda mklabel gpt mkpart P1 ext3 1MiB 8MiB 
ノート: (--help などの) オプションはコマンドラインでだけ指定することが可能です。

インタラクティブモード

インタラクティブモードでは、コマンドを1つずつ入力し、すぐにディスクに変更が適用されます。例:

(parted) mklabel gpt
(parted) mkpart P1 ext3 1MiB 8MiB 
ヒント: いくつか省略形が存在します。例えば、print の代わりに p と入力したり、units の代わりに u と入力することが可能です。

コマンドにパラメータを指定しなかった場合、Parted はパラメータを尋ねます。例:

(parted) mklabel
New disk label type? gpt

ラウンディング

Since many partitioning systems have complicated constraints, Parted will usually do something slightly different to what you asked. (For example, create a partition starting at 10.352Mb, not 10.4Mb) If the calculated values differ too much, Parted will ask you for confirmation. If you know exactly what you want, or to see exactly what Parted is doing, it helps to specify partition endpoints in sectors (with the "s" suffix) and give the "unit s" command so that the partition endpoints are displayed in sectors.

As of parted-2.4, when you specify start and/or end values using IEC binary units like “MiB”, “GiB”, “TiB”, etc., parted treats those values as exact, and equivalent to the same number specified in bytes (i.e., with the “B” suffix), in that it provides no “helpful” range of sloppiness. Contrast that with a partition start request of “4GB”, which may actually resolve to some sector up to 500MB before or after that point. Thus, when creating a partition, you should prefer to specify units of bytes (“B”), sectors (“s”), or IEC binary units like “MiB”, but not “MB”, “GB”, etc.

ワーニング

Parted will always warn you before doing something that is potentially dangerous, unless the command is one of those that is inherently dangerous (viz., rm, mklabel and mkpart).

アライメント

When creating a partition, parted might warn about improper partition alignment but does not hint about proper alignment. For example:

(parted) mkpart primary fat16 0 32M
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel?                                                     

The warning means the partition start is not aligned. Enter "Ignore" to go ahead anyway, print the partition table in sectors to see where it starts, and remove/recreate the partition with the start sector rounded up to increasing powers of 2 until the warning stops. As one example, on a flash drive with 512B sectors, Parted wanted partitions to start on sectors that were a multiple of 2048, which is 1MB alignment.

参照