網管技術
實作Ubuntu遠端開機 (Wake on Lan)
https://wiki.debian.org/WakeOnLan
觸動者(電腦A) -----------> 被遠端開啟的電腦(電腦B)
一、被遠端開啟的電腦(電腦B):
1. 重新開機,並進到BIOS設定
2. 把Wake On Land / Wake On PCI(E)設為Enable
3. 儲存並進入Ubuntu畫面
4. sudo apt-get install ethtool
5. sudo ethtool -s eth0 wol g (eth? ?依該電腦網卡編號而定,可用ifconfig確認)
6. nano /etc/rc.local
新增以下2行:
sleep 5
ethtool -s eth0 wol g
7. nano /etc/init.d/halt
NETDOWN = no
8. 查詢電腦網卡號碼(MAC)
ifconfig
HWaddr 之後顯示的就是網卡號碼
9.pico /etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.0
gateway 10.0.0.138
up ethtool -s eth0 wol g
二、觸動者(電腦A):
1. sudo apt-get install wakeonlan
2. wakeonlan 電腦B的網卡號碼,例如:
wakeonlan 00:11:22:33:44:55:66
proxmox: wakeonlan 44:87:fc:70:1e:df
proxmox2: wakeonlan 44:87:fc:70:20:0e
proxmox3: wakeonlan 44:87:fc:70:18:6f
fs : wakeonlan 44:87:fc:43:8e:4d