Admin 2008 -->
Type your first command to LIST the root file system tree:
# ls -a /
. bin cdrom etc home lib media opt root selinux sys usr vmlinuz .. boot dev firewall.txt initrd.img lost+found mnt proc sbin srv tmp var webmin_1.400_all.deb
and you will see the subdirectories of /
To mount a file system, the cdrom in this case, we need to only type:
# mount /cdrom
because the normally required parameters are catered for in a file called /etc/fstab which was created as part of the install so the system already knows of the type and existence of the cdrom drive. We will edit this file later
I want to install some progs to get my wifi up from cd using the package manager Apt:
#apt-get install module-assistant wireless-tools
Press Enter to install these and the dependencies required.
Now, the package ndiswrapper is a utility that enables Linux to utilise native Windows drivers to access hardware that came only supplied with the Windows CD etc. so here I have to get that package off the web via another pc and transfer it to the Linbox, compile it as a C prog, and install those created modules, so I can use ndiswrapper to install the Windows drivers so Linux can see and use my "designed for Windows only" wifi adaptor.
Get latest ndiswrapper source from:
http://sourceforge.net/project/showfiles.php?group_id=93482
and get the latest stable release. It is probably a tar compressed filetype similar to Winzip etc.
Copy to the Linbox using a thumbdrive/whatever. When plugged in you should get info on what its device name is etc: e.g. scsi device sda1 depending what other devices you have, (remember (hdA) etc. before?).
We need this to tell Linux how and where to mount the device, i.e. its drive type and file system type, in my case my Sandisk Cruzer is formatted with Windows vfat file system so:
# mkdir /ndis
#mkdir /pendrive
Use tab completion when the cursor is at the end of the line to show the contents (if any) of the directory, or next su-folder. This saves a lot of typing and finds names you dont know.
# ls -a /pendrive/[TAB] [TAB] etc
Copy the ndiswrapper file from the pendrive:
# cp -v /pendrive/ndiswrapper-1.43.tar /ndis/
Unpack the tarred files where -x is extract, -v is verbose and -f is files:
/ndis/# tar -xvf ndiswrapper.tar
You should see all the files and subdirs being unpacked and created..
Move into the main 1.43 version subdirectory from here:
/ndis/# cd /ndiswrapper-1.43
List its contents
/ndis/ndiswrapper-1.43# ls
You should see some key files: the INSTALL and Makefile are the ones were interested in as INSTALL is a text file of instructions and Makefile contains a shell script for the making of the modules for ndiswrapper.Read INSTALL using "more" prog:
/ndis/# more INSTALL
First we need some C libraries etc. installed for that to happen, and module-assistant does that hard work for us.
/ndis/ndiswrapper-1.43# module-assistant
this saves us manually installing gcc cpp g++ and other stuff wed never remember so that C progs can be built etc. Follow the screen instructions using the TAB and Enter keys and exit the prog after gcc cpp etc has been installed from cd.
Note if you try to use mod-asst to install ndiswrapper at this stage it will fail as we havent created the modules yet, so lets do it..
/ndis/ndiswrapper-1.43# make
you should now get a long scroll of happenings as the dirs and .o type modules get made..and a happy exit status of [1]. If not something is probably missing - research time!! Byeeee. For the rest of us :
/ndis/ndiswrapper-1.43# make install
hopefully all go again and ndiswrapper should work and we can install it in the kernel using modconf.
/ndis/ndiswrapper-1.43# apt-get install modconf
/ndis/ndiswrapper-1.43# modconf
Scroll to the bottom of the modconf screen (page down a long way!) and enter �misc� and install ndiswrapper. Check it has loaded. I like to get back to the root dir now so
/ndis/ndiswrapper-1.43# cd ~
takes you back there so:
lsmod | grep ndis
You should get a line containing ndiswrapper and maybe usbcore etc. meaning the module has loaded. lsmod alone lists the modules currently loaded in the kernel, and piping it through a filter grep for the string ndis gives you just the output containing the string ndis A very powerful search tool is grep, but I dont know how to use it well yet, but this principle of the output of one programme becoming the input of another is the power behind complex Linux shell scripts and program writing. We should be able to use ndiswrapper as a command to load the wifi Windows drivers so get your wifi card driver cd and copy the drivers directory that contains the main windows xxxxxx.INF file and all the others in the same dir to your Linbox dir of your name choice, using all the commands we did above.Ive got a little USB Airdash wifi module that works fine so lets install its drivers from your directory:
ndiswrapper -i /airdash/G2054i.inf
where the small -i is for install, and -e removes a driver of that name and -l is list drivers already installed.
ndiswrapper
shows: g2054i : driver installed
now to see what happens when I plug in the usb wifi device:
You should get a load of gumph relating to your device, like its encryption abilities,TKIP, WEP, vendor, name etc. reported with its network interface name.
Mine is wlan0 for the first wireless device (a 2nd would be wlan1 etc) and maybe a flashing of LEDs to boot! Looks good..beaconing blink, blink! This now needs my wireless access point details to associate with, that I just happen to know by heart as should you if you use your AP for Windows already!
Earlier we installed wireless-tools which contains amongst others
iwconfig
which should give you details of the status and capabilities of your wifi card. To see if we can detect your AP we use
iwlist
which tells you its own options and the format to use them so :
iwlist wlan0 scan (note you can truncate these options, scanning to just sc etc)
This should give you info - the MAC address amongst other things of any beaconing APs in your vicinity: cell 01 : address xx:xx:xx:xx:xx:xx etc Theres your AP!! ..or is it the neighbours..hmmm?
Most AP s now are set to conceal their ESSID or Network Name to help prevent hackers finding them and connecting - provided your AP is set to only allow association with the correct ESSID and password set in the first place, especially if its an older AP still using WEP and not the newer �uncrackable� TKIP, WPA etc.
Many APs get round this problem with Access Control by MAC address so you only let known pcs connect to your AP. Its fun to try cracking your WEP based AP though as a learning curve if you have a couple of hrs to spare to collect enough data for the aircrack-ng utilities to work with. Thats another story maybe Ill tell later�. So lets get connected to the web:
iwconfig wlan0 key XXXXXXXXXX
your 64 bit WEP key (10 digits)
or put s:string_�my_pword� if its text after key or enc
iwconfig wlan0 essid YOUR_NETWK_NAME
iwconfig wlan0 commit
Then to get a DHCP addr if your AP has a DHCP pool set
dhclient wlan0
Hopefully you will get given an IP address e.g. 10.0.0.x or 192.168.x.x etc
Check that a default route for your device got handed out which should be the IP addr of your AP
route
and that a DNS nameserver got given and written to your /etc/resolv.conf file
vi /etc/resolv.conf
You should see similar to:
search workgroup
10.0.0.x nameserver
195.92.195.94 nameserver
which should be your AP and its primary DNS server from your ISP. Check it resolves names ok
ping -c 3 www.google.co.uk
to send 3 ping counts to google and get the ip addr back: 209.85.227.106
WE RE ON THE WEB!!!
Now we can nearly dispense with the CD and get updated packages direct fresh from the Debian Factory AFTER amending the /etc/apt/sources.list and learning how to edit text on the command line using VIM but to finish this section, you can get all the usually horribly written, scary, techie details of most commands usage and options that have been installed on your system, from the manual pages e.g.
man grep
Using the Spacebar and Q to scroll and Quit.
The next page goes all the way to a working KDE desktop.