Wiping SSD on HP ProBook?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
bikergeek
Level 1
Level 1
Posts: 9
Joined: Sat Jun 29, 2013 2:36 am

Wiping SSD on HP ProBook?

Post by bikergeek »

I have an HP ProBook 450 G3 laptop that is about 4.5 years old, running Mint 20.2 Uma. I"m considering upgrading, and giving this laptop away to some friends who might need a laptop for one of their kids. Before I give it away, of course, I would like to wipe the SSD in it to eliminate any personal data that might be on it.

At some point, I upgraded the the SSD in it from the stock 256GB to a Crucial 500GB. It's a SATA drive, not NVMe, although it's in an M2 form factor, which is kinda weird. Anyway, I'm trying to work out how to wipe the drive, and apparently it supports the "SANITIZE" feature set rather than the "SECURE ERASE" feature set.

Output of hdparm -I:

Code: Select all

root@laptop:~# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
	Model Number:       CT500MX500SSD4                          
	Serial Number:      XXXXXXXXXXXXXXX        
	Firmware Revision:  M3CR023 
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
	Used: unknown (minor revision code 0x006d) 
	Supported: 10 9 8 7 6 5 
	Likely used: 10
Configuration:
	Logical		max	current
	cylinders	16383	0
	heads		16	0
	sectors/track	63	0
	--
	LBA    user addressable sectors:   268435455
	LBA48  user addressable sectors:   976773168
	Logical  Sector size:                   512 bytes
	Physical Sector size:                   512 bytes
	Logical Sector-0 offset:                  0 bytes
	device size with M = 1024*1024:      476940 MBytes
	device size with M = 1000*1000:      500107 MBytes (500 GB)
	cache/buffer size  = unknown
	Form Factor: unknown (0x0007]
	Nominal Media Rotation Rate: Solid State Device
