Possible to create unattended ISO that wipes/installs headless server?
Is it possible to configure a headless server without a CD drive to boot from a custom ISO that just wipes the entire system clean and installs Debian netinst using a preseed file?
I'm still learning the details of the boot sequence, so I apologize if my question doesn't make sense. But what I'd like to do is wipe a remote, headless server clean and install a new OS, without physical access. Essentially I'd like to:
1) Create an ISO with a preseed file that formats the entire hard drive and installs command-line Debian netinst with a static network config (interface/
2) Upload this ISO to an old server I'd like to take over
3) Somehow update /boot/menu.lst (or something?) and cause it to boot from this ISO (is this possible?)
4) Reboot the machine, come back an hour later, and SSH in with the canned account to find the server wiped clean and ready for use.
Clearly, there are a lot of exercises left to the reader in there, and that's where I'm asking for help. For example:
a) Should I even be trying to make a custom ISO, or is there a different route? (debtakeover is an option, but I'd really prefer a clean install.) Is there an existing ISO already available that does just this?
b) If I make an ISO, is it even possible to boot it direct off disk without some fancy CD emulation layer?
c) If I do somehow manage to boot the ISO, won't it self-destruct when it tries to format itself off the drive? Can I load the entire ISO into a ramdisk first?
I can't be the first person trying this, and I'm certainly not the most knowledgeable. Other than debtakeover (which seems like a dead project and doesn't really do a clean install) and unetbootin (which appears to require a GUI), what other projects do this? I'm not eager to re-invent the wheel here. What's the best practice for this task?
Thank!
-david
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask David Barrett for more information if necessary.