February 24, 2005

Ubuntu Linux 5.04

This is a quick summary of the installation of Ubuntu Hoary Hedgehog (5.04) on the following laptop: HP zv5405us. This was first installed pre-relase, so there are expected to be a number of issues...


Early days (it's been installed for less than 24 hours), but so far, I'm VERY impressed with Ubuntu. Disclaimers:
- Nothing much extra (wi-fi, suspend, 3D video) has been installed - yet.
- I had to use 5.04 ("unstable" release) instead of the current (4.10), as hardware detection on the latter wasn't so good.

But, that being said, it detected and configured the correct screen size (1280x800), configured sound correctly. And the little that I've worked with apt so far has been a joy (used this article to install MP3 playback support and K3B - will do more later).


So I guess I'm three weeks down the line now, and still loving Ubuntu (should mention that I'm using the AMD64 version - figure I might as well be using those extra 32 bits). Getting to know apt has been great. The one thing I still am scratching around for is how to query installed packages. Sure it's perfectly obvious for those who know.

So, of the items that I wanted to get working, I have the following:

WiFi: this was the easiest, I would say. Downloaded ndiswrapper 1,1 from sourceforge. Untarred the file, changed to the apt directory and then ran sudo make && sudo make install. Then ran ndiswrapper -i netbc564.inf (my Windows driver file, courtesy of linuxant). This basically leaves me in a state where I can load the wifi drivers with "sudo modprobe ndiswrapper". Since I don't have Wifi at home and am only planning on using it when I'm away from home, I haven't added this to any start up scripts. It'll be a manual job, which is the way I prefer it. I have also installed the excellent gtkwifi package which is a nice gnome panel compatible way of managing wireless connections. Just search for it on sourceforge.

DVD: added the nerim packages and installed libdvdcss2. Then installed xine, which is my DVD player of preference. I did also install Mplayer, but I was having (and am still) some weird output issues with this. Not sure what's going on there. In any case, the one thing that's great about Xine is the "xine-check" utility. This gave me the hint that dma wasn't enabled on my DVD drive. Added the apt line (as suggested by xine-check) to /etc/hdparm.conf, made sure hdparm was being run at startup (ln -s /etc/init.d/hdparm /etc/rc,d/rc2.d/S90hdparm) and it's all good.

