Borys Bradel's Blog

My experience with Ubuntu Linux

Tags: linux July 5, 2008    

Introduction

I decided to install Linux and wanted to write about my experience, especially since there are a lot of little details that make setting up linux difficult.

I installed Ubuntu Linux 6.10, which was the newest version when the installation occurred. Other distributions were too much of a pain to install. RedHat uses the rpm system to install packages, and I find the system too difficult to use. Debian has no easy way to download an ISO CD image. The BSD variants had a similar problem and also their install process seemed a lot more complicated. I did not consider other distros. Things have improved since then and my next attempt will probably be one of the BSD distros.

The first step was burning the ISO CD image interestingly that cannot be done by default on Windows XP (ISO Recorder could be used). Therefore I burned the image on Mac OS X.

Installation

The second step was to install linux from the CD. Unfortunately at the startup splash screen, the screen went pretty much black. This is a weird relationship between my ATI graphics card and Linux drivers. The fix was to add "break=bottom" to the startup script (I no longer remember at which point, I think there was a point at which installation could be interrupted and the end result a command prompt), run "chroot /root nano /etc/X11/xorg.conf" when the prompt comes up, delete the two lines that contain load "dri" and load "glx" below the go the line with Section "Module", then save and exit, and exit the command line shell (type exit or ctrl-D). After that the install is smooth. Hopefully the issue has been resolved since then.

Wireless

The next adventure is getting wireless to work. Using a well known brand name card is relatively painless.

I tried using an inexq card, and that was hopeless, even when using ndiswrapper.

for the d-link g520 card, I could see the network initially, but connecting to it didn't work. Eventually I tried wep and accidentally set the router to open key. I could connect on linux, but then I tried connecting on windows and couldn't. Eventually I checked my router configuration and found my mistake. Then I put the router into shared mode. I found that wireless on linux doesn't support this mode, so now I use open key wep, and properly configured, I can use the network both from windows and linux.

I learned the following useful commands/locations during this time:

dmesg - prints messages from the system

lspci - list the devices on the pci bus

The command to scan is sudo iwlist ath0 scan

The command to show the status of the devices is sudo iwconfig

Interesting files are at /etc/network/interfaces and /proc/net/wireless.

I also need to look at /var/log/messages.

sudo /etc/init.d/networking restart, sudo ifdown ..., and sudo ifup ath0 to restart the network.

Also, some websites were saying that /etc/network/interfaces needed to have certain lines in a specific sequence, namely:

iface ath0 inet dhcp

wireless-mode managed

wireless-essid name

wireless-key 1234123412

wireless-channel 6

auto ath0

Well, that's the sequence I used, although others might have worked as well.

Sound

This section can be summarized by the word alsamixer, which is a very good application.

I used it to unmute all the speakers and to turn the feature to "spread front to surround and center/lfe".

The guide here is very useful.

Also, the speaker-test utility can be used for testing that sound is playing from each speaker.

Other useful pages are: here and here

The latter page mentions how to use the speaker test: e.g. "speaker-test -Dplug:surround51 -c6".

I had to add a .asoundrc file as per the ubuntu edgy user guide to get surround sound working.

Also, playing midis is difficult: kmid crashes the entire system and xmms-midi crashes itself. Timidity, which is a command line tool does the job though.

Instructions for dual monitor setup

0. First back up /etc/X11/xorg.conf

1. Add the following lines before the "Module" section:

Section "ServerFlags"

Option "Xinerama" "On"

EndSection

2. Duplicate monitor, screen, and device sections.

When duplicating the "Device" section prepend "0 " and "1 " to the two identifiers, and add Screen 0 and Screen 1 right before the EndSection lines.

Change the screen names from "Default Screen" to "Left Screen" and "Right Screen", and prepend "Secondary " to the name of the second monitor. Also, in the Screen sections, append "0 " and "1 " to the Device names.

3. Change the line

Screen "Default Screen"

to the two lines

Screen 0 "Left Screen" 0 0

Screen 1 "Right Screen" RightOf "Left Screen" 4. To log out and restart X, type ctrl-alt-backspace

The guide here is very helpful.

To find out what the screen resolution is, use xdpyinfo (info found here)

