Overall, SSDs are designed smartly with advanced technology and algorithms. If you use a standard tool, it can damage the SSD and consequently reduce its lifecycle. You can only write to an SSD number of times like other types of flash memory, which shows an issue if you want to erase or wipe the solid-state drive clean too often. Overall, SSD is one of the best upgrades you can make to your system, as they are the best in terms of cost, space, speed, and higher capacity. Full stepsĪ solid-state drive, also popularly known as SSD, is a widely used storage device on computers. Step 1: Press the Windows+S keys now type the Windows Terminal on the search bar. If you're selling or giving your computer away the CORRECT way to empty the drive is to zero or randomize it with dd and never, ever use shred, as filesystem journals will effectively restore shredded files with no effort at all.Step 1. Shred is NOT a reliable tool for securely wiping a drive. This has given it the nickname "disk destroyer." This could be disastrous if you accidentally use dd on a system drive, which will not only make it unbootable, but may irreversibly corrupt any given partition on the drive. Also, BIG WARNING on dd, make sure you are using it on the correct device or you'll at least PARTIALLY wipe the wrong disk. It WILL take a while, but unlike shred it will completely and IRREVERSIBLY wipe a hard disk from MBR to final sector. If you want to securely wipe a disk, you gotta use dd on the drive's main device node (For example: /dev/sdc instead of /dev/sdc1) while nothing is mounted on it. Not to mention shred is completely useless for completely blanking or randomizing a disk, as it only works on individual files or sets of files (On the filesystem level, not a raw data level.). As is resierfs and Reiser4 as well as many MANY other common Linux filesystems.). Shred's own man page says it's effectively useless on journaled filesystems, which Ubuntu is almost guaranteed to be using if you don't change its filesystem defaults (ext3 and ext4 are journaled. Those recommending to use shred are giving bad advice. Issuing the Secure Erase/Format/Sanitize command on a drive connected via USB or a SAS/RAID card could potentially brick the drive! ![]() From now on the following CAUTION will be applicable.ĬAUTION: Do not proceed with this if the target drive is not connected directly to a SATA/NVMe interface. echo $(($(df -output=size -B1 /dev/sda | tail -1)/4096))įor NVMe or SATA SSD, read on. To calculate count=, you can use the following command. Please note that you need to use count= otherwise you will get dd: error writing '/dev/sdX': No space left on device Or, sudo dd if=/dev/random of=/dev/sdX bs=4096 count=2013054 status=progress Or, sudo dd if=/dev/urandom of=/dev/sdX bs=4096 count=2013054 status=progress sudo dd if=/dev/zero of=/dev/sdX bs=4096 count=2013054 status=progress In case of HDD, you can use the following commands. Beware that some parts of your disk will not be erased - use the drive firmware "SECURE ERASE" command, such as via hdparm, to properly clean off a disk.ĬAUTION: Don't zero-fill an SSD, ever.Read the manpage for shred online or by typing man shred in the terminal.Apply the changes by click the Apply button (the green checkmark) in the toolbar. Then add a single partition that uses all of the unallocated space on the device, choosing fat32 as the file system. Then select Device -> Create partition table to create a partition table on the device. ![]() The easiest way is to install GParted and use it: sudo apt-get install gpartedĬhoose your device in the upper-right corner list. sudo shred -v -n1 -z /dev/sdXĪfter this, you would have to repartition the device. You can also set all bits to zero after the last iteration by adding the option -z, I prefer to do this. This might take a while, depending on the size of your external hard drive (I think it takes twenty minutes or so for my 4 GB flash drive). ![]() You can add the option -n N to only do this N times, to save time on large capacity devices. This will overwrite all the blocks on the device with random data three times, the -v flag is for verbose and will print the current progress. Then run the following, replacing /dev/sdX with the name of your device: sudo shred -v /dev/sdX Unmount all currently mounted partitions on that device, if any. Make sure it is the correct device, picking the wrong device will wipe it. ![]() You can use sudo fdisk -l to list all connected storage devices, and find your external hard drive there. This might be something like /dev/sdb or /dev/hdb (but not like /dev/sdb1, that's a partition). There's a command-line utility called shred, which overwrites data in a file or a whole device with random bits, making it nearly impossible to recover.įirst of all, you need to identify the name of the device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |