Post

Debian is back...

Updated Nvidia installation howto on May, 22nd 2012

…on my computer! What is (in my opinion) the greatest of all operating systems is back: Debian 6.0 aka “squeeze” was released last weekend. Of course as always with new Debian releases - compared to other recently released Linux distributions - the software which comes with squeeze is rather “old”, i.e.: Linux kernel 2.6.32, Gnome 2.30, KDE 4.5, OpenOffice 2.3. That’s the price you have to pay for a very stable operating system. For the first time the default installation media has no “non-free” software on board. This might be tricky for those who depend on non-free firmware to get W-LAN running! (In this case see the Debian documentation here.)

I really love Debian and in fact prefer it over Ubuntu. Though I tend to run the latter as it comes with more recent software. ;-) But now I couldn’t resist and as I was just recovering from a nasty flu I had some spare time… I was running squeeze (with KDE as desktop) on my old Acer laptop for quite a while before it’s stable release and it worked pretty good. I was a bit worried though if all hardware of my new Samsung R780 laptop would work with squeeze - but hey: what the heck, let’s try!

I downloaded the i386/amd64 net install image. If you don’t need an installation media for i386 and amd64 or don’t want a net install you can also download CD images which provide offline installations (though I’d recommend having a working internet connection during the installation). By the way, you don’t need to download the complete set of CDs (which are 52 at it’s number) or the DVDs: the CD numbered “1” is just fine. If you don’t like Gnome you may also download an alternate CD “1” which then defaults to KDE or XFCE/LXDE.

If you opted for the net install you may also change the default desktop by pressing “Tab” once you reach the CD boot menu. Then type

desktop=<DESKTOP>

where is "kde", "xfce", etc... (without quotation marks of course). I just took the default text based installation then. The GUI installation is very much the same with the exception that you may use a mouse. The installation process is very straight forward and shouldn't be a problem even for new comers. It takes a little longer as you might be used to from Ubuntu. If you have a working internet connection you will end up with an absolute up-to-date installation as the installer takes care of outdated packages already. Of course, if you're running the net install it's mandatory to have a working internet connection and downloading all packages took the installer about 20 mins in my case. And I'm very happy to report that both network interfaces of my Samsung R780, the wireless _Atheros AR9285 adapter_ as well as the _Marvell 88E8059 PCI-E Gigabit Ethernet Controller_ did work out of the box. Once the installation process has finished it'll reboot your computer and you're done!

Now for the tweaking…

Video drivers (Nvidia) - Updated May, 22nd 2012

If you have a Nvidia based video adapter it’s likely Debian installed the nouveau driver. Though I’m a fan of open source I prefer the closed source proprietary driver for my Nvidia GT330M video adapter. Installing it is quite easy:

First install some packages:

  • linux-headers-2.6-amd64 [amd64] or linux-headers-2.6-686 [i386]
  • build-essential
  • xserver-xorg-dev
  • pkg-config
  • ia32-libs [amd64]

Now download the Nvidia driver (by the time of writing version 260.19.36 295.53) from the Nvidia homepage and make it executable:

1
$ chmod +x /path/to/NVIDIA*.run

Next we’re going to blacklist the nouveau driver by running as root: # echo "blacklist nouveau" >> /etc/modprobe.d/nouveau-blacklist.conf Now reboot and once back Go to console by hitting Ctrl + Alt + F2, login as root and stop the display manager by

1
$ /etc/init.d/gdm3 stop

if it’s the default Gnome display manager. Change “gdm3” to “kdm” if you’re running KDE.

Now remove nouveau by # apt-get purge xserver-xorg-video-nouveau libdrm-nouveau1 Reboot again and again go to console by hitting Ctrl + Alt + F2, login as root, stop the display manager again and then install the Nvidia driver by: <del># /etc/init.d/gdm3 stop</del>

Now simply run the Nvidia installer:

1
2
$ export CC=/usr/bin/gcc-4.3
$ /path/to/NVIDIA*.run

It’ll complain about nouveau and will offer to generate an blacklist configuration file. Accept that offer but do not reboot immediately. Instead we’ll build a new initrd first and then reboot:

1
2
3
$ update-initramfs -k `uname -r` -d
$ update-initramfs -k `uname -r` -c
$ shutdown -r now

Once rebooted your login screen will look quite ugly (running with default vesa driver…), so once again go to console by hitting Ctrl + Alt + F2, login as root, stop the display manager by

1
$ /etc/init.d/gdm3 stop

…and run the installer again:

1
2
$ export CC=/usr/bin/gcc-4.3
$ /path/to/NVIDIA*.run

Answer “yes” to install the 32bit compatibility libraries [amd64] and “yes” to setup xorg.conf (if you re-install the driver, say “no” here). If you don’t like the Nvidia logo being displayed once X starts put this line into the “DEVICE” section of /etc/X11/xorg.conf:

1
Option     "NoLogo" "True"

Might be optional: recreate initrd as above.

Now reboot and the new Nvidia driver will be running! Remember: it might be necessary to reinstall the Nvidia driver once kernel and/or xorg packages get updated!! (I tend to uninstall it first by running “/path/to/NVIDIA*.run –uninstall” and then install it again.)

Grub

I really appreciate that Debian doesn’t hide the boot messages by using plymouth or stuff like that, but once you get rid of the nouveau driver the boot screen has this ugly big font. To make this a bit nicer add this line to /etc/default/grub:

1
GRUB_GFXPAYLOAD_LINUX=1280x800x32

Be aware though that the resolution has to be supported by your video card/display! The above works for Samsung R780. Also, if you don’t like the font type switching during boot up, run (as root):

1
$ dpkg-reconfigure console-setup

Leave everything at its default except the last option (I think it’s the third) and change this to something like “Don’t change boot-/kernel font” (I only know the German menu items).

To get rid of grub entries which point to recovery partitions just do (as root):

1
$ chmod -x /etc/grub.d/30_os-prober

Create /etc/grub.d/35_windows with the following entry:

1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh -e
echo "Adding 'Windows 7' on /dev/sda2" >&2
cat << EOF
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set b43a66703a663012
chainloader +1
}
EOF

ATTENTION: Please have a look at your current /boot/grub/grub.cfg first and replace the parts by the correct stuff from your current configuration!!!

Then run

1
$ update-grub

Done.

Editor

The default editor seems to be nano, which I dislike. So, if for example you run visudo you’ll be presented with nano and not vi… To change this you might want to install vim first and then change the default editor to vim.basic:

1
2
$ apt-get install vim
$ update-alternatives --config editor

Also, if you like to have vi’s syntax highlighting, create “.vimrc” in your home directory with following content (found that here, German):

1
2
3
4
set nocompatible
set nopaste
set pastetoggle=<f11>
syn on

udev rules for WBT-201

In order to get my GPS logger running for non root users I had to create a little udev rule (like I had before). It seems the syntax changed as I saw warning messages during next reboot due to outdated syntax. I had to replace “SYSFS” by “ATTRS”. So, /etc/udev/rules.d/90-wintec.rules now looks like this:

1
2
# rules for Wintec WBT-201 GPS device
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0666"

Theme

Debian now comes with a decent set of GTK themes and if you don’t like the default Cleanlooks I’d recommend installing “shiki-colors”. If you’re running KDE and want to make the GTK applications look nicer, install “gtk-chtheme” and “qtcurve”. Then run gtk-chtheme and activate qtcurve.

Browser

If you’re new to Debian you might wonder: where’s Firefox, where’s Thunderbird?? Well, due to some trouble with the guys at Mozilla, Debian had to rename the Mozilla stuff. So:

Firefox -> Iceweasel Thunderbird -> Icedove Lightning -> Iceowl

Just install those and you’re fine. They’re 100% compatible to the “originals”. You can also install Google’s Chrome. I had to manually add two packages first:

1
$ apt-get install libcurl3 libssh2-1

Then go ahead and download the deb package from Google and install by

1
$ dpkg -i /path/to/google-chrome*.deb

Non-free software

Unlike Ubuntu, Debian does only offer free software with it’s default configuration. If you’d like to install non-free software like Adobe’s flashplayer you need to activate the “contrib” and “non-free” repositories (in “Ubuntu terminology” this would be “universe” and “multiverse”.). To do so, just add “contrib non-free” to each line of /etc/apt/sources.list, followed by

1
$ apt-get update

That’s about it! :-)

This post is licensed under CC BY-SA 4.0 by the author.