NVIDIA: this was a pain in the ass. And I thought it would be the easiest of them all. Basically, the way I think I fixed this (a little voodoo was involved here, as I'm still not entirely sure how I got it working), was downgrading to the kernel, installing nvidia-glx, kernel-headers and adding the following options to xorg.conf:

Section "Device"
Identifier "NVIDIA Corporation NV17 [GeForce4 440 Mac/GeForce 440 Go 64M]"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "IgnoreEDID" "1"

(Well, actually, the only thing I added there was the IgnoreEDID parameter. Also I added the following to /etc/modprobe.d/nvidia-kernel-nkc (you can add it to whatever file in that folder begins with nvidia).

options nvidia NVreg_Mobile=0

It seems this is needed for Nvidia's drivers for this particular type of graphics card for versions 6629 and also 7167 (x86_64).


Installed the Java plugin for Firefox:

added "deb ftp://ftp.tux.org/java/debian/ unstable non-free" to my "/etc/apt/sources.list".

"sudo apt-get update"
"sudo apt-get install j2re1.4"
"sudo ln -s /usr/lib/j2se/1.4/jre/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib64/mozilla-firefox/plugins/"

Good to go!!


Couldn't resist a screenshot.


I have a bit of catching up to do....

Changed to amd64-k8 kernel (still 2.6.10-5) as I discovered this one is more suited to my machine. Apparently the -generic is just that, whereas -k8 is tailored for single CPU amd64 systems. Here's how I did it:

sudo apt-get update
sudo apt-get install linux-image-2.6.10-5-amd64-k8 linux-headers-2.6.10-5-amd64-k8 linux-restricted-modules-2.6.10-5-amd64-k8
sudo reboot

X doesn't come up - nvidia needs updating. As it happened for me, there was an nvidia-glx package pending, so I was able to just do a standard update as below and then reboot and everything came up great. You may need to do a force reinstall to make sure it works with the new kernel
sudo apt-get update
sudo apt-get upgrade

That's it. I'm now on the -k8 kernel, and am happy to report that in combination with the nvidia upgrade from 6629 to 7167 I'm now getting an additional 300 fps in glxgears (2000 is my avg at the moment).

Amarok. Installed it. Love it.


Simply added the following to /etc/apt/sources.list

# Debian Pure64
deb http://debian-amd64.alioth.debian.org/debian-pure64 sid main contrib non-free
deb-src http://debian-amd64.alioth.debian.org/debian-pure64 sid main contrib non-free

sudo apt-get update
sudo apt-get install gkrellm

Very happy...


This post is getting very long, but I think it's worth keeping it on one page where possible. Apologies if it's a little cumbersome to read.

Got 32bit chroot installed, and as a result have 32bit version of firefox, flash plugin (from Macromedia) and Realplayer (with Realplayer plugin for Firefox). Also gives me the ability to install any 32bit apps that aren't 64bit compatible. Would prefer to be able to run 64bit where necessary, so I'm just using this for those that I _can't_ get working on 64bit.

I followed Crad's excellent how-to on the Ubuntu forum. Details below in case that's not available for any reason.

Step 1:

* sudo apt-get install dchroot debootstrap
* sudo mkdir /chroot/
* sudo gedit /etc/dchroot.conf
-- Add this line: hoary /chroot
* sudo debootstrap --arch i386 hoary /chroot/ http://archive.ubuntu.com/ubuntu
* sudo chroot /chroot/
* dpkg-reconfigure locales

Step 2:
In another terminal window (or by existing chroot):

* sudo gedit /chroot/etc/apt/sources.list
* Add the following lines:
-- deb http://archive.ubuntu.com/ubuntu hoary main restricted universe multiverse
-- deb http://security.ubuntu.com/ubuntu hoary-security main restricted universe multiverse

Step 3:
In your chrooted environment (chroot /chroot):

* apt-get update ; apt-get upgrade

Step 4:
In another terminal window (or by existing chroot):

* sudo cp /etc/passwd /chroot/etc/
* sudo cp /etc/shadow /chroot/etc/
* sudo cp /etc/group /chroot/etc/
* sudo cp /etc/sudoers /chroot/etc/
* sudo cp /etc/hosts /chroot/etc/
* sudo gedit /etc/fstab
* Add the following lines:
-- /home /chroot/home none bind 0 0
-- /tmp /chroot/tmp none bind 0 0
-- /dev /chroot/dev none bind 0 0
-- /proc /chroot/proc proc defaults 0 0
-- /media/cdrom0 /chroot/media/cdrom0 none bind 0 0
* sudo gedit /usr/local/bin/do_dchroot
* Add the following:
-- #!/bin/sh
-- /usr/bin/dchroot -d "`echo $0 | sed 's|^.*/||'` $*"
* sudo chmod 755 /usr/local/bin/do_dchroot

Step 5:
[You may need to reboot, or sudo mount -a to make sure the mounts are correctly configured]
In a new terminal:

* dchroot -d
* sudo apt-get install synaptic
* sudo ln -s /usr/sbin/synaptic /usr/sbin/synaptic32
* exit
* sudo ln -s /usr/local/bin/do_dchroot /usr/local/bin/synaptic32
* sudo synaptic32

Now I can call synaptic32 for GUI install of 32bit apps. I installed Firefox and Flash Plugins, but for some reason it still wasn't working. Turns out I needed to install libmu6 and then it was all good. If you're having issues, start it up from a console and examine the error messages associated with plugins.

To get to a 32bit shell for manual install of 32bit apps, "dchroot -d". I used this to install RealPlayer10, and then did "sudo ln -s /usr/local/bin/do_dchroot /usr/local/bin/realplay" so that I can now call realplay and have it run the 32bit realplay.


Still to do:
- Quake3 (32bit using chroot, as it doesn't seem to work in 64bit)
- Win32codecs so I can run Quicktime, AVI, etc. (again, using 32bit chroot)
- Suspend

Some comments:
2.6.11 kernel seemed to slow down my touchpad - making it not so user friendly at all. This may just be early versions of this, so don't let that put you off necessarily.

Linux On Laptops

Posted by mthaddon at February 24, 2005 09:16 AM