Package Installation

Synaptic Package Manager is really nice. Make sure that the universe and multiverse are seen though.

The following packages are ones that I have installed along with which section they are in. These could be installed by a really long command "sudo apt-get install pkg1 pkg2 pkg3 ...".

vim (how could this not be installed?)

vlc

tetex

autoconf

automake1.9

imagemagick

graphviz

gnuplot (Mathematics (universe))

gawk (how could this not be installed?)

clisp (Interpreted Computer Languages (universe))

jikes (1:1.22-4) (Development (universe))

xmms (to play radio paradise streams)

bison (Development - also installs yacc)

gcc (Development)

g++ (Development)

sun's sdk (Development (multiverse))

blackdown sdk (j2sdk1.4 Development (multiverse))

I had to uninstall the two gij packages (Development)

I have installed other packages along the way, although these are the essential ones. Quite a few packages have changed over time, and in the newer distributions tetex is texlive and Java is at version 1.5 instead of 1.4.

Input

The next adventure. Ctrl-h does not work as backspace. So I had to change that. The instructions are:

change the delete-char line in .inputrc to

"\C-h": delete-char

Along with that, add the following line in .bashrc:

stty erase ^H

And then change the xterm profile (Edit > Profiles > Edit > Compatibility) to have backspace generate a ctrl-h.

This guide helped with the stty command, and made me think that I needed to change the .inputrc file. Although the comments in the inputrc file made me realize what I needed to change the line to.

Miscellaneous Settings

I also changed many little things.

I changed the window theme to Mist, because otherwise the window margins are too large (System > Preferences > Theme ; Appearance in 8.04).

I should also mention how my .Xdefaults file looks like:

xterm*font: 9x15

xterm*geometry: 70x50+0+0

to add $HOME/bin to the path I added:

PATH=$PATH:$HOME/bin

export PATH

I also set the command located at: System > Preferences > Keyboard > Layout Options > Ctrl key position > make the caps lock as an extra ctrl key

The command sudo dumpe2fs -h /dev/hdc1 displays info about max mount count. To change the count to 100, use the command sudo tune2fs -c 100 /dev/hdc1

To set up a mount of a windows partition add the following line to /etc/fstab:

/dev/hdc2 /hdc2fat vfat rw,user,noauto 0 0

Upgrading

I tried to upgrade once before using the GUI. The process died part way through installation after downloading over 1 GB of files. That was depressing. Unfortunately, since the support for 6.10 has ended, the only way to get up to date patches was to update. Unfortunately using the GUI was impossible because the current version was not supported. Fortunately https://help.ubuntu.com/community/FeistyUpgradesManual contains information on which files to manually change and what commands to execute.

I followed the instructions, modified the references from edgy to feisty in the file /etc/apt/sources.list and ran the command sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get dist-upgrade

After everything downloaded the system asked about doing something with regards to a broadcom wireless router, and since I don't use the corresponding wireless card (it never worked in linux), I answered no. Then the following appeared

Preparing to replace libblkid1 1.39-1ubuntu0.1 (using .../libblkid1_1.39+1.40-WIP-2006.11.14+dfsg-2ubuntu1.1_i386.deb) ...

Unpacking replacement libblkid1 ...

Errors were encountered while processing:

/var/cache/apt/archives/language-pack-de_1%3a7.04+20080228_all.deb

/var/cache/apt/archives/language-pack-en_1%3a7.04+20080228_all.deb

/var/cache/apt/archives/language-pack-fr_1%3a7.04+20080228_all.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

After some searching, http://linux.derkeiler.com/Mailing-Lists/Debian/2004-04/2568.html said to install individually and I ran the following: sudo aptitude install libblkidl

That gave me a prompt where I was given the option of install several language packs. I said yes and a whole lot of stuff started installing.

Then I ran the remaining commands individually:

sudo apt-get dist-upgrade

sudo apt-get dist-upgrade

sudo apt-get update

sudo apt-get dist-upgrade

sudo apt-get -f install

sudo dpkg --configure -a

That took 3 hours in total.

Being the masochist that I am, I decided to upgrade further. I used the GUI to upgrade to 7.10. That was another 3 hours. There were no problems during the install, although I was given some really strange dialogs about the installation wanting to access my windows partition. That failed because windows was hibernating.

Running 7.10 was another story. Something was wrong with the graphics on 7.10 and it was impossible to go beyond 800x600. I tried to fix that for a few minutes, without luck.

I then decided to upgrade to 8.04, which is the most recent update. The upgrade was through the GUI and was easy. Although the install of 8.04 did check the hard drive, found some problems, and fixed them. Unfortunately I don't know what the errors were and I cannot find the log file after looking in /var/log/ under fsck, installer, and dist-upgrade.

That took 1.5 hours.

Also, there seem to be some errors on boot regarding an image with a specific uuid. That is probably an artifact of upgrading distributions and changing something in /boot/grub/menu.lst may be able to resolve that. I will not look into it though, since that does not cause any problems.

Graphics

Unfortunately the graphics problem persisted. After 1.5 hours of looking around I finally found a web page on debugging X autoconfiguration, which said to try and remove the /etc/X11/xorg.conf file. That fixed the problems, sort of. The main GUI interface works. However all of the virtual consoles are displayed using a frequency outside of the range of the monitor and the text does not appear correctly.

I tried a few more things, and the issue is resolved. First, I copied xorg.conf.1 to xorg.conf and changed all 1280x1024 to 1280x1024@60, and I then restarted X. That caused problems and put the resolution back to 800x600, so I deleted xorg.conf and restarted X. That still left the resolution at 800x600, So I deleted xorg.conf.failsafe, which was created after X was reset. Magically, the frequency issue on the virtual consoles went away. However, the output on consoles 1 through 4 was still gibberish. Fortunately, after a full reboot of the system, the garbage went away, and the graphics work properly.

Wireless Ndiswrapper

Version 8.04 has a nice log display utility at System > Admin > System Log that has the conveniently displays the most common system logs. One of the things that I noticed is that error messages were being generated every minute or so. The culprit was a wireless card in my computer that cannot be used by linux. The card is not used, but it still seems to be accessed. There is a module called b43legacy that does the accessing.

There seems to be no direct way of disabling the card in a way that will stop those errors because the card does not appear in ifconfig, only in iwconfig. Therefore the best approach is to blacklist the module by adding "blacklist b43legacy" to /etc/modules/blacklist. Problem solved.

Hibernating

The system is still giving errors about hibernate not working properly. There are some error warnings about irq 16 being unbalanced in the system log.

According to https://help.ubuntu.com/community/DebuggingIRQProblems there are a few places to look for the source of errors: /proc/interrupts, dmesg, and lspci -vvnn

According to /proc/interrupts irq 16 is for eth0, however sudo lspci -vvnn indicates that irq 16 is for the ethernet card, eth0, as well as the modem. I could not find any means of fixing the problem, and since everything still works properly, I'm not looking further.

As an aside, the /proc directory has a lot of other interesting information, for example /proc/cpuinfo has the processor info.

Tracker

According to https://wiki.ubuntu.com/Tracker tracker should use less than 5MB of RAM. However the daemon for tracker on my system uses about 70MB of RAM. The daemon can be disabled through System > Admin > Sessions, which is a nice utility that allows to enable and disable services. A reboot is also required. Although the functionality may be nice, I don't think I'd ever use it. Also, in general the memory foot print is a little bigger for 8.04 than 6.10, although the memory reclamation is better.

Conclusion

I like Linux more than Windows and OS X. The user interface seems much better. Also, the internals of the operating system can be configured.

The downside to Linux is that there are quite a few driver issues that cause problems. The issues are probably worse for older distributions and when upgrading between distributions. Unfortunately for a person without extensive experience, resolving the issues takes quite a bit of time, mainly spent searching on the internet for posts on linux forums about similar issues. This document is hopefully helpful in identifying the possible problems that can arise and how to address them.

There is another downside, at least for 8.04: background tasks are quite noticeable. For example tracker starts indexing, or the package manager starts doing some work.

Overall though, I much prefer to use Linux and its X interface over either Windows or OS X.

Copyright © 2008 Borys Bradel. All rights reserved. This post is only my possibly incorrect opinion.

Previous Next