0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux][command] パーティション管理_fdisk, gdisk, parted

Last updated at Posted at 2025-02-02

パーティションとは

  • HDD(またはSSD)は「パーティション」と呼ばれる論理的な空間に分割して利用する
  • ディスク全体をひとつの領域とする場合にも、全容量を割り当てたひとつのパーティションを作る必要がある

パーティション管理とは

  • ハードディスク全体のパーティションの情報をパーティションテーブルと呼ぶ
  • パーティションテーブルの管理方式は従来のMBR(Master Boot Record)と新しいGPT(GUID Partition Table)の2種類がある

MBRの特徴

  • 基本パーティション:4個
  • 容量:2.2TB
  • パーティション操作:fdiskコマンド、partedコマンド
  • 起動用システムファームウェア:BIOS
  • ブートローダー:GRUB Legacy, GRUB 2

GPTの特徴

  • 基本パーティション:128個
  • 容量:9.4ZB(9.4x1000x1000x1000TB)
  • パーティション操作:gdiskコマンド、partedコマンド
  • 起動用システムファームウェア:UEFI
  • ブートローダー:GRUB Legacy, GRUB 2

fdisk/gdiskコマンド

$ fdisk/gdisk デバイス名
$ Command (m for help): l
// 使用可能なパーティションタイプの一覧を表示

$ Command (m for help): n
// 新しいパーティションを作成
サブコマンド 英語の由来 説明
l list partition types 使用可能なパーティションタイプの一覧を表示
n new partition 新しいパーティションを作成
d delete partition 既存のパーティションを削除
p print partition table 現在のパーティションテーブルを表示
t type パーティションのタイプを変更
a active bootable flag MBRパーティションをブート可能に設定(fdisk のみ)
w write changes 変更をディスクに書き込む
q quit 変更を保存せずに終了
m menu (help) ヘルプメニューを表示

Ping-t

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?