0

I am selling my old laptop and I do not want my data to be recoverable with recovery tools.

I found this post How to wipe a hard disk completely so that no data recovery tools can retrieve anything? explaining that the shred command can do that.

I am just wondering on what partitions and in which order should I use this.

Here is the output of fdisk -l:

fdisk -l
Disk /dev/mmcblk0: 29.1 GiB, 31272730624 bytes, 61079552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: someidentifier

Device           Start      End  Sectors  Size Type
/dev/mmcblk0p1    2048  1050623  1048576  512M EFI System
/dev/mmcblk0p2 1050624  2050047   999424  488M Linux filesystem
/dev/mmcblk0p3 2050048 61077503 59027456 28.2G Linux filesystem




Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/mmcblk0p3_crypt: 28.1 GiB, 30219960320 bytes, 59023360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ubuntu--vg-root: 26.2 GiB, 28143779840 bytes, 54968320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ubuntu--vg-swap_1: 1.9 GiB, 2051014656 bytes, 4005888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Thank you

7
  • is this your disk you're running on or are you on an external disk or liveusb or something? Shredding the active OS is a no-no usually
    – Thomas Ward
    Jun 24, 2017 at 23:39
  • What kind of drive is it? A memory card? Is it an encrypted drive (LVM with encryption)? If a an encrypted drive you need not worry much, unless you provide the password/passphrase ;-) It should be enough to overwrite the first gigabyte with zeros to make it look clean and after that install a standard Ubuntu operating system, for example Ubuntu 16.04.1 LTS (without encryption) as a demo. - Please check, that what you describe in the question is really the drive you want to wipe!
    – sudodus
    Jun 24, 2017 at 23:43
  • @Thomas, yes the fdisk -l was run on the actual laptop that I wanna shred. I guess there is a way to do this from ubuntu installation usb by choosing try ubuntu.
    – Karim Mtl
    Jun 25, 2017 at 2:00
  • @sudodos, you are right I am using ubuntu 16.04 and I choose during installation the encryption option (LVM with encryption). and yes I run fdisk -l on the laptop whoose drive I want to shred.
    – Karim Mtl
    Jun 25, 2017 at 2:02
  • Well, there should be no confidential information in the unencrypted two first partitions, but you can shred them anyway if you wish, just to make things look chean. The encrypted third partition should need no shredding, unless your password is too simple and can be guessed. The encrypted data appear like 'already shredded'. And yes, boot from your Ubuntu installation USB drive, 'Try Ubuntu', and do the 'house-cleaning'. Finally, it might be a good idea to install a standard Ubuntu operating system, for example Ubuntu 16.04.1 LTS (without encryption) as a demo.
    – sudodus
    Jun 25, 2017 at 8:20

1 Answer 1

1

You are taking the wrong approach. If you want to clean up your data from the disk, shred the whole disk, not individual partitions.

The slack space could contain sensitive data, moreover its way easier to do it this way than remembering to shred all the partitions.

Also remember to do it from a live USB and ensure no other drives are connected so that you do not wipe them accidentally.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .