How would you remotely wipe a linux system so that on the next boot it will not attempt to boot from the hard drive, instead it will prefer booting from the network?
Reasoning
I am setting up an environment where servers will pxe boot. I have one working example, however it installs the OS to the drive. When I want to run another test, I need to walk over to the machine, restart it, and boot off of a live disk and format the drive. On the next boot it will attempt to network boot again.
What I've tried
I am able to ssh to the machine, and have tried the following:
- fdisk
- rm -rf / --no-preserve-root
Both fail because the device is in use. I've tried to unmount the device with no luck.
- umount /dev/sda
Is there a way to remotely make a machine unbootable so I can more quickly test pxe configs?