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?

DDコマンドで焼く時はsyncする

Last updated at Posted at 2024-02-19

dd実行後、syncしないでSDカードを抜いたりすると、中途半端に焼かれた状態になる。
従ってsyncして、同期が終わるまで待つ必要がある。

  • 例1) dd後、sync実行
$ sudo dd if=/dev/zero of=/dev/sde bs=1M conv=sync
$ sync

conv=syncの意味は以下。I/O同期ではないので注意

各入力ブロックを「ibs=」で指定したサイズになるまでNULL文字で埋める(blockまたはunblockと一緒に指定した場合、NULL文字ではなくスペースで埋める)

  • 例2)ddのiflag,oflagでsync指定
$ sudo dd if=/dev/zero of=/dev/sde iflag=sync oflag=sync bs=1M conv=sync
  • 例3)conf=fsyncをつける
$ sudo dd if=/dev/zero of=/dev/sde bs=1M conv=fsync

conv=fsyncの意味は以下。

ファイルに対してディスクへの書き出しを保証

参考

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?