Debian Tips

From odroid US
Jump to: navigation, search

How to set Static IP address

From Gibojoe. Sometime you do not have a DHCP server to assign an IP Address. Sometimes you just want your board to come up with the same IP Address no matter what. You need to make sure to allocate a subnet-unique address.

For a static IP edit to /etc/network/interface to:

allow-hotplug eth0
iface eth0 inet static

How to set the hostname

From scheich. Propably you want to change the hostname of your odroid. For this you have to adjust the following files.

(a static IP address is needed)

$hostname e.g. superfastodroidserver

$domainname e.g.

/etc/hosts       localhost.localdomain  $hostname.$domainname $hostname



Afterwards you should get the fully qualified domain name with the following command.

hostname -a

How to Point to apt-cacher

Install apt-cacher-ng on a host. It will cache Debian packages you fetch while working on the target. You need to set up the apt-cacher host on the target. This example points to a host running apt-cacher-ng with IP Address on port 3142

# This is for apt-cacher-ng
cat <<EOF_MARK >>/etc/apt/apt.conf
Acquire::http { Proxy ""; };

How to Setup Wifi

Here is a reference link:

You need to have a network driver. These are usually available on the target as a kernel module. To see if your wireless network interface driver is installed, do this:

ls /sys/class/net     

eth0 ip6tnl0 lo sit0 wlan0

wlan0 is my wireless device. It is the standard offering from Hardkernel. Listing the USB devices shows: (apt-get install usbutils)


... Bus 001 Device 005: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter

Now we need some tools:

apt-get install wireless-tools wpasupplicant

The wireless tools include: iwconfig, iwlist, iwspy, iwpriv, and ifrename. Running iwconfig shows information about the wireless devices it found:

wlan0     Scan completed :
          Cell 01 - Address: 74:44:01:7A:0F:80
                    Protocol:IEEE 802.11bgn
                    Frequency:2.422 GHz (Channel 3)
                    Encryption key:on
                    Bit Rates:300 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD7A0050F20xxxxxxxxxxxxxxxxxxxx
                    Signal level=34/100  

I want to connect to ko-network2, not the five others I can see... I want WPA2 security. Set up the configuration in /etc/network/interfaces, something like this:

auto wlan0 
iface wlan0 inet dhcp
        wpa-ssid ko-network2
        wpa-psk mysecretpassphrase

Bring the network up:

ifup wlan0

Here is an example wpa_supplicant.conf file:

cat >wpa_supplicant.conf <<EOF


Remove Unwanted Packages

(Thanks to neagix)

You DO need to have saved a selection file for the point you want to roll back to. Look in /root directory on your target to see if a selection set was saved.

You can save a selection set like this:

dpkg --get-selections > selections-7-6-13.txt
# Remove all unwanted packages
apt-get install dselect
dpkg --clear-selections
dpkg --set-selections < /root/original-dpkg-selections.txt
apt-get update
apt-get -u dselect-upgrade

Get rtl8192cu WiFi Firmware

This work with HK linux-

# Paste this into a terminal session to create a script to fetch firmware for rtl8192cu
cat << EOF > fetch-firmware
sudo mkdir /lib/firmware/rtlwifi/ >/dev/null 2>&1
sudo mv rtl8192cufw.bin /lib/firmware/rtlwifi >/dev/null 2>&1

# Run the script
chmod oag+x fetch-firmware

# Re-install the module(s)
rmmod rtl8192cu
modprobe rtl8192cu

# check for wlan0
ls /sys/class/net

fix locales

Re: Announce to new forum: Debian Wheezy

Postby littleguy » Fri Apr 05, 2013 5:51 pm

It seems the locales package is missing in base 6.1

For that reason some applications would misbehave when reading files containing special characters.

Here is how to fix it:
apt-get install locales
dpkg-reconfigure locales


Set it as the default locale (next prompt)

Reboot and you're set! :)