Capabilities:
	LBA, IORDY(can be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Standard, with device specific minimum
	R/W multiple sector transfer: Max = 1	Current = 1
	Advanced power management level: 128
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   *	SMART feature set
	   *	Power Management feature set
	   *	Write cache
	   *	Look-ahead
	   *	WRITE_BUFFER command
	   *	READ_BUFFER command
	   *	NOP cmd
	   *	DOWNLOAD_MICROCODE
	   *	Advanced Power Management feature set
	   *	48-bit Address feature set
	   *	Mandatory FLUSH_CACHE
	   *	FLUSH_CACHE_EXT
	   *	SMART error logging
	   *	SMART self-test
	   *	General Purpose Logging feature set
	   *	WRITE_{DMA|MULTIPLE}_FUA_EXT
	   *	64-bit World wide name
	   *	WRITE_UNCORRECTABLE_EXT command
	   *	{READ,WRITE}_DMA_EXT_GPL commands
	   *	Segmented DOWNLOAD_MICROCODE
	    	unknown 119[8]
	   *	Gen1 signaling speed (1.5Gb/s)
	   *	Gen2 signaling speed (3.0Gb/s)
	   *	Gen3 signaling speed (6.0Gb/s)
	   *	Native Command Queueing (NCQ)
	   *	Phy event counters
	   *	READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
	   *	DMA Setup Auto-Activate optimization
	   *	Device-initiated interface power management
	   *	Software settings preservation
	    	Device Sleep (DEVSLP)
	   *	SMART Command Transport (SCT) feature set
	   *	SCT Features Control (AC4)
	   *	SCT Data Tables (AC5)
	   *	SANITIZE_ANTIFREEZE_LOCK_EXT command
	   *	SANITIZE feature set
	   *	CRYPTO_SCRAMBLE_EXT command
	   *	BLOCK_ERASE_EXT command
	   *	reserved 69[3]
	   *	reserved 69[4]
	   *	reserved 69[7]
	   *	DOWNLOAD MICROCODE DMA command
	   *	WRITE BUFFER DMA command
	   *	READ BUFFER DMA command
	   *	Data Set Management TRIM supported (limit 8 blocks)
Logical Unit WWN Device Identifier: 500a0751e206cbc3
	NAA		: 5
	IEEE OUI	: 00a075
	Unique ID	: 1e206cbc3
Device Sleep:
	DEVSLP Exit Timeout (DETO): 100 ms (drive)
	Minimum DEVSLP Assertion Time (MDAT): 10 ms (drive)
Checksum: correct
root@laptop:~#
Trying to get the sanitize status of the drive throws a SCSI error:

Code: Select all

root@laptop:~# hdparm --sanitize-status /dev/sda

/dev/sda:
Issuing SANITIZE_STATUS command
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 04 51 40 00 21 04 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Sanitize status:
    State:    SD0 Sanitize Idle
root@laptop:~# 
I also tried this with a sysrescue USB that contained the most recent version of hdparm (9.62 rather than the 9.58 on uma) and got the same results.

So, what gives? How can I wipe the drive on this machine before giving it away?

If all else fails, is there a Windows tool that would do this job? (It came with Windows on it, and a Windows license, and I have install media, and I'm likely going to rebuild this as a Windows machine before I do anything with it anyway.)

Thanks in advance for any help or insight.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13741
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Wiping SSD on HP ProBook?

Post by AndyMH »

Depends on how paranoid you are? Putting a new partition table on the drive would deter most people. But if you really want to wipe it:

Code: Select all

sudo dd if=/dev/zero of=/dev/sda
MAKE SURE sda is the drive you want to wipe. This writes zeros to the whole drive. It will take a long time. It will also reduce the life of the drive.

You can replace /dev/zero with /dev/random to write random bytes instead of zero, you can replace sda with sdaX to wipe a specific partition, replace X with the partition number.

Assuming the drive is your system drive, from the moment you hit enter you have an unbootable PC.

Personally, it's not something I'd do to an SSD.
Last edited by AndyMH on Sun Jul 25, 2021 7:05 am, edited 1 time in total.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Wiping SSD on HP ProBook?

Post by Moonstone Man »

AndyMH wrote: Sun Jul 25, 2021 7:02 am But if you really want to wipe it:

Code: Select all

sudo dd if=/dev/zero of=/dev/sda

NOOOO! Don't do this with an SSD.
User avatar
AndyMH
Level 21
Level 21
Posts: 13741
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Wiping SSD on HP ProBook?

Post by AndyMH »

I just edited as you were posting :D
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Wiping SSD on HP ProBook?

Post by Moonstone Man »

bikergeek wrote: Sat Jul 24, 2021 11:00 pm ... I would like to wipe the SSD in it to eliminate any personal data that might be on it.
https://www.thomas-krenn.com/en/wiki/Pe ... cure_Erase

Please, whatever you do, don't run dd on it.
User avatar
Pierre
Level 21
Level 21
Posts: 13223
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Wiping SSD on HP ProBook?

Post by Pierre »

AndyMH wrote: Sun Jul 25, 2021 7:02 am Depends on how paranoid you are? Putting a new partition table on the drive would deter most people.
that is all that you really need to do with that SSD. . .
& then redo the Installation of the required operating system.

- - recovering from an Partition & Format .. is above the PayGrade of most PCs users.
:arrow:
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
bikergeek
Level 1
Level 1
Posts: 9
Joined: Sat Jun 29, 2013 2:36 am

Re: Wiping SSD on HP ProBook?

Post by bikergeek »

Pierre wrote: Sun Jul 25, 2021 7:09 am
AndyMH wrote: Sun Jul 25, 2021 7:02 am Depends on how paranoid you are? Putting a new partition table on the drive would deter most people.
- - recovering from an Partition & Format .. is above the PayGrade of most PCs users.
I know my friends' kids. They're very bright and have a lot of time on their hands. :lol:
User avatar
AndyMH
Level 21
Level 21
Posts: 13741
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Wiping SSD on HP ProBook?

Post by AndyMH »

bikergeek wrote: Sun Jul 25, 2021 2:56 pm I know my friends' kids. They're very bright and have a lot of time on their hands. :lol:
Then give them something to distract - hey kids, look a brand new operating system, it's not windows! Get them early.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Petermint
Level 9
Level 9
Posts: 2983
Joined: Tue Feb 16, 2016 3:12 am

Re: Wiping SSD on HP ProBook?

Post by Petermint »

A good SSD can survive 3000 writes per cell and medium ones a 1000 writes. For a 3000 write per cell devices, a complete erase of the whole disk is removing one day from their ten year life. The cheaper ones, less than a week.

If you cannot secure erase, you can allocate one big partition then run trim. The disk will mark all the sectors for the erase cycle, and possibly perform the erase, without a write, which will make the disk extra fast for the next user.

The same if you decide to mint a new machine for them. At the end of the installation, run trim and leave the disk on for a while so the controller can perform the erase.
Locked

Return to “Storage”