Other Wiping hard disk using FreeBSD boot pendrive

Hello, I have an old and partially damaged (screen is flickering) Windows notebook that I simply want to give to recycling, but first I would like to wipe/shred the hard disk completely.

Please advice, what is the best way to achieve it using FreeBSD boot pendrive?

My best idea is to simply install clean FreeBSD with ZFS on the whole disk, encrypt it, then put password on BIOS as well, and that's it.

But maybe there are some simple console commands that I can use while booting that would help me to actually destroy the hard disk content, not just put it behind passwords?
 
… ZFS on the whole disk, encrypt it, …

Encryption will affect areas of the disk to which ZFS writes after the action. The action alone will not encrypt pre-existing data.

using FreeBSD boot pendrive

If the internal hard disk is at ada0 (zero), then you could run one or both of the following:
  • dd if=/dev/zero of=/dev/ada0 bs=1m
  • dd if=/dev/random of=/dev/ada0 bs=1m
Proceed with caution, with regard to the device and number. (Don't accidentally overwrite part of the wrong device.)

I don't know about block sizes.


<https://superuser.com/questions/446...hould-not-be-recoverable#comment517891_446649>
 
If the internal hard disk is at ada0 (zero), then you could run one or both of the following:
  • dd if=/dev/zero of=/dev/ada0 bs=1m
  • dd if=/dev/random of=/dev/ada0 bs=1m

If you use /dev/zero then after it's finished you can double-check there's nothing but zeroes left on the disk with:

dd if=/dev/ada0 bs=1m | hd

which should only show the first and last lines of zeroes, with a single '*' line between.

Then, if even more paranoid, rerun the first with /dev/random.

Proceed with caution, with regard to the device and number. (Don't accidentally overwrite part of the wrong device.)

I don't know about block sizes.

bs=1m should be fine.

I caution against referring to linux dd documents though. There are subtle differences, particularly around the various *sync options, that have confused some punters.

dd(8) is definitive and thorough.
 
Check out security/bcwipe.

What I've done in the past is remove the hard drive/SSD. If it's not an M.2 soldered onto the MB, i.e. it's a 2.5 in form factor HD or SSD, remove it and install it in a USB enclosure. You can purchase these anywhere. I've done this many times. Old disks that outlive their laptops make excellent long term storage devices. Old hard disks don't deteriorate or hardly deteriorate when infrequently used. They're great for archives of old photos, old CVS archives and old SVN archives. I scanned old slides and prints my dad took when I was a boy and put them on a couple of archive disks. You always want two or more for old photos. Just in case one happens to lose its magnetic flux.

I wouldn't trust old SSDs unless they're used on occasion. The occasional power supplied to SSDs helps them "remember".
 
security/bcwipe … remove it and install it in a USB enclosure. …

If the intention is to reuse an HDD (good idea), I'd test it before removal. Amongst many possible approaches:
  • boot from Ultimate Boot CD (UBCD) on a USB drive, then run an HDAT2 routine to non-destructively stress-test the drive, or overwrite the data – either way, bad blocks may be revealed
  • use GSmartControl (also on UBCD) to perform a S.M.A.R.T. extended self-test – read-only, so it's far less likely to reveal the type of error that may occur through writing.
The first of the two screenshots at <https://forums.freebsd.org/threads/benchmark-stress-test-toolset.81941/#post-530069> shows the Wipe device menu in HDAT2. Useful, but not as thorough security-oriented as what's suggested by cy@.

bcwipe(1)

Cue: a heated debate about secure erasure of solid-state media ;-)

HTH
 
Thank you so much for these great advice. Especially I appreciate yours, cy@. Haven't thought about converting the old disk to an external backup drive. Long live recycling. :)
 
What some sites, mostly government sites, do is to have the device destroyed. Some drill holes into old disk drives while others shred them.
 
Some drill holes into old disk drives while others shred them.

We have a large hammer and a concrete floor (beneath the carpet), my colleague wields the hammer whilst I enter the words Archibald Buttle into a succession of ill-fitting systems.

Only one part of that statement is untrue. Welcome to my world.
 
If the intention is to reuse an HDD (good idea), I'd test it before removal. Amongst many possible approaches:
  • boot from Ultimate Boot CD (UBCD) on a USB drive, then run an HDAT2 routine to non-destructively stress-test the drive, or overwrite the data – either way, bad blocks may be revealed
  • use GSmartControl (also on UBCD) to perform a S.M.A.R.T. extended self-test – read-only, so it's far less likely to reveal the type of error that may occur through writing.

Indeed, and also the quick and readily to hand dd(8) /EXAMPLES :

Check that a disk drive contains no bad blocks:
dd if=/dev/ada0 of=/dev/null bs=1m

Do a refresh of a disk drive, in order to prevent presently recoverable read errors from progressing into unrecoverable read errors:
dd if=/dev/ada0 of=/dev/ada0 bs=1m

Reminiscing from what cy@ said about recycling older HDDs, as opposed to SSDs ... a friend had some Windows boot issue, took it to her friendly local dealer who fitted a new HDD and restored her backups.

Where's the old drive? said I. She had to go back and ask for it. I ran both the above dds in that order, scoring a perfect 250GB drive, Seagate I recall, put in a USB 3 enclosure.

Cue: a heated debate about secure erasure of solid-state media ;-)

Pass <&^}=
 

It's a gem! Not on a FreeBSD boot pendrive, but still, a gem. Thanks.

Alternative link, ports specific: srm(1)

(<https://man.freebsd.org/cgi/man.cgi?query=srm&sektion=1&manpath=freebsd-release> not found.)

Code:
% pkg provides srm.1.gz
Name    : srm-1.2.15
Comment : Secure rm, a utility which destroys file contents before unlinking
Repo    : FreeBSD
Filename: usr/local/man/man1/srm.1.gz

Name    : secure_delete-3.1_1
Comment : Secure data deletion toolkit
Repo    : FreeBSD
Filename: usr/local/man/man1/srm.1.gz
%

security/srm or security/secure_delete
 
Back
Top