Kubuntu Install Notes

I built a new PC recently and installed Kubuntu 6.06 (Dapper) on it. This page brings together some notes that I made during the process.

Last Updated: 12 November, 2007.

First off, the specs of the machine:

or for the inside view:

$ lspci
0000:00:00.0 Host bridge: Intel Corporation 945G/P Memory Controller Hub (rev81)
0000:00:01.0 PCI bridge: Intel Corporation 945G/P PCI Express Graphics Port (rev81)
0000:00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
0000:00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
0000:00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
0000:00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
0000:00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCIController (rev 01)
0000:00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
0000:00:1e.2 Multimedia audio controller: Intel Corporation 82801G (ICH7 Family) AC'97 Audio Controller (rev 01)
0000:00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
0000:00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
0000:00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controllers cc=IDE (rev 01)
0000:00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
0000:01:00.0 VGA compatible controller: nVidia Corporation: Unknown device 0392 (rev a1)
0000:02:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

As I said in the specs above, my plan for this machine was to have the two SATA HDDs in a RAID-0 setup. I’ve never setup a RAID before so I did a fair amount of googling before starting the install. Based on suggestions found online, I used the Kubuntu Alternate Install iso which uses the text based debian-installer.

As you might have guessed from the specs listed above, this motherboard employs an Intel 945P chipset which boasts ‘RAID support’ Fact is, this is not full blown RAID support but needs co-operation from software drivers. Read this FAQ. If you wanted Windows XP to see your raid partitions too, you’d use dmraid which leverages the chipset’s RAID support. Since I have no plans of installing Windows on this machine, I decided to let Linux completely manage my RAID array via mdadm.

I found a good visual guide for creating RAID partitions using the debian-installer.

There were a couple of false starts to the installation:

  1. /, /home & swap - all partitions under raid and reiserfs. Didn’t work.
  2. separate /boot partition as ext2 - all raid. Didn’t work.
  3. /boot as regular partition (/dev/sda1), rest as raid. Worked!

After that, the installation proceeded in a typically uneventful manner.

Now let me describe the post install configuration that you can replicate to imitate my system’s setup!

Edit /etc/apt/sources.list to add universe, multiverse, plf and updated versions of kde, koffice and amarok

$ cat /etc/apt/sources.list
deb http://sg.archive.ubuntu.com/ubuntu/ dapper main restricted multiverse universe
deb http://sg.archive.ubuntu.com/ubuntu/ dapper-updates main restricted multiverse universe
deb http://security.ubuntu.com/ubuntu dapper-security main restricted multiverse universe
deb http://sg.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

## Commercial software like realplayer packaged by Canonical
deb http://archive.canonical.com/ubuntu dapper-commercial main

## PLF is sadly dead. Medibuntu has taken their place
#deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free

## Medibuntu - possibly infringing stuff like libdvdcss2
deb http://medibuntu.sos-sts.com/repo/ dapper free non-free

## https://wiki.kubuntu.org/KubuntuAdditionalRepositories
deb http://kubuntu.org/packages/koffice-stable dapper main
deb http://kubuntu.org/packages/amarok-stable dapper main
deb http://kubuntu.org/packages/kde-stable dapper main

Add Jonathan Riddel’s key. Instructions here.

Then start with the essentials.

$ apt-get install build-essential linux-686-smp firefox mplayer-nogui mozilla-mplayer w32codecs \
    flashplugin-nonfree libdvdcss2 nvidia-glx yakuake
$ apt-get install sun-java5-bin sun-java5-plugin
$ update-alternatives --config java
$ nvidia-glx-config enable

Did you notice I installed yakuake? Yes, it is essential :-) Anyway, now reboot & then purge the 386 kernel packages. Followed by:

$ apt-get dist-upgrade

While the system upgrades itself, configure Firefox to your liking and install extensions you use. I installed Adblock, Google browser sync, Flashblock & IE View.

The onboard sound was detected and the correct modules were loaded. However, no sound! In KDE arts config, choose ALSA sink, 48K sampling @ 16bit and then use kmix to set up 6 channels. That should take care of system sounds, browser sounds, etc. For amarok-xine, choose 5.1 channel as speaker arrangement. BTW, it appears that there is no need for dmix, et al. with this sound chipset.

