The article I referred to did not suit my environment, so I wrote a memo for the future
1: BIOS settings ・ Enable WoL
2: OS settings ・ Install ethtool
$ sudo apt install ethtool
-Check the NIC name with ifconfig ・ Check the WoL status
$ sudo ethtool enp2s0 | grep Wake-on:
Supports Wake-on: pumbg
Wake-on: d
Wake-on: d if disabled
・ Activate
$ sudo ethtool -s enp2s0 wol g
·reconfirmation
$ sudo ethtool enp2s0 | grep Wake-on:
Supports Wake-on: pumbg
Wake-on: g
Wake-on: Confirm that it is g I enabled WoL with a command, but when I restart it, it returns to the original, so set automatic execution
3: Autorun setting
$ sudo sh -c "echo '#! /bin/sh
### BEGIN INIT INFO
# Provides: wakeonlan
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: wakeonlan
### END INIT INFO
sudo ethtool -s enp2s0 wol g
exit' > /etc/init.d/wakeonlan"
sudo chmod +x /etc/init.d/wakeonlan
sudo update-rc.d wakeonlan defaults
・ Check if automation settings have been made
$ ls -l /etc/rc*.d/*wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc2.d/S01wakeonlan -> ../init.d/wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc3.d/S01wakeonlan -> ../init.d/wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc4.d/S01wakeonlan -> ../init.d/wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc5.d/S01wakeonlan -> ../init.d/wakeonlan
If you can do so far, restart and if you can confirm that it is Wake-on: g, it is completed For sending magic packets, use "Wake On LAN for Windows Ver3.01" from Windows. From iOS, use an app called "Wolow", details are omitted
Recommended Posts