A new OS experience

2008-01-08

Migrating from Windows to Linux

Yeeeey, I made the switch from Windows to Linux - Kubuntu 7.10 Gutsy to be
more exact. It was entirely an easy process. I decided to go with Kubuntu
because of the KDE desktop since I became familiar with it while toying with
Knoppix 5.1 Live CD. The following are my installation notes:

1. I backed up all the data that I had under the Win XP Home install to a few
DVDs. Then, using the installation disk I formatted the HDD (SCSI) using
Konsole, and prepared the MBR:

$ sudo dd if=/dev/zero of=/dev/sda bs=512 count=1

2. Using the "Install" option on the Desktop I created a SWAP partition of
1024MB and used the remainder to install the OS.

3. Amazingly enough, Kubuntu is very, very, very noob-friendly. It loads
almost all the drivers you need. The hardware I am using is a 3 year old Dell
Inspiron E1505 (6400), but the problem arose when I tried to connect to my
wireless home network. I needed to use the proprietary driver for my wifi
card. Kubuntu does have a few tools available, but ndiswrapper was not one of
them. I could use the aptitude tool but that requires internet connection to
download from the repositories, so I downloaded the following for manual
install: ndiswrapper, wpa_supplicant, wireless-tools, the wifi windows card
driver (bcmwl5.inf, bcmwl5.sys) - I transferred these to a USB flash drive.

4. Installing and configuring wireless:

a) Check and remove old driver from distro:
$ lsmod | grep bcm43xx
$ sudo modprobe -r bcm43xx
$ lsmod | grep bcm43xx

b) Check for ndiswrapper:
$ lsmod | grep ndiswrapper

c) To install files, build essentials are needed. Inserting the Kubuntu CD in
the drive:
$ sudo apt-get update
$ sudo apt-get install build-essential

d) Transferring ndiswrapper and windows driver to a directory under /home:
$ sudo cp /media/sdb1/ndiswrapper-1.51.tar.gz /home/Tools/Ndiswrapper
$ sudo cp /media/sdb1/WinDrivers/*.* /home/Tools/WinDrivers

e) Extracting ndiswrapper and install:
$ tar -zxvf ndiswrapper-1.51.tar.gz
$ cd ndiswrapper-1.51
$ sudo make uninstall
$ sudo make distclean
$ make
$ sudo make install
$ ndiswrapper -v

f) Installing the Windows drivers:
$ cd /
$ sudo ndiswrapper -i Tools/WinDrivers/bcmwl5.inf
$ ndiswrapper -l
$ ls /etc/ndiswrapper
$ sudo modprobe ndiswrapper

NOTE: If ndiswrapper does not load on startup, edit the /etc/modules file adding ndiswrapper:
$ sudo nano /etc/modules
Add the line "ndiswrapper" w/o quotes below the last module

g) Checking wireless configuration and bring up the card:
$ iwconfig
$ sudo ifconfig eth1 up

h) Since the home network is encrypted with WPA-AES I needed to use
wpa_supplicant to communicate with my AP. Luckily, Kubuntu 7.10 already comes
with wpa_supplicant. The WPA encryption is in HEX, so first:
$ sudo wpa_passphrase essid HOME willubethere4ever
Copy-paste the results and then:
$ sudo nano /etc/wpa_supplicant.conf
# Control interface - Do not change this line
ctrl_interface=/var/run/wpa_supplicant
# Allow only Root to read WPA Supplicant Config
ctrl_interface_group=0
# Allow wpa_supplicant to scan and select AP
ap_scan=1
# Begin detailing networks below
# Net1 - Associate with any open AP
network={
ssid=""
key_mgmt=NONE
}
# Net 2 - COFFEE SHOP Using simple WEP
network={
ssid="COFFESHOP"
key_mgmt=NONE
wep_tx_keyidx=0
wep_key0=6644565378
}
# Net 3 - HOME Using WPA AES with only CCMP
network={
ssid="HOME"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
#psk="willubethere4ever"
psk=365342f8362524e1834abbd953edaf8979c4de38d7601fabb30a84d769953bb3
priority=2
}

i) Initiated wpa_supplicant and force IP :
$ sudo wpa_supplicant -c /etc/wpa_supplicant.conf -i eth1 -D wext -B
$ dhclient eth1

j) Since eveything worked I made changes to ndiswrapper permanent:
$ sudo ndiswrapper -m

k) Time to blacklist the old driver:
$ sudo nano /etc/modprobe.d/blacklist
Adding as the last line:
# Blacklist old wireless driver
blacklist bcm43xx

l) I modified the network interface:
$ sudo nano /etc/network/interfaces
# Do not change this
auto lo
iface lo inet loopback

# Adding wireless card
auto eth1
iface eth1 inet dhcp

# Initiating wpa_supplicant on startup
pre-up wpa_supplicant -c /etc/wpa_supplicant.conf -i eth1 -D
wext -B

# Terminating wpa_supplicant on shutdown
post-down killall -q wpa_supplicant

m) Updating boot script to load dhclient and force IP association:
$ sudo nano /etc/init.d/rc.local
#! bin/sh
dhclient eth1
...

5) Time to reboot the system and get all the software and security updates
needed on boot.

That was it, and I couldn't believe how easy it was, relatively speaking.
Although it may seem like a lot of work, considering all the perceived
hassles one must go through, the upside to any Linux distro is the altering
perception on the noob since it allows you to learn and feel like you are in
control. Although Windows has similar capabilities, it must be said that most
of the time all things work easily, initially that is. Not to bring Windows
down, but I feel more in control with Linux - besides, I love to learn new
things.

No comments: