-1

Is it possible to issue one command that will both reboot, boot to an external live drive or something similar, and then zero a hard drive?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
user75027
  • 613
  • 2
  • 8
  • 12

1 Answers1

1

Not without some prep work ahead of time.

You've got several things in play here:

  1. Alternate boot
  2. Boot media
  3. Automated wipe
  4. Execute with a single command

Without more details about what your environment I can't say what will work for you. But here's one scenario.

Create some type of live image, either CD, USB or alternate partition. If it's a partition you'll want to make it work like a live read-only image so that it doesn't depend on the fixed drive you're trying to replace. Add your preferred wiping command (e.g., dd) to the boot up scripts. Make sure it's inserted in at all times.

Configure Grub with so that the alternate boot media is available. Make sure it's not default. Write a script that will edit the grub config to switch the destroyer of data to default and immediately reboot. For Linux, echo r > /proc/sysrq-trigger is nice and merciless.

Anytime you're ready to nuke the system, execute that script as root. If you're willing to put in the effort up front, sure you can have a kill switch.

This is obviously very dangerous for your data.

bahamat
  • 38,658
  • 4
  • 70
  • 103