mieki256's diary



2016/06/05() [n年前の日記]

#1 [ubuntu][pc] 元サブPCをWOLで起動できるように設定

元サブPCを、WOL(Wake On Lan)で起動できるように設定した。

WOLてのは、LANを使って遠隔操作してPCの電源を入れることができる機能。マジックパケットてのをLANに流すと、該当するPCが、「あ。起きろって言ってる。俺、起きなきゃ」と電源ONになる、みたいな感じらしい。

まあ、元サブPCは足元に置いてあるので、手で電源スイッチを押せばええやんって状態なのだけど。ケースの電源スイッチが妙に固い個体なので、あまり押したくないというか…。もちろん、誤操作する可能性を考えると、固いほうが良かったりもするのだけど。ちょっと触っただけで反応しちゃうのもちょっと。

M/BのBIOS設定を変更。 :

積んである M/B は、 _ASRock M3A785GMH/128M 。ASRock製M/BでWOLを使いたい場合は、BIOS設定で PCI Device Power On を有効にするらしい。

_ASRock > サポートとサービス > よくあるご質問と回答
Q : I'm using an add-on LAN card on my ASRock motherboard. The LAN card provides a "Wake On LAN" connector with a cable. Is there a connector on the motherboard so that I can plug this cable? (12/12/2003)

A : There's no need to connect this cable to the motherboard and you are still able to use the "Wake On LAN" feature with the add-on LAN card. To use it, please remember to enable the "PCI Device Power On" option in BIOS.

Q : How could I use Wake on LAN function? (7/9/2003)

A : All of ASRock motherboards support Wake on LAN. Please enable the "PCI Device Power On" in the Power menu of BIOS. After saving the changes and exit the BIOS, please boot into the Windows OS then shut down the system. Now, the system is ready to be woken up through LAN by other computers.

ASRock > サポートとサービス > よくあるご質問と回答 より

英語はさっぱり分からんけど、その項目を enable にしなしゃんせ、と言ってるっぽい気がする。たぶん。

ちなみに、BIOS設定画面は、電源投入直後にF2キーかDELキーを叩いてれば入れる。

ethtoolをインストール。 :

インストールしてあるOSは、Ubuntu 14.04 LTS。WOLが有効かどうかを調べるには、ethtool とやらを使うらしい。

_Wake On Lanで遠隔PCの起動 - adragoonaの日記
_Ubuntu サーバの初期設定 Wake-on-LAN: プログラマの歩き方

sudo apt-get install ethtool
sudo ethtool eth0
Wake On:g と表示されてたらWOLが有効になってる。今回は、有効になってた。

有効になってない場合は、sudo ethtool eth0 -s wol g と打ち込めば有効にできる。だけど、このままだと再起動した時に元に戻ってしまうので、OS起動時に設定し直すようにする。

設定するためのファイルを作成。
sudo vi /etc/init.d/wakeonlanconfig

以下の内容を記述。
#!/bin/bash
ethtool -s eth0 wol g
exit

実行権限を設定、かつ、OS起動時に実行されるようにする。
$ sudo chmod 755 /etc/init.d/wakeonlanconfig
$ sudo update-rc.d -f wakeonlanconfig defaults

OSを再起動して、sudo ethtool eth0 で状態を確認。WOLが有効になってた。

Windowsから起こしてみる。 :

Windows10 x64上から、元サブPCを起こしてみる。 _Wake on LAN for Windows を使って、元サブPCのMACアドレス等を指定。マジックパケットを送ってみた。

電源が入った。上手くいってるみたい。

以上です。

過去ログ表示

Prev - 2016/06 - Next
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30

カテゴリで表示

検索機能は Namazu for hns で提供されています。(詳細指定/ヘルプ


注意: 現在使用の日記自動生成システムは Version 2.19.6 です。
公開されている日記自動生成システムは Version 2.19.5 です。

Powered by hns-2.19.6, HyperNikkiSystem Project