Wednesday, July 09, 2008

My Teeny-Weeny Ubuntu Adventure on the Compaq Presario F762AU

I highly recommend you read through this guide entirely first before deciding to proceed with the Ubuntu installation.

Essentials:

  • A wired broadband connection,
  • A cool head.
On the 20th of April 2008, my mum put down a deposit at PC Fair, Penang at my behest. The laptop I had set my sights on was the Compaq Presario F762AU.

For RM1649.00, I got a laptop with the following specifications:
  • AMD Turion 64 X2 Mobile Technology TL-60
  • 1GB DDR2-SDRAM
  • 120GB Hard-drive
  • nVidia GeForce 7000M
  • 15.4” Screen (1280 x 800 native resolution)
  • 3 USB ports
  • 1 Ethernet port
  • 1 Modem port
  • 1 VGA port
  • 1 S-video port
  • 1 anti-theft port (not sure how I should use this one)
  • Atheros 802.11 a/b/g Wireless PCI Adapter
Not bad for a sub RM2000 laptop eh? I was really determined to get something for under RM1700, because through the power of the Internet, I found incredibly cheap deals for laptops that would make even ASUS blush (Eee PCs going for US$299 on-line, a substantial discount compared to the RM1200 – RM1400 price tag over here.

Now for some obvious flaws in marketing:
  • No Linux driver CD
  • No tech support for Linux
A great pain the Linux community has happily taken care of.

Installing Ubuntu Linux 8.04 Hardy Heron wasn't exactly easy, as I nearly reached 10 re-installations during the first two weeks of ownership! But the benefit for the reader (I am referring to you) here is my grand summary of stuff you need to do to get the most perfect installation.

Take note that all details here do not take a Windows installation into account, and the installation of Ubuntu is based upon the specifications of my laptop.

I have also included only the essential Terminal commands where necessary, so I don't scare off the newbies who grew up on GUIs.

What's the Terminal? Go see for yourself:

Application > Accessories > Terminal

Installing Hardy Heron on the Compaq Presario F762AU
Boot into Linux with the Hardy Heron CD. This CD may be shipped physically to your home, which takes up to two months, or downloaded.

Obviously, you will choose the download path.

Since the F762AU uses the dual-core 64bit AMD Turion, I downloaded the 64bit version and burnt the image to a CD.

After booting from the CD, I chose to install Ubuntu. From this point onwards, you will go through some very simple choices, until you reach the Partition Manager.

This is the single greatest hurdle you will face in installing Ubuntu, because there really isn't a comprehensive guide included within the installer, to partitioning your computer during the installation process. So I went through some geek forums, for your sake, and after some re-installations, recommend the following:
  1. Choose to manually partition your drives;
  2. Depending on the size of your RAM, set double that amount for your swap-file partition. I set mine at 2.6GB simply because I have a 120GB hard-drive. Lot's of room to spare. The swap partition should be mounted as “/swap”;
  3. Next, create a comfortably large root partition. This partition will contain all your system files. If like me, you like to install lots of stuff to try them out, create a 30GB partition and mount it as “/” (an average “/” partition would range from 6GB to 9GB);
  4. Finally, Use the rest of your hard-drive to create a Home partition. This partition will contain all your documents, your personal files, music, videos and so on and so forth. This partition will be mounted as “/home”.
Since this is Linux, you will be using the ext3 file system instead of NTFS or Fat32. Also, I will not be installing Windows on this laptop, which I have named Enceladus, so I don't have to worry about dual-boot issues or the ability to transfer files from the Windows partition to the Linux partition and vice-versa.

If you do wish to install Windows, make sure you read up on the dual-boot instructions first before you do so.

From my personal experience, I would recommend a Windows installation first before the Ubuntu installation, because Ubuntu will detect Windows, install, and set up GRUB automatically for your machine.

GRUB will allow you to select which OS to boot into when you turn on your computer.

The standard Ubuntu installation will use as large a chunk of your hard-drive as possible and create two partitions, the swap partition, and the root partition.

The value of a manual set-up is the ability to specify a home partition to hold all your personal files. This means should you wish to upgrade Ubuntu in the future, or in my case, screw up the installation enough to warrant a complete re-installation, you won't need to move all your data onto an external hard-drive for back-up purposes.

In fact, the home partition works so well, the look and feel of your desktop will be carried forward into your next clean reinstall. The only downside is the need to re-install all your program files, but then, that's the same issue you will encounter if you re-install Windows anyway. At least by preparing a /home partition, you don't have to move your data to another location while you re-install Ubuntu.

Now that you have defined your partitions, just click the next button all the way, and go take a shower, or make some tea, as the installation will take some time (nearly an hour).

Configuring Hardy Heron for the F762AU
Although the following steps specifically refer to the F762AU model, it may also apply to a majority of laptops out there. But once again, I emphasise that I am writing this guide for the Compaq Presario F762AU.

Ethernet Cable Required

This is one of the biggest problems you will face if you are going to install Ubuntu on this laptop model. HP does not appear to provide Linux drivers for their laptops, so you will have to depend on the good folks from the Linux community to come to your rescue.

From the very beginning, you will not be able to detect, let alone connect to any WiFi networks. While the Linux community works on a functional driver for the Atheros wireless card installed in this computer, you will have to use a wired Internet connection to perform the next steps.

Enabling Repositories
Repositories for software that is. You see, Linux doesn't install stuff like Windows, the software is usually installed using package managers, as I will explain after this.

The important thing is, using only the repositories provided by Ubuntu, you won't be able to install the majority of cool 3rd-party software like Skype and Google Earth or even important 3rd-party drivers, known as “restricted drivers”, so learning to enable additional repositories is a very important step.

Thankfully, the Linux community has provided a clever solution: move the “legally grey” installations to a separate, but well maintained repository.

The repository to install, is Medibuntu.

I have yet to try installing other repositories, but have no compulsion to do so, because the Medibuntu and default repositories from Ubuntu are more than enough to cover my needs.

First you need to install the Medibuntu repository:
  1. Open the Terminal (Applications > Accessories > Terminal);
  2. Enter the following:
    sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
  3. And add the GPG Key by entering the following:
    sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
  4. If prompted for a password, enter your login password. Note: A sudo command grants system-wide control of the computer, so a password will be required to enable these system-wide changes.
To enable Medibuntu and other software repositories:
  1. Go to System > Administration > Software Sources
  2. Select everything on the Ubuntu Software tab (main, universe, restricted and multiverse)
  3. In the Third Party Software tab, select “http://packages.medibuntu.org/ hardy free non-free”
  4. The other tabs are pretty much I-D-10-T proof.
Full instructions and other resources may be found here.

Note: I also enabled the “Submit statistical information” option in the Statistics tab. Linux has a lot of people coding stuff for it for free, but that doesn't mean they don't expect any satisfaction from their work. The more people there are using their stuff, the more motivated they will be in churning out more great stuff.

Updating Ubuntu... and EVERYTHING ELSE!

This is by far the easiest step. As soon as the Ethernet cable is plugged into the Ethernet port, Ubuntu will begin searching for suitable updates and patches to add to your computer. If it doesn't perform this step automatically, open the Update Manager by choosing:

System > Administration > Update Manager

Then download and install the updates.

The updates are provided from software sources known as repositories. These repositories will determine what you may or may not install through Ubuntu's package managers.

Unlike Windows, all software installed on Ubuntu may be handled by the package managers. There are three GUI package managers for Hardy Heron,:
  1. Add/Remove
  2. Update Manager; and
  3. Synaptic Package Manager.
Think back to Add/Remove Programs on Windows. You can choose which files you wish to un-install from that program without needing to track down the program's un-installation file, if it even provides one.

I personally prefer using Synaptic Package Manager, so I will use it as the example in this modest guide.

Synaptic Package Manager not only allows you to un-install nearly EVERY program on Ubuntu, you may also choose to INSTALL programs as well.

Yes, that's right, install programs without needing to go to the corresponding web site, finding the link, downloading the file, then installing it by clicking through lots of “I Agree” buttons.

For example, if I wish to install the full OpenOffice Suite:
  1. Go to Systems > Administration > Synaptic Package Manager;
  2. Type in password (more on this later);
  3. Click on the Search button and type “openoffice”;
  4. Find openoffice.org, right-click, and choose “Mark for Installation”;
  5. Click “Apply” to begin the download and installation.
That's it! No browsers required, no sifting through agreements and what-nots. In fact, I have yet to encounter anything like the standard Windows installation process on Enceladus.

What are User Agreements again?

Synaptic has saved my life. No kidding. I mistakenly typed “sudo firefox” into the Terminal, which immediately destroyed Firefox 3.

NEVER. EVER. USE. “sudo firefox”.

If I were in Windows, I would have to use Internet Explorer to surf the web, and look for an alternative browser to use to surf the web.

Not in Ubuntu Linux.

I fire up Synaptic, searched for web browsers, and installed Epiphany, a simple web browser for Linux. Epiphany served as a loyal substitute while I searched for a solution to Firefox's woes.

Firefox 3 is now up and running again, so another huge problem solved, thanks to the Ubuntu community.

Back to topic, you need not choose and install the files one at a time. Simply search for your favourite programs, and mark them for installation. After you are done click Apply.

NOTE: You should not run any other package manager while installing files, as this will result in the immediate death of one of the package managers.

Graphics

Upon installation, Ubuntu will use generic nVidia drivers to run the GeForce 7000M residing on the F762AU. The screen resolution isn't going to be pretty at first, so you will have to tolerate it until you get better drivers.

Luckily, nVidia provides the restricted drivers necessary to run your laptop at the full 1280 x 800 resolution.

Once you have run your updates with the restricted repositories installed, Ubuntu will automatically update the nVidia driver.

All you need to do now is:
  1. Go to System > Administration > Hardware Drivers
  2. Check the NVIDIA accelerated graphics driver (latest cards) box to enable your card.
  3. Reboot
Now enjoy your new, glossy, and slick looking desktop.

NOTE: If you want to impress people, turn on the visual effects by going to:
System > Preferences > Appearance > Visual Effects
and select either Normal or Extra. Under normal circumstances (meaning when there aren't people around to convert to Linux) I wouldn't recommend activating the flashy Visual Effects because you will start noticing some slowdowns in various processes.

I attribute this minor flaw to the fact that I was only willing to dole out less than RM1700 for my first laptop. So if you are paying for anything more than what I paid for, these enhanced visual effects would probably not cause any slowdown.

Wireless Connections, the hard part.
For about three months, my WiFi card was literally killing the pleasures of Linux. Finally, after three long months, and two weeks into my university life, I can finally post a definite solution to getting your WiFi up and running on the F762AU.

Just follow the instructions here and you will soon have a functioning WiFi system.

Since the instructions will be updated occasionally, I won't be posting the details of the fix here. Besides, it's better for the people who found the solution to take credit for it.

Security
You don't need any firewalls, antivirus, or antispyware programmes.

Period.

Can you do that with Windows AND not shout expletives at your computer after one month?

Conclusions
So admittedly, Ubuntu Linux isn't as easy as most people would prefer it to be. For my part, I enjoy being frustrated by a good-old-fashioned brain-teaser, that's not quite old-fashioned but good..

That means I actually like hard stuff, with the precondition that I enjoy the process of solving the problem. Refer to my previous accounts of Chemistry and Mathematics for examples of problems I do not enjoy solving.

I hope you will be less doubtful of trying out Ubuntu Linux on your computer after this.