自旧的SSD死后,我才收到新的SSD。此Intel 320 SSD支持TRIM。为了进行测试,我的经销商在其上安装了Windows,但我想摆脱它并在其上安装Kubuntu。
不必进行“安全擦除”,我只需要以最健康的方式清空磁盘即可。我相信dd if=/dev/zero of=/dev/sda
只是用零填充块,从而进行另一次写(如果我错了,请纠正我)。
我已经看到了如何启用TRIM的答案,但它似乎适合清除空白块,而不是擦除磁盘。
hdparm
似乎是执行此操作的程序,但是我不确定是否清除磁盘或清除空块。从其手册页:
--trim-sector-ranges For Solid State Drives (SSDs). EXCEPTIONALLY DANGEROUS. DO NOT USE THIS OPTION!! Tells the drive firmware to discard unneeded data sectors, destroying any data that may have been present within them. This makes those sectors available for immediate use by the firmware's garbage collection mechanism, to improve scheduling for wear-leveling of the flash media. This option expects one or more sector range pairs immediately after the option: an LBA starting address, a colon, and a sector count, with no intervening spaces. EXCEPTIONALLY DANGEROUS. DO NOT USE THIS OPTION!!
E.g. hdparm --trim-sector-ranges 1000:4 7894:16 /dev/sdz
如何使用TRIM使所有块显示为空?
sudo dd if=/dev/sda iflag=direct bs=512 skip=<some_sectors> count=32 | hexdump -C
,然后使用最新的Gparted版本删除NTFS 分区,然后使用相同的命令重新检查-如果数据被擦除,您只会看到零。
hexdump -C /sda1
并hexdump -C /sda1
确定了起始块。不过好主意。