Score:2

How to make Wake on Lan persistent in Debian buster?

es flag
J C

I am on Debian 10 buster. Output of sudo ifconfig -a is

enp0s7: flags=xxxx<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.xx.xxx  netmask 255.255.xxx.x  broadcast 192.168.xx.xxx
        inet6 xxxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx  prefixlen xx  scopeid 0x0<global>
        inet6 xxxx::xxxx:xxxx:xxxx:xxxx  prefixlen xx  scopeid 0x20<link>
        inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx  prefixlen xx  scopeid 0x0<global>
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 68866  bytes 72160614 (68.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33033  bytes 5158947 (4.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4  bytes 240 (240.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 240 (240.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

output of cat cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

I tried to add only a line like /sbin/ethtool -s enp0s7 wol g in above file. But wake on lan still shows d after reboot.

output before

Settings for enp0s7:
    Supported ports: [ MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: g
    Wake-on: d
    Link detected: yes

output after sudo /sbin/ethtool -s enp0s7 wol g

Settings for enp0s7:
    Supported ports: [ MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: g
    Wake-on: g
    Link detected: yes

I enabled wake on lan(wake on pcie) in bios.
I think I need to add more lines in /etc/network/interfaces to make it work. Suggest a fix.

in flag
Your `interfaces` file only contains the loopback interface. Do you have more in the interfaces.d directory?
Score:0
cn flag

You have to create a service dedicated to enable your WOL at startup :

$ cat /etc/systemd/system/wol.service
[Unit]
Description=Configure Wake-up on LAN

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s eth0 wol g

[Install]
WantedBy=basic.target

Then enabling the service with :

sudo systemctl enable wol.service
sudo systemctl daemon-reload

And finally, reboot the machine or server and check configuration with sudo ethtool eth0

Source : French documentation of Debian WOL

Score:0
ru flag

cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

I tried to add only a line like /sbin/ethtool -s enp0s7 wol g in above file.

Instead of adding above line. Add this:

ethernet-wol g
Score:-1
fj flag

In order to make Wake on Lan persistent in Debian buster, you need to edit the configuration file and change the line containing “1”.

gb flag
Which configuration file?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.