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][system] パーティションとファイルシステムの作成プロセス

Posted at

HDDのパーティションとファイルシステムの作成プロセス

HDDのパーティションとファイルシステムの作成プロセス詳細

1. HDDをパーティション分割

  • fdisk(MBR)gdisk(GPT)またはpartedを使用

2. ファイルシステムを作成(フォーマット)

  • mkfs.ext4(Linux用)
  • mkfs.xfs(XFS(CentOS等)ファイルシステム用)
  • mkfs.vfat(FAT32, USB用)

3. パーティションをマウント

  • mountコマンドで一時的にマウント
  • /etc/fstabを編集し永続的にマウント

4. スワップ領域の作成

  • mkswap /dev/sdX を使用し、スワップ領域をフォーマット
  • swapon -s で現在のスワップ領域を確認

5. スワップ領域の有効化

  • swapon /dev/sdX でスワップ領域を有効化
  • /etc/fstab にエントリを追加して再起動後も有効化

6. スワップ領域の無効化

  • swapoff /dev/sdX で特定のスワップ領域を無効化
  • swapoff -a で全スワップ領域を無効化
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?