Securely wiping laptop hard drive with Trisquel CD

2 respuestas [Último envío]
jedenfalco
Desconectado/a
se unió: 09/24/2021

I have a laptop and want to securely wipe the hard drive. Can I wipe the drive (e.g. using dd, shred), without having to remove the hard drive, connect it to another computer and wipe it?

Have thought of booting Trisquel from a CD, and wiping the hard drive that way.

frank14081997
Desconectado/a
se unió: 09/10/2021

Hello. You can do it.
First boot from Trisquel Mini / Trisquel ISO and go to the terminal

# to see the disk ( be carefully )

fdisk -l
df -h

# You will see something like...

/dev/sda 8G
/dev/sdb 200G

# if the disk you want to delete is /dev/sdb. (As root || sudo )

dd if=/dev/urandom of=/dev/sdb &

# Here you will see a PID ( number = Process ID )

renice -n -20 PID

# and you can go for a coffee while you wait

# and if you want, you can do it again

dd if=/dev/zero of=/dev/sdb &

# and you can go for a coffee while you wait

nadebula.1984
Desconectado/a
se unió: 05/01/2018

You'd better do this without disassemble your computer, so the hard disk is connected via (S)ATA, PCI(e) or NVMe interface.

For CMR mechanical hard disk or SMR hard disk (device managed), use dd to zero fill (or random fill) the disk.

# dd bs=8M if=/dev/zero of=/dev/sdX

For SMR mechanical hard disk (host aware or host managed), solid state drive, or SD/TF card, use blkdiscard.

# blkdiscard /dev/device_file

Depending on the utility version, you may need -f parameter. For SATA SSD, the device file is /dev/sdX. For PCIe/NVMe SSD, the device file is /dev/nvmexxxx. For SD/TF cards, the device file is /dev/mmcxxxx (you'll need a PCI/e-based card reader to use blkdiscard).