==================================================
parted
MBR (Master Boot Record) と GPT (GUID Partition Table) の両形式に対応した、パーティションの作成や削除
MBR:最大サイズ 2TB のパーティションを管理する方式
GPT:最大サイズ 8.5ZB のパーティションを管理する方式
OS が 64bit で、パーティーションの分割が 4 つ以上
書式:partedデバイス名 [−sサブコマンド]:
| mklabel [gpt | msdos] | 新しいパーティションテーブルを作成。 |
mkpart 種類 開始 終了 | 指定した種類のパーティションを作成 |
| パーティション情報を表示する | |
| quit | partedを終了する |
| rm パーティション番号 | 指定した番号のパーティションを削除する |
| help | 利用できるコマンドを表示する |
* mklabelで使用するラベル。大抵の場合 ”gpt”, “msdos” を使用。
| label | detail |
|---|---|
aix | IBM’s AIX (which introduced what we now know as LVM); |
amiga | Amiga’s RDB partitioning scheme; |
bsd | BSD disk labels; |
dvh | SGI disk volume headers; |
gpt | GUID partition tables; |
mac | old (pre-GPT) Apple partition tables; |
msdos | DOS-style MBR partition tables; |
pc98 | PC-98 partition tables; |
sun | Sun’s partitioning scheme; |
loop | raw disk access (loopback-style) |
* mkpart で使用するType。
fs-type :xfs、ext2、ext3、ext4、fat16、fat32、hfs、hfs+、linux-swap、ntfs、 reiserfs。
使用例
対話モード開始: sudo parted /dev/sda
parted内の作業
ディスクラベルを作成: (parted) mklabel gpt
パーティションを作成: (parted) mkpart primary ext4 0% 50%
パーティションを確認: (parted) print
対話モードを終了: (parted) quit
==================================================