Monday, January 25, 2010

Installing a Second PCI Ethernet Device

Bought a PCI Ethernet device to install into my PC so that I can use it as a Proxy/NAT server. The model that I bought is a TP-LINK 10/100M PCI Network Adapter (TF-3239DL). I opened up my box and installed it into the white PCI slots in the mainboard. I fired up the system and checked ifconfig but don't see the new ethernet adapter there. 


Went back to the networking page of www.aboutdebian.com, as I had trouble getting the new PCI ethernet card to work. Using lspci | grep -i ethernet shows that linux has detected the new PCI card. I had to install a program modconf to help install a new device driver (modules in linux). After installing the modules, network configuration settings needed to be entered in the /etc/network/interfaces file.

after this is done & rebooting the system, ifconfig will show the new PCI card.


Tuesday, January 12, 2010

Installing Debian Lenny (D4)

Reading through the networking page took quite a long time as they covered a lot of material there. It was more information than steps for you to set-up the networking in Debian. They pointed to other tutorials that covers setting up a Proxy Server etc.

They referred to a program called "mtr" that is similar to traceroute, however it wasn't installed on my system and a search on apt-cache came up empty. So I searched online and found that there is such a program, just that my package sources in source.list was not set-up to find it.

Thus I added these lines in the source.list file and then it worked:


deb http://http.us.debian.org/debian/ lenny main
deb-src http://http.us.debian.org/debian/ lenny main
That's all for now, signing off 


Monday, January 11, 2010

Installing Debian Lenny (D3)

Using Packages  


Started with a new tutorial in www.aboutdebian.com called Using Packages.

The goal was to learn various ways to install packages, to get to use the X-Server GUI, configuring the apt-utilities to get packages information off the net and also to set-up an auto update.

Things started off wrongly in the beginning where they wanted me to run dselect. I tried but the command prompt kept saying telling me there's no such command. Apparently dselect wasn't installed when I installed the OS, so I used apt-get to install dselect and no problems there after.

Went through the tutorial which touched on the basics of using dselect to browse and install programs, and there are many programs available. Next I used apt-cache to search for a particular program so that we could install wu_ftpd using apt-get. Lastly  I learnt how to create a bash script for the cron scheduler to run at predetermined times. This script was used to automate the update of the system regularly.

That marked the end of that tutorial.

Signing off


Sunday, January 10, 2010

Installing Debian Lenny (D2)

Continued from where I left off. 

I realised on Day 1 that the optical drive on my system is a CD Writer, and not a DVD Drive. This is a problem as I had initially downloaded the DVD iso for Debian Lenny and burnt them into DVDs. After realising the error, I went to download the CD versions and although it was kind of expected (1 DVD = 6 CDs), I was shocked to find out that there are 31 CDs to download and burn. But I downloaded them anyway.

After burning the first disk, I proceeded to install Debian following the instructions in Day 1 until step 14. In step 15, I was supposed to use apt-cdrom to index all the packages that were in the CDs, which meant burning all 31 of them! I was tempted to go out and buy an internal DVD drive. But, being reluctant to part with $$$ to buy a drive just to install the OS with DVDs, I decided to try and mount an external usb DVD drive.

After a couple of hours of trying, I managed to mount them with some of the commands that I found on the net, and even got around to fooling apt-cdrom to read from the external DVD drive. When I tried to install a program using apt-get install, they insisted on reading from my cdrom drive. Eventually I worked around this by mounting my external DVD drive on to /media/cdrom, which is the directory actually used to mount media from the internal cdrom drive.

I followed the rest of the steps to install the rest of the packages to the end of the tutorial (Installing Debian).

Signing off


Saturday, January 9, 2010

Installing Debian Lenny

Following the instructions from http://www.aboutdebian.com, I installed Debian GNU/Linux Lenny until step 14. The instructions were very detailed with much explanation and almost all the prompts from the installer were covered by the instructions, leaving you with no doubt on how to proceed.

So far so good. System is bootable into the command only system. Will continue with step 15 next time.

Signing off  


List of Commands Used

I got interested in learning Debian Linux while running my own company, when we wanted to start our own file server. Visit my company's website here at www.dreamarvel.com

Below lists the commands used by me for my Linux system (This will be updated from time to time):

command [options] ------> Explaination

  • Explaination of the options


cat file_name ------> types out the contents of the file

ls [-a, -l] [pathnames]------> Similar to 'dir' in dos, it will list out the files in a directory/path

lspci [-v -vv] ------> Lists all PCI devices

  • -v - be verbose, list details of the devices
  • -vv - be very verbose, list more details of the devices
lsusb [-v] ------> Lists all USB devices
  • -v - be verbose, lists details
df [-h] ------> Shows information about the file system (How much space is used in a partition)

shutdown [-h, -r] now------> Shuts down the computer

  • (-h means the system will power off when the shutdown process is completed) 
  • (-r means the computer will reboot after the shutdown process is completed)
  • ('now' - is a time element which tells the computer when to shutdown, specify 'now' to begin the shutdown process immediately) 


mount -t iso9660 /dev/sr0 /media/cdrom1 ------> Mounts an external usb DVD drive. Can mount on "/media/cdrom" to fool apt-get install to think that the media is in the CDROM drive. (www.aboutdebian.com uses disks to install their packages and it wants to use the internal cdrom drive to install, while I'm using the external DVD drive to install)

umount /media/cdrom1 ------> UnMounts the external usb DVD drive (to remove the disk)

apt-cdrom -m -d=/media/cdrom1 add ------> indexes the packages from the external usb DVD drive

ping xxx.xxx.xxx.xxx ------> pings the IP address. It will keep on pinging so you need to press CTRL+C to stop.

ifconfig [Interface] [up/down]------> similar to ipconfig in windows, to see your network information.

  • Interface examples are eth0, eth1
  • (up - to activate the network interface)
  • (down - to deactivate the network interface)
  • ifconfig eth0 up - to activate network interface "eth0"
  • ifconfig eth0 - view information about network eth0


fdisk -l ------> Lists the partitions of the system

cfdisk /dev/hdb ------> Opens the cfdisk program to edit the partition of disk "hdb" (HDD of Primary Slave in the IDE)

apt-get Install "Package_Name" ------> apt-get can be used to install, remove, purge packages.

find [pathname] -name [expression] ------> finds a files with "expression" in the file name. The use wildcards is allowed

dpkg [--list] ------> The main package management program with many options

  • --list ------> this will show the status of all packages installed in the system