如何使用安全清除,它是否在安装CD上?


虽然这是一个很棒的功能,大多数现代硬盘都支持,但并不是所有平台都支持。有时候是控制器(或逻辑寻址)的问题,对于某些平台,BIOS不支持(或阻止)'SecureErase'命令(以防止恶意使用)。请参考:http://cmrr.ucsd.edu/people/Hughes/HDDEraseReadMe.txt - david6
使用它的另一个好处是告诉现代固态硬盘的固件,当前存在于磁盘上的数据不再需要。这可以提高性能。 - Marius Gedminas
@LiveWireBT 用户没有提到他/她使用的是固态硬盘。 - Richard
@Richard 他/她问的是如何运行ATA安全擦除,解决方案也是一样的。在SSD和HDD上执行ATA安全擦除的区别可能只是完成过程所需的时间不同。 - LiveWireBT
1个回答

安全擦除是ATA标准的一部分,由标准版的hdparm程序支持:

  ATA Security Feature Set

   These switches are DANGEROUS to experiment with, and might not work with some kernels.  USE AT YOUR OWN RISK.

   --security-help
          Display terse usage info for all of the --security-* options.

   --security-freeze
          Freeze the drive´s security settings.  The drive does not accept any security commands until  next  power-on  reset.
          Use this function in combination with --security-unlock to protect drive from any attempt to set a new password. Can
          be used standalone, too.  No other options are permitted on the command line with this one.

   --security-unlock PWD
          Unlock the drive, using password PWD.  Password is given as an ASCII string and is padded  with  NULs  to  reach  32
          bytes.   The  applicable  drive password is selected with the --user-master switch (default is "user" password).  No
          other options are permitted on the command line with this one.

   --security-set-pass PWD
          Lock the drive, using password PWD (Set Password) (DANGEROUS).  Password is given as an ASCII string and  is  padded
          with NULs to reach 32 bytes.  Use the special password NULL to set an empty password.  The applicable drive password
          is selected with the --user-master switch (default is "user" password) and the applicable  security  mode  with  the
          --security-mode switch.  No other options are permitted on the command line with this one.

   --security-disable PWD
          Disable drive locking, using password PWD.  Password is given as an ASCII string and is padded with NULs to reach 32
          bytes.  The applicable drive password is selected with the --user-master switch (default is  "user"  password).   No
          other options are permitted on the command line with this one.

   --security-erase PWD
          Erase  (locked) drive, using password PWD (DANGEROUS).  Password is given as an ASCII string and is padded with NULs
          to reach 32 bytes.  Use the special password NULL to represent an empty password.  The applicable drive password  is
          selected  with the --user-master switch (default is "user" password).  No other options are permitted on the command
          line with this one.

   --security-erase-enhanced PWD
          Enhanced erase (locked) drive, using password PWD (DANGEROUS).  Password is given as an ASCII string and  is  padded
          with  NULs  to  reach 32 bytes.  The applicable drive password is selected with the --user-master switch (default is
          "user" password).  No other options are permitted on the command line with this one.

   --user-master USER
          Specifies which password (user/master) to select.  Defaults to user  password.   Only  useful  in  combination  with
          --security-unlock, --security-set-pass, --security-disable, --security-erase or --security-erase-enhanced.
                  u       user password
                  m       master password

   --security-mode MODE
          Specifies which security mode (high/maximum) to set.  Defaults to high.  Only useful in combination with --security-
          set-pass.
                  h       high security
                  m       maximum security

          THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
由于明显的原因,我没有测试过这些选项,你需要自己看看它们是否有效 :)

也许值得更新你的回答,只包含正确的建议,以便将来寻找答案的人受益。 - James Henstridge
对于旋转硬盘来说,通常比 dd 更快,但并不是差距很大。对于固态硬盘来说,通常几乎是即时的。 - psusi
这有很多选择。有人知道-security-erase--security-erase-enhanced之间的区别吗?在主要目的是减少内部碎片化而不是擦除敏感数据的情况下,哪个更适合用于SSD? - Marius Gedminas
在内核维基上有一个关于使用hdparm进行安全擦除的逐步教程。 - Marius Gedminas