the ubuntu diaries

October 8, 2008

on how to set up a wireless connection in Ubuntu Hardy

Now it’s time to get the penguin connected to Internet. Before we start I think would be useful for you to know what kind of user you are.

User A: you connect to the web with a cable, and in this case you don’t need to read this post

User B: without knowing it you are lucky enough to see your driver automatically recognized by Ubuntu. This is usually the case with Realtek and Ralink chipsets.

User C: you own a wireless adapter with a Broadcom chipset or even worst a b43xx series; that is unfortunate as this post will work for most of the wireless adapter but certainly not for the ones equipped with a Broadcom chipset. Now this is not for being mean, but when you have a Broadcom chipset you need to follow another way to make your card working. This way involve to use additional software such as b43-fwcutter, you need to spend sometime on Internet finding the solution of any other problem, and quite possibly you have to write few lines of command in your terminal windows. I had a Belkin adapter with a b43xx chipset, and after long researches, close encounters of the third kind with the command line, and perhaps for the fear of being too stupid I decided to buy another adapter all together.

User D; I like you. I do so because you are the one who’s going to keep reading this post.

So first thing to do is to find out what kind of user you are. I have never had the pleasure to be an User B, but I know that in this case the wireless utility automatically starts; all you have to do is choose your network and enter your WPA key (as you do in Windows). You should see something going on on the top right corner of your screen next to the speakers.

We then need to find out if you are a soon happy User D or a for quite a while miserable User C (look User C perhaps you won’t have any problems at all, I’m just warning you). To do this we have to run a command from the terminal window. I won’t talk at all about commands and terminal at this stage so just believe me.

Top left corner of the screen an click on

Applications – Accessories – Terminal

or alternately press

Alt+F2 and write gnome-terminal

I actually prefer the latter as it is much faster. Alt+F2 is like the Run command in Windows under the Start menu. The command will be there next time waiting just to be scrolled from the drop down menu. Just as Windows.

Now you must see a white windows with at top something like:

username@desktopname:-$

As I said this is not the time to explain the terminal window and the command, and as I said just trust me and write

lspci and then hit Enter

lspci command

lspci command

You can see in the picture a yellow box meant to highlight the part we are interested in;reading that I acknowledge the fact that my adapter is equipped with a Marvell chipset. So I am a User D, if so are you keep reading.

If you red the previous post you have downloaded already the Ndiswrapper packages. Ndiswrapper will allow you to use Windows Wireless Drivers under Linux. If you haven’t you may want to do it now:

NOTE: I ASSUME YOU USE UBUNTU HARDY WITH i386 ARCHITECTURE (32 bit processors), IF NOT CHOOSE YOUR OWN VERSION BEFORE TO DOWNLOAD THE PACKAGES link

ndiswrapper commonndiswrapper utils - ndisgtk

Install them in the same order that I listed above. To do that simply double click on the file, whatever folder you downloaded it into Ubuntu. For all them you will probably see the following message

Message

Message

Ignore it clicking close. You can update the package if needed once you established the connection. If the case Ubuntu will look after all the procedure.

Once installed all the packages, go to

System – Administrator – Windows Wireless Drivers (this voice has been added by Ndiswrapper)

Windows Wireless Drivers

Windows Wireless Drivers

Click and you’ll be asked to type the password which the same you input during the installation. Do that and this what you should see

Click Install New Driver. At this point the system is asking you to pick the file with extension .inf which held the information about your driver. This file is located in the partition where Windows in installed; this will be either in the folder

Program Files-name of the adapter folder – driver – something.inf

in my case it was in

Windows-Inf-name of the adapter folder-driver-something.inf

It depends of course on the hardware instalation. Select the file click Open and then Install in the follow screen

Install new Windows driver

Install new Windows driver

If the file is correct that is waht you should see

Correct file

Correct file

If not the screen will tell you you picked the wrong file. Click Close. At this point the little screens next to the speakers in the top right corner od the screen become two little point with something like a small comet spinning arround the points. That means Ubuntu is looking for all the networks available. In my case it found only my own network. And then the following scrren appeared immediately. In the case more than one network are found, you may need to click on the comet and choose your. In both cases the screen when you enter your WPA key appears

WEP key

WPA key

Keep the wireless security on Personal and type on Automatic. Enter the key and click Connect. Now at this point if everything is working, you should see the two points next to the speakers changing their colour from blue to green; when both are green you are connected and the points leave the space for the graph indicating the strenght of the signal

Connected

Connected

September 29, 2008

let’s do something

All right people it is time to do something. The subject of this post is probably the reason for which most people give up trying Linux even before installing it. I guess it is also the reason because most of the distro developer create Live version of them. I am talking about perhaps the deadliest operation you can perform on your PC.

The operation by the way involves changing your disk partition. Change the partition of your hard disk is not something that you do everyday. In fact it is something that you probably won’t do it at all in your life.

A partition is a space on your hard disk where you can store your data. When we buy a new PC it has only the partition C. If the hard disk is of very large size, it is common than the user create a supplementary partition normally named D. So we may store Windows and our programs in the partition C and our data only in the partition D. In this very case we want to create a new partition in order to install our Linux distro.

As I previously said installing Linux doesn’t involve getting rid of Windows. Even though it is necessary to install the Operative System (OS) in two different partition, leaving Windows on C otherwise it won’t start. After the installation any Linux distro will take care of the dual system installing a boot loader; this will allow you to decide what OS have to start.