For my Dell widescreen, I added monitoraspect=16:10 to ~/.mplayer/config. I am told xine auto-detects this. Speaking of xine, I had to install libarts-xine just to get thumbnails of my videos in Konqueror.

To plays DVDs with the Dolby 5.1 audio track (usually with aid=128), use:

$ mplayer -channels 6 -aid 128 dvd://

For some reason which still eludes me, I can get only 3.1 channels from the system. The rear speaker channels are lost in translation somewhere! Anyway, I am not too concerned about this - I’ve just rigged my sound system to use the rear speakers as output for the cable TV’s audio; TV’s component video goes to the Dell widescreen.

Now we come to configuring this system to share some stuff over NFS. This is again something I’ve set up for the first time and it was way more easy then I expected it to be! First thing I tried was to use KDE’s sharing configuration module ($ kcmshell fileshare). This was completely broken. When the module loads, you’ll find all widgets disabled. So you supply password for admin access. The widgets are still disabled!! Maybe it is broken only in the unsupported KDE 3.5.3 that I upgraded to.

Anyway, time to drop to the command line.

Server side (cellar):

$ apt-get install nfs-kernel-server
$ cat /etc/exports
/export        dungeon(ro,fsid=0,insecure,no_subtree_check,sync,all_squash,anonuid=1000,anongid=1000)
/export/home   dungeon(rw,sync,nohide,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/export/share  dungeon(rw,sync,nohide,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
$ 
$ mkdir -p /export/home /export/share
$ mount --bind /home /export/home
$ mount --bind /share /export/share
$ /etc/init.d/nfs-kernel-server restart

And to automount on the next reboot:

$ cat /etc/fstab
/dev/sda1       /boot           ext2        defaults        0       2
/dev/md0        none            swap        sw              0       0
/dev/md1        /               reiserfs    defaults        0       1
/dev/md2        /home           reiserfs    defaults        0       2
/dev/md3        /share          reiserfs    defaults        0       2
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0
/home           /export/home    none        bind            0       0
/share          /export/share   none        bind            0       0

Client side (dungeon) where we use AutoFS:

$ apt-get install autofs nfs-common

Then uncomment the line with '/net /etc/auto.net' from /etc/auto.master

Finally:

$ /etc/init.d/autofs restart
$ cd /net/cellar/
$ ls

If everything worked well, you should see all shares listed! Of course, this assumes you’ve already setup /etc/hosts on both machines.

That’s the major stuff. What follows are some miscellaneous bits of configuration. I’ll try to update this part on an ongoing basis.


Add the following text to your ~/.kde/share/config/konquerorrc so that clicking on a tab with the middle mouse button will close it.

[FMSettings]
MouseMiddleClickClosesTab=true

Launching GUI apps from the commandline would throw errors like:

X Error: BadDevice, invalid or uninitialized input device 154
  Major opcode:  143
  Minor opcode:  3
  Resource id:  0x0
Failed to open device

The fix was to remove the unwanted wacom tablet config lines in xorg.conf


Doom 3 took some configuring to get up and running properly. For the video, I had to add the following to the Doom config file.

seta r_mode "-1"
seta r_customHeight "1050"
seta r_customWidth "1680"
seta r_aspectRatio "2"

Alternatively, you can set these values using the Doom console. Supposedly, one can set r_aspectRatio as “3” which corresponds to a 16:10 aspect ratio (which is what my Dell 20” is) but it didn’t work for me.

For the sound, initially I got very metallic, trance like music from the game. I had to set up some special alsa devices to get proper sound. I added the following to my ~/.asoundrc :

pcm.d3dmixer {
   type dmix
   ipc_key 1989
   slave {
      pcm  {
         type hw
         card 0
      }
    period_size 5000
    periods 128
   }
   bindings {
      0 0
      1 1
   }
}

pcm.doom3pcm {
   type asym
   playback.pcm {
      type softvol
      slave.pcm {
         type plug
         slave.pcm "d3dmixer"
      }
      control {
         name "Doom3 Volume"
         card 0
      }
   }
   capture.pcm {
      type plug
      slave.pcm "dsnoop:0"
   }
}

Then, make Doom 3 use this device by either running with the command line option +set s_alsa_pcm doom3pcm or by adding the following to the Doom config file:

seta s_driver "best"
seta s_alsa_pcm "doom3pcm"

All the Doom 3 config info was gleaned from the ever helpful Gentoo wiki.