0
1

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でのUSBメモリフォーマット

Posted at

LinuxでのUSBメモリフォーマット

1.マウントポイント・デバイスファイル名の確認

lsblk -f

2.パーティショニング

gdisk /dev/{デバイスファイル名}

USBメモリをパーティショニングする際のHex codeは0700(Microsoft basic data)となる。

Command (? for help): o(新しいGPTパーティションテーブル作成)
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): n(パーティションテーブルに新しいパーティション追加)
Partition number (1-128, default 1):  (デフォルト値)
First sector (34-500118158, default = 2048) or {+-}size{KMGTP}: (デフォルト値)
Last sector (2048-500118158, default = 15826910) or {+-}size{KMGTP}: (デフォルト値)
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): 0700(Microsoft basic dataのHex codeを入力)
Changed type of partition to 'Microsoft basic data'

Command (? for help): w(ディスクにパーティションテーブル書込)

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdd.
The operation has completed successfully.

3.フォーマット

mkfs.vfat を使う。

コマンドオプション
-v:進捗を表示
-c:不良ブロックの精査を行う
-F: FATサイズを指定。基本32
-n:ボリューム名(ラベル)を指定
mkfs.vfat -v -c -F 32 -n USBDEV /dev/sdd1 
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?