We can’t talk about partition without involving file systems. When you format a partition whatever is the software you are using, you can choose among different type of file system. The most popular perhaps are Windows partition such as FAT, FAT32 and NTFS; For Linux we have to use the EXT2.

What you need before you start:

  • A copy of Ubuntu Linux. You can download the ISO image following this link. Once downloaded you can use any software you like to burn the image (I used CDBurnerXP, which has a straightforward option to burn ISO images)
  • If you are connected to Internet with a wireless device it is better if you download in advance the following packages as they’re not included in the distro ndiswrapper common (libraries common for all the platforms), ndiswrapper utils (package that allow you to use Windows wireless devices, make sure you choose the right platform), ndisgtk (Graphic interface option for ndiswrapper package). Note that you will need the ndiswrapper only if your card doesn’t have a native Linux driver. If your wireless card is equipped with a Broadcom chipset the procedure to get the connection working is bit more painful than other chipset. In particular you want to check this page from the ubuntu forum. (Before start the migration to Linux i used a Belkin card with Broadcom chipset but I struggle to get it up and running with Ubuntu. Eventually I opted to buy a new card, Netgear WG311 with Marvell chipset and had no moreproblems)
  • BACKUP BACKUP BACKUP BACKUP BACKUP BACKUP BACKUP BACKUP
  • If you didn’t do it yet BACKUP all your data.

First thing to do is to decide how much space you want to reserve to Linux. If you have only one hard disk and you need to run Windows too you must leave the latter in the partition C. If you have two hard disk, as I do, you can allocate one disk for each OS.

This is the screenshot of my hard drives situation before installing Linux.

My partitions before to install Linux

My partitions before to install Linux

The second hard disk has the space already formatted as NFTS, because Windows use to be allocated here. To manage your partition you can use the software EASEUS, a free partition manager. Once you created the space for Linux you don’t need to format it, everything will be done during the installation.

So you burn your image of Ubuntu, you downloaded all the ndiswrapper packages (if you wish to have a wireless connection and your device doesn’t have a native Linux driver), now you are ready.

Insert the disc with the image on your drive

  • Restart your PC and make sure that your boot sequence start from the right drive. To do so when you restart the PC you need to access to your BIOS (usually is the button F1). Depending on the version of yor BIOS you have to go to the menu Boot or Boot Option or something like this and choose the right sequence (CD/DVD drives are normally on the secondary master channel so you should read something like SMD follows by the model)
  • Save your the changes and reboot
  • The CD starts and the first thing to choose is the language. It will be English for me
  • A installation menu appears. We want to select Install Ubuntu. The kernel starts loading
  • Complete all the steps, such as geographic zone and keyboard
  • The partition (Starting up Partitioner) screnn appear. You see different option such as Guided resize (if you use one disk for Linux and Windows; if you follow this tutorial you did this already in Windows and you don’t want this). Another option is Guided for entire disk (you may use this option if you have two different drives, and you want to dedicate an entire disk to Linux. Again if you want to keep using Windows leave it in the primary master channel in the C partition). The last option, which is the one I used is Manual Configuration. Go for it.
  • It will open a windows where you can see all the drives and partition present on your PC. If you have only one disk you should see only /dev/sda followed by as many numbers as the partitions in that disk. To clarify this I’ll explain my configuration: I have the first hard disk, where Windows is installed, with one partition; then I have a second hard disk with three partitions and a third external disk again with only one partition. My screen then was one item under /dev/sda/(first disk), three items under /dev/sdb/(second disk) and one item under /dev/sdc/(external disk)
  • Check the box correspondent to the partition you want to use to install Linux and then click the button Edit Partition at the bottom of the windows.
  • Another windows will open where are listed the properties of the chosen partition or drive. You can see the size, the file system and the mount point. Select Ext2 as file system and the character / as mount point (the character / it means mount point root)
  • That’s it. The installer will notify you a message where it advices to set up a swap space. You can ignore it for the moment we will set up a swap space once the installation is completed
  • Other information will be asked such as log in name and password. Those can be whatever you like just remember that the name and password you input at this stage are automatically considered the one of the administrator user. Although you will log in using this settings, you still need to enter your password for same action where administrator privilege are needed. (Installing new software and change system settings)
  • Before the installation ends you have the option to import other OS accounts. It is up to you to include this option in the installation.
  • You are ready now. Once the installation is terminated you will be asked to remove the CD and press Enter in order to restart the system
  • The system restart and you find a windows generated by the boot loader. This windows contains all the OS and their options present in the disks. So you can see an Ubuntu Generic option (generally the first in the list) shich aloow you to start Ubuntu; other Ubuntu option that we don’t care for the mometn and also the Windows option. Remember that if your PC has a recovry routine this will be stored in a dedicated partition, usually at the very begin of the drive. This partition will also be visible in the boot loader, so check which is the right one for Windows

And this is it. If you happily installed Ubuntu you already achieve something that most people didn’t or tried and gave up. If you messed up, don’t worry I did that few times and I survived; try again you’ll be luckier. If you messed up and contemporary lost all your data…what can I say life is unfair but human beings are stupid, and you are definitely one them because you did’tn do any backup

NOTE: in this blog we will refer to the Ubuntu distro. Most of the thing we will say are applicable to all the other Debian based distro. Software (Gimp, Blender, QCAD, OpenOffice) and command line tuttorials can be followed on any machine where the softwares are installed.

Blog at WordPress.com.