I’m selling my 2008-era MacBook Pro to a friend, but still want to wipe (as securely as possible) the HDD before passing it on.
I was initially quite worried that a Linux Live CD USB image (hereafter referred to as USB image, because I’m lazy and don’t know the proper terminology) wouldn’t boot due to the EFI BIOS-type thing that Macs have (it’s an Intel).
It turns out I was semi-correct - the Mac would recognise the USB stick as an EFI device, and would get to the USB boot loader, but the first attempt with a Linux Mint image didn’t boot at all - just a blank screen for the 10 minutes or so that I left it.
The second attempt (after some Googling) was to try the compatibility mode option on the USB boot screen. This worked in that some text was displayed, but ultimately didn’t boot to a shell or GUI.
The third attempt was to retry the compatibility mode but to edit the boot line
(press e) and append nomodeset --
to the boot line (removing the --
already
there). This worked and launched me into a shell, which is perfectly fine as far
as I’m concerned.
Next up, I needed to erase the HDD in a fairly secure fashion. There’s loads of
blog posts, forum threads and so on with various methods (the most common probably
being some variation of dd if=/dev/zero of=/dev/sda
), but I thought it’d be a
good opportunity to use something different (to me, at least) - enter shred
.
Shred is really simple - sudo shred -vfz /dev/sda
will overwrite the drive
3 times (by default, unless -n
is specified) with random data (from /dev/urandom
)
with a final pass of zeros to cover up (or attempt to) the shredding process. The
-v
flag is verbose, as you probably guessed, and -f
sets appropriate permissions
where needed to carry out the wiping process.
Shred hasn’t finished yet so I can’t say how long it’ll take, but I’m guessing anywhere from a few hours to a day. Update: It took around 4 hours to finish, which is faster than I imagined!