Archive for category linux

Linux networking/ip notes

Networking can be a pain, and in linux there are several config files that I must remember where they are and what they do. Note Ubuntu is a bit different.

For various configuration like hostname, gateway, and/or the type of protocol to use.
The below is a summary of possible field and their values, thanks to this faq

NETWORKING=answer, where answer is yes or no -Configure networking or not to configure networking.
FORWARD_IPV4=answer, where answer is yes or no -Perform IP forwarding or not to perform IP forwarding.
HOSTNAME=hostname, where hostname is the hostname of your server.
GATEWAY=gwip, where gwip is the IP address of the remote network gateway -if available.
GATEWAYDEV=gwdev, where gwdev is the device name eth# you use to access the remote gateway.

an example network file can be


This file contains the configuration for a specific network device (in our case it is ifcfg-eth0)

DEVICE=devicename, where devicename is the name of the physical network device.
IPADDR=ipaddr, where ipaddr is the IP address.
NETMASK=netmask, where netmask is the netmask IP value.
NETWORK=network, where network is the network IP address.
BROADCAST=broadcast, where broadcast is the broadcast IP address.
ONBOOT=answer, where answer is yes or no. Do the interface need to be active or inactive at boot time.
BOOTPROTO=proto, where proto is one of the following :
none - No boot-time protocol should be used.
bootp - The bootp now pump protocol should be used.
dhcp - The dhcp protocol should be used.
USERCTL=answer, where answer is one of the following:
yes - Non-root users are allowed to control this device.
no - Only the super-user root is allowed to control this device.

an example network-script file can be


Contains information on the dns that this machine is using
An example file would be

;the name server that the resolver should query.

A special note on the search parameter; it is the list of domains that we will search by default. for example if we nslookup on svn, it will actually lookup for if we didn’t have the search rule below, it would just search for svn and give a not found response.

Leave a comment

Ubuntu 10.10 Checking battery state…

A few days ago I had to reinstall by ubuntu on my T-400. After the re installation, it required me to upgrade my video driver using a proprietary software. After I restarted my computer, the machine gets stuck at the boot stage, displaying the message “Checking battery state….”

I attempted at searching on Google for ways to remedy this my problem, but no luck. I was frustrated and figured that I might be able to figure something out if I had a terminal. I went to tty1 by pressing ctrl + alt + F1, I then removed my graphics configuration by issuing the following command
sudo rm /etc/X11/xorg.conf
I then issued a reboot
sudo reboot
and everything was fine and I could login into my machine normally.