Wake on lan, no intefaces file?

Hi there,

I’m trying to set up WOL on the rockpi4b using the debian image. I’m following the following guides:
Wake on lan (2013) and Debian wiki Wake on lan (2019).

However, the /etc/network/interfaces file is empty (but refers to interfaces.d), but /etc/network/interfaces.d is a folder without any contents.

So where is the contents for the interfaces (e.g. static ip) file now then ? And how should i configure wake on lan then ? Should i just add in /etc/network/interfaces ? I tried but it didn’t work…

iface eth0 inet dhcp
post-up /sbin/ethtool -s $IFACE wol g
post-down /sbin/ethtool -s $IFACE wol g

I hope anyone can help me, this gets me really confused.

Ubuntu or Debian as with bionic (ubuntu) /etc/network/interfaces is empty as its moved to netplan.

https://netplan.io/

2 Likes

Hi there,

Thanx for the reply! This is the first time I’m seeing this. Weird that the Debian wiki is not updated with that or that there is no reference to netplan in the OS files.

Ill see if i can figure it out now thank you!

Debian should be /etc/network its Ubuntu that is all change wasn’t completely sure which distro as was also confused why you where having those problems.
Aint got it loaded at the moment Debian but will have a look.

I am having a look now and yeap nothing but network-manager seems to be installed

https://developer.gnome.org/NetworkManager/stable/nmcli.html

Try this or google around it

prob something like

rock@rockpi4:~$ nmcli connection
NAME                UUID                                  TYPE            DEVICE
Wired connection 1  902c8686-40be-3bfc-b3f2-54b9062896ea  802-3-ethernet  eth0
docker0             bc1c41ff-9e12-4ed2-b844-c4a438977da0  bridge          docker0

sudo nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic

I am using the https://1drv.ms/u/s!AocmAh35i26QiRoVLn1ttnlorw8g image which is just the 64bit build no customisation but with OMV installed.
sudo systemctl enable resize-helper.service as think I forgot to enable before dd the image

Not sure if wakeonlan will wake a rockpi4 though as to be honest haven’t a clue about shutdown or hibernation states.

sudo apt-get install hibernate
sudo hibernate

Think you have to have a swap

https://www.solarwinds.com/free-tools/wake-on-lan

Make a swap file with at least size of memory

sudo fallocate -l 2G /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2097152
sudo chmod 600 /swapfile
sudo swapon /swapfile

edit fstab so its persistent

sudo nano /etc/fstab
/swapfile swap swap defaults 0 0

wow such a pain
try this
https://ubuntuforums.org/archive/index.php/t-1042946.html
but failing for me, but losing interest :slight_smile:

1 Like

ooff this is a bit above my head.
I’m getting an error on:

sudo swapon /swapfile:
swapon /swapfile: read swap header failed

I’m clueless in this domain, do you have any tips ?

If not, can you please tell me how i can remove the swapfile ?

Thank you

swapoff /swapfile

swapon will just list current swaps

Yeah got a bit complex might have a try one time as never checked if the nmcli connection modify “Wired connection 1” is persistent or not

So this process indicates that the whole process failed ?

Indicates you prob never managed to create the file for swap.

Still don’t know about WoL never got it going but had no prob with the swap file
It got slightly more complex after that and needed testing and prob could of done a script as it is a bit much.
OMV has a wol plugin also but that didn’t work but expecting it might be x86 and slightly thrown by arm