One of the effects of introducing Systemd into Debian is that the traditional naming convention for network interfaces has changed. No more is your Ethernet interface called eth0, instead it has a name based on its MAC address.
It’s still possible to use the old naming convention by creating a Systemd configuration file for each interface under /etc/systemd/network/. Each filename should start with a number lower than 99. The default configuration file starts with ’99’, the new config should run before that one.
The system config files can be found in /lib/systemd/network/, and are overlaid on top of the files in /etc/systemd/network/
For example, create the file: /etc/systemd/network/10-eth0.link which contains:
For more info about the options available for the Match and Link sections, see the man page.
Update your initramfs which is used during boot-up to configure your system.
After the next reboot, the Ethernet interface with MAC address 01:02:03:04:05:06 will be called eth0.
USB Ethernet devices
Annoyingly the configuration of USB Ethernet devices is interfered with by udev, so that the above Systemd config file will not have any effect. To prevent this, either delete or comment out the contents of the file /lib/udev/rules.d/73-usb-net-by-mac.rules and restart udev.
The USB Ethernet device will now be named based on the Systemd configuration file above.
I had some difficulty using the MACAddress Match option with my WiFi card, so I instead matched on the basis of card type:
$ cat /etc/systemd/network/10-wlan0.link
DHCP (RFC 2132) allows for vendor specific data to be distributed to clients.
– clients must request Option 43 in their Parameter Request List (Option 55).
– the Vendor Class Identifier (Option 60) sent by the client in the DHCP Request, must match ‘VendorName’ which is used in the ISC DHCP Server configuration below.
Example server configuration section from dhcpd.conf:
option space VendorName;
option VendorName.serviceName code 1 = text;
option local-encapsulation code 43 = encapsulate VendorName;
option VendorName.serviceName "data";
– where VendorName matches the value of the client’s Vendor Class Identifier (Option 60).
– ‘serviceName’ is used only as an internal reference within the DHCP server’s configuration, and must be different for each ‘code’ value.
Up to 256 codes may be used for each Vendor specific configuration. All fields will be returned to the client which matches the Vendor Identifier.
The DHCP server will return the Vendor attributes in the DHCP Response. The data returned is encoded in binary in the following format for each code:
Byte 0: code
Byte 1: length
Byte 2: data
Byte length+2: final data byte
… then follows the next field, starting with code, length, data…
The scenario is that your Enlightenment (e17) desktop has locked up, and your keyboard and mouse appear to be non-responsive. However you do not want to reboot as you will lose all of your open windows.
It is possible to restart the Enlightenment engine without affecting the windows being currently displayed.
Either switch to a TTY (by pressing Ctrl+Alt+F1) or login remotely over ssh, and then execute:
env DISPLAY=:0 enlightenment_remote -restart
Your desktop should have now recovered its pre-locked up state.
(on most setups you can switch back to the desktop from your TTY by pressing Alt+F7)
Platform: Debian Jessie (Testing), Linux 3.16
I have found that under considerable load such as video processing, the Lenovo L420 Thinkpad laptop gets very hot and instantly powers off.
As far as I can make out, the automatic fan speed doesn’t work as well as it should. Therefore when running under high load, it might be wise to force the fan to its highest setting. I should try and make a better fix sometime.
To manually adjust the fan speed, the thinkpad_acpi kernel module must be loaded with an extra option. Create the file /etc/modprobe.d/thinkpad_acpi.conf containing just one line:
options thinkpad_acpi fan_control=1
The fan speed can be set to maximum with the command run as root:
echo “level 7” > /proc/acpi/ibm/fan
and then reset to auto:
echo “level auto” > /proc/acpi/ibm/fan
Read the current status by using:
Note, the reported fan speed appears to be incorrect.
It’s a few simple steps to create GPG encryption keys and use these for signing and encrypting files and emails.
GPG Key Creation
- Create a new pair of public/private cryptographic keys:
user@yourhost:~$ gpg --gen-key
follow the prompts use the defaults if unsure, Enter your name and email address.
- List keys
tom@tomsalmon:~$ gpg --list-keys
pub 1024D/C96ACE6A 2010-03-30 [expires: 2015-03-29]
uid Tom Salmon <email@example.com>
sub 4096g/2BEF6E4A 2010-03-30 [expires: 2015-03-29]
- Upload the Public Key to one of the Key servers
gpg --keyserver hkp://keys.gnupg.net --send-keys C96ACE6A
The key ID is retrieved using the above list keys function.
- Export the Public Key in ASCII
tom@tomsalmon:~$ gpg --export -a C96ACE6A
- Import a Public Key in ASCII format
gpg --import < key.asc
gpg --edit-key C96ACE6A
… run the commands: 'trust', 'sign', 'save', 'quit'
GPG with Email
- Mutt comes with built-in GPG support and integrates perfectly with the system's GPG setup
gpg -r firstname.lastname@example.org -e intheclear.txt
Creates a new file intheclear.txt.gpg which is encrypted with your public key. Only your private key can decrypt this file.
gpg [-d] secret.txt.gpg
(requires that you enter your passphrase) creates the unencrypted file 'secret.txt', if the '-d' flag is used the unencrypted data is displayed on the command line
You may encrypt files for other people if you have imported their Public Key. Only their Private Key will be able to decrypt the file.
- Search the Keyserver:
gpg --keyserver hkp://keys.gnupg.net --search-keys email@example.com
… select the most recent key that matches, find the Key ID
To make life easier, add the following line to your .bashrc file:
alias gpgsearch='gpg --keyserver hkp://keys.gnupg.net --search-keys'
restart your shell, and run 'gpgsearch firstname.lastname@example.org'
- Verify the Key fingerprint with its owner (manually, in person)
gpg --fingerprint KEY_ID
- Set the trust level and sign the key
gpg --edit-key KEY_ID
… run the commands: 'trust', 'sign', 'save', 'quit'
- Upload the signed key to the keyserver
gpg --keyserver hkp://keys.gnupg.net --send-keys KEY_ID
Checking signatures on new keys
- Search the keyserver and download the matching key
- Check to see if the key has been signed by any trusted keys
gpg --check-sigs KEY_ID
- Based on this result, you can determine if the key belongs to the user