Hack of the day: remote-reboot

I had to clone a server to another server (1:1 copy using dd+netcat) but didn't want to stay at the customer's place until the task finished. So I executed 'Start ssh; passwd' to be able to login remotely. But how to reboot the server and get rid of the CD so the harddisk system boots instead of the grml-CD without manual interaction at customer's place? Server systems usually don't move in/re-insert an ejected CD on reboot - that's nice for what we need. So all I had to do was:

eject &>/dev/null
umount -l /cdrom
eject /dev/cdrom
echo b > /proc/sysrq-trigger

Trackbacks

    No Trackbacks

Comments

Display comments as (Linear | Threaded)

  1. mihi says:

    I usually configure the machines so that they do not boot from CD automatically but allow to boot from CD using the boot menu (usually F12, depending on the BIOS). And I usually use grml2ram and take the CD with me afterwards. Your hack is nice, but i doubt I'll ever need it. mihi


Add Comment



To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA