セキュアErase

想定環境

目的

コマンド実行

camcontrol security da0 -U user -e パスワード コマンドの実行でバッチリだ!(嘘)

# camcontrol security da0 -U user -e パスワード
pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers
camcontrol: Can't secure erase (security is disabled)

実はこれを実行する前に、以下のコマンドを実行してセキュアEraseできるか確認する。

camcontrol security da0

たとえば SanDisk Extreme Pro SSD(SDSSDXPS-240G)の場合、以下の結果が得られる。

pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers

Security Option           Value
supported                 yes
enabled                   no
drive locked              no
security config frozen    no
count expired             no
security level            high
enhanced erase supported  yes
erase time                2 min
enhanced erase time       18 min
master password rev       fffd

上記結果から「enabled no」であることが確認できる。 実はこのままでは、セキュアEraseでは実施できず、以下のコマンドで「enabled yes」に変更する必要がある。

# camcontrol security da0 -U user -s パスワード
pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers
Issuing SECURITY_SET_PASSWORD password='パスワード', user='user', mode='high'

この結果、以下のように変わる。

pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers

Security Option           Value
supported                 yes
enabled                   yes
drive locked              no
security config frozen    no
count expired             no
security level            high
enhanced erase supported  yes
erase time                2 min
enhanced erase time       18 min
master password rev       fffd

上記状態で再度実行すると、以下のように成功する。

# camcontrol security da0 -U user -e パスワード
pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers
Issuing SECURITY_ERASE_PREPARE
Issuing SECURITY_ERASE_UNIT password='パスワード', user='user'

Erase Complete

つまりコマンド実行

-s オプションと -e オプションは同時に指定できるので、セキュアEraseするのに躊躇ないなら、以下のように実行できる。

# camcontrol security da0 -U user -s パスワード -e パスワード
pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers

You are about to ERASE ALL DATA from the following device:
pass0,da0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device

Are you SURE you want to ERASE ALL DATA? (yes/no) yes
Issuing SECURITY_SET_PASSWORD password='パスワード', user='user', mode='high'
Issuing SECURITY_ERASE_PREPARE
Issuing SECURITY_ERASE_UNIT password='パスワード', user='user'

Erase Complete

見てのように「yes」「no」を聞いてくるので、確認不要なら「-y」オプションを合わせて付けてやる。

# camcontrol security da0 -U user -s パスワード -e パスワード -y
pass0: <SanDisk SDSSDXPS240G X21200RL> ACS-2 ATA SATA 3.x device
pass0: 400.000MB/s transfers
Issuing SECURITY_SET_PASSWORD password='パスワード', user='user', mode='high'
Issuing SECURITY_ERASE_PREPARE
Issuing SECURITY_ERASE_UNIT password='パスワード', user='user'

Erase Complete

よくある質問とその答え

Q.パスワードは何を設定すればいいですか?

A.結論を言えばてきとー。 A.SanDisk曰く「sandisk123」が設定されてる。他のベンダーは?「不明」。

Q.パスワード毎回設定するなら覚えなくていいのでは?

A.大丈夫だ。問題無い・・・わけでもなく、正常に処理された場合は覚えておかなくてもなんとかなるけど、 処理に失敗した場合は回復処理が必要なので、その時パスワードが必要。

参考文献