Debian Post-Installation Notes

debian logo

(Note: a lot of this is no longer necessary with the latest versions, but I keep it around to remember how it's done. )

  1. Utilities
  2. Get rid of completion beep
  3. Basics
  4. Networking
  5. nVidia driver installation
  6. Fonts
  7. Printing
  8. Icewm
  9. Apache
  10. Audio Apps
  11. Video Apps
  12. Adding an encrypted partition
  13. Building a custom kernel
  14. Utilities


    Apt-file tells you what package a file is in. You can search by string or regexp.

    # apt-get install apt-file
    # apt-file update

    rename note

    On Gentoo, this worked like a Unix command which understood globs:

    rename 'Bot6WD 0' Bot6WD_0' *

    On Debian, it is a perl script that works like SED:

    rename 's/Bot6WD 0/Bot6WD_0/' *

    Get rid of completion beep

    Very annoying. And very simple:

    modprobe -r pcspkr

    To make it permanent, edit /etc/modprobe.d/blacklist and add:

    blacklist pcspkr


    Make sure you add ~/bin to $PATH. Since you want this to be read by ssh and by xsession logins (which don't read .bash_profile) make sure this goes in .bashrc

    # This file is sourced by all *interactive* bash shells on startup,
    # including some apparently interactive shells such as scp and rcp
    # that can't tolerate any output.
    export PATH=$HOME/bin:$PATH
    # Test for an interactive shell.  Programs like scp and rcp only read
    # .bashrc (not .bash_profile). There is no need to set anything past
    # this point for scp and rcp, and it's important to refrain from
    # outputting anything in those cases.
    if [[ $- != *i* ]]; then
            # Shell is non-interactive.  Be done now
    # Shell is assumed to be interactive beyond this point.
    # It is okay to produce output
    umask 022

    You want to set the locales using:

    dpkg-reconfigure locales

    To tell what kind of filesystem is on a partition use file:

    file -s /dev/sdd1

    Login shells read .bash_profile, so make sure it has at least this:

    ## NOTE: logging on via xdm/gdm/kdm does NOT source this file, only
    ## .bashrc So, put the environment exports in .bashrc *before* the
    ## check for an interactive shell. (jkc)
    # This file is sourced by bash for login shells, including ssh
    # sessions. The following line runs your .bashrc and is recommended by
    # the bash info pages.
    [[ -f ~/.bashrc ]] && . ~/.bashrc


    Define a static alias by editing /etc/network/interfaces

    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet dhcp
    # The alias 
    auto eth0:1
    iface eth0:1 inet static

    Restart the network interfaces:

    ifdown eth0
    ifup eth0
    ifup eth0:1

    Since I'm using dnsmasq for local DNS caching and nuisance URL filtering, I my machines to inform DHCP of their names. Do this by editing /etc/dhcp3/dhclient.conf:

    ###jkc uncommented and set:
    send host-name "";
    ###jkc removed "host-name" from request list

    Debian doesn't install the SSH daemon by default, so

    apt-get install ssh

    nVidia driver installation

    GeForce 7600 GS board

    nVidia drivers are non-free and usually obtained from their downloads section of their website. However, it doesn't install the modules in the right places on a Debian system so that after every reboot it needs to be reinstalled (the install loads the modules into memory which allows it to operate). One of the Debian nVidia package maintainers worked out a procedure to properly install the nVidia drivers on a Debian system. I briefly summarize it here:

    • Remove all traces of the NVIDIA modules with its --uninstall flag
    • Make sure /usr/src/linux points to your running kernel
    • # aptitude update
      # /etc/init.d/gdm stop
      # aptitude install module-assistant
      # m-a prepare
      # m-a update
      # m-a a-i nvidia  --OR--  # m-a a-i nvidia-legacy
      # aptitude install nvidia-xconfig
      # nvidia-xconfig
      # modprobe nvidia
      # /etc/init.d/gdm start
    • Make sure users are in video group to use 3d apps

    Kernel upgrades and nVidia driver upgrades will require repeating the m-a through depmod steps again.

    GeForce MX/MX 4002 board

    I used the new consolidated 'heritage' driver set from the nVidia website: and their installer w/o a problem

    apt-get install linux-kernel-headers


    • The kernel-headers install is only necessary if you haven't built your own kernel. If you have, you already have them.
    • Nvidia's installer died at first on my custom kernel. I had to turn off nvidiafb support in the kernel, rebuild it, then boot off the new kernel. It wasn't enough to just rebuild it. When it finally ran all the way, it still spewed out some ncurses complaints and garbage, but only warnings. Weird, but works.


    Add fonts

    Do an aptitude search on both "ttf" and "font" is the best way. Make sure you have the contrib repository added to /etc/apt/sources.list. For example:

    deb stable contrib

    Install some fonts:

    apt-get update
    apt-get install xfs
    apt-get install msttcorefonts cabextract x-ttcidfont-conf
    apt-get install xfonts-terminus xfonts-terminus-oblique
    dpkg-reconfigure x-ttcidfont-conf
    fc-cache -fv

    Installing fonts from scratch

    Make directories to put any truetype fonts in:

    mkdir /usr/share/fonts/truetype/myfonts
    cp [fonts] /usr/share/fonts/truetype/myfonts

    Regular fonts go in /usr/share/fonts/X11/. For example, profont is essential. Get it from . As root:

    cd /usr/share/fonts/X11/
    tar xvfz profont-x11.tar.gz
    cd profont-x11

    Run the following to rebuild the font cache:

    fc-cache -fv

    Edit /etc/X11/xorg.conf and add the added (any any missing) FontPath's:

    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" 
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
    FontPath "/usr/share/fonts/X11/profont-x11/"

    Also need to edit /etc/X11/fs/config and prepend to the catalogue:

    catalogue = /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/,/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID/,...

    Need terminus and profont. Terminus goes in /usr/X11R6/lib/X11/fonts/local which also needs to be prepended to the above catalog.

    Restart both xfs and X:

    /etc/init.d/xfs restart
    /etc/init.d/gdm restart


    Edit /usr/X11R6/bin/startx and make sure this line is right:

    defaultserverargs="-dpi 96"

    Verify your resolution by running:

    xdpyinfo | grep resolution

    It wants to be 96x96. The other place to adjust it is in xorg.conf Monitor section. Use this line:

    DisplaySize 337.5 270.0

    Adjust the two dimensions until you get it right. This is very important - when its right things just snap sharply into place, and even a tiny bit off they look mediocre.


    • fc-list will list all available font faces
    • fc-list :lang-hi lists all Hindi language font faces.
    • xfontsel will let you see if they're accessible and what the ./Xdefault strings look like.

    More notes:

    From a Debian forum article:

    "I was able to obtains fonts ready to go by apt-get xfonts-dosemu. 
    This installs the fonts in /usr/local/share/dosemu/Xfonts
    The fonts are:
    vga10x20-cp866.pcf.gz  vga11x19.pcf.gz  vga8x19.pcf.gz    vga.pcf.gz
    vga10x24.pcf.gz        vga12x30.pcf.gz  vga-cp866.pcf.gz
     From there it was just a case of running the programs:
    mkfontdir - create an index of X font files in a directory
    fc-cache -f -v
    xset - set user preferences for X
       see xset fp rehash to reset the font paths to current value.


    apt-get install cupsys cupsys-driver-gutenprint foomatic-db-gutenprint foomatic-filters \
                  fontconfig libtiff4 libfreetype6 kghostview
    apt-get install dhcp3-client samba samba-common smbclient

    The last one is only needed for printing to Windows-hosted printers. At home, I used for the Workgroup/domain and said 'No' to dhcp wins info or whatever the question was. The rest was straight-forward. Here is the uri info format:


    (Note to self: never buy an Epson printer again. After I month of disuse I end up having to throw all 6 of the ink cartridges away and replacing them and still having to burn through half the ink to get the nozzles cleaned. After a use up my ink supplies - its going in the landfill. I'll by money way ahead printing stuff at Kinko's. )



    Remember that chmod +x .xsession .xinitrc is required for either to work properly. Under GDM ~/.xsession is read, other desktop managers read .xinitrc apparently.

    Here is what the ~/.icewm/menu should look like:

    prog "rxvt" - rxvt -sl 5000
    prog "aterm" - aterm
    prog "gterm" - gnome-terminal
    prog "epiphany" - epiphany
    prog "firefox" - firefox
    prog "thunderbird" - thunderbird
    menu "Sound" - {
    	 prog "Envy24" - envy24control
    	 prog "audacity" - audacity
    	 prog "Rhythmbox" - rhythmbox
    	 prog "audacious" - audacious
    	 prog "gxine" - gxine
    	 prog "tvtime" - tvtime
    	 prog "camstream" - camstream
    menu "Dev" - {
           prog "xterm" - xterm
           prog "eterm" - Eterm
           prog "emacs" - emacs

    And to get focus behavior and the number of workspaces set up, and all kinds of other stuff, here is my ~/.icewm/preferences:

    Also may want to install DFM (a file manager)


    apg-get install apache2
    • apache2ctl configtest Parses the complete configuration and writes warnings and errors.
    • httpd -S is supposed to dump how apache parsed the configs w/substitutions, but I can't find httpd yet.

    Audio Apps

    apt-get install alsa-tools alsa-tools-gui audacity audacious gxine cdparanoia
    apt-get install cdrecord cdrdao dvd+rw-tools xmms2
    • envy24control is included in alsa-tools-gui (the Ice1712 mixer panel)
    • growisofs is in dvd+rw-tools
    • Xmms is deprecated (requires GTK+1.2 and is broken) and Xmms2 works on a server client model that no one seems to like. So, audacity is the defacto replacement. I haven't been able to get it to play audio CDs, but it works fine for everything else. The default skin sucks, so get some others and put them in ~/.audacity/Skins/
    • Mplayer had no sound until I remembered I had previously had to add a line to the config to force it to use /dev/dsp1. Commenting out that line restored sound to Mplayer.

    Video Apps

    This is all best handled at this point by synaptics. Augment the repositories to include the full set and then parse the list.

    I used to install these - not sure which of these are still needed since Lenny has been out:

    aptitude install mplayer tvtime camstream gxine acroread
    aptitude install avidemux dvdrip grip ffmpeg k9copy lame mencoder xmms-mp4 xvidcap

    Adding an encrypted partition

    Fdisk the partition if necessary, then run

    cryptsetup luksOpen /dev/sdb1 sdb1_crypt
    mkreiserfs /dev/mapper/sdb2_crypt
    mount -t reiserfs /dev/mapper/sdb1_crypt /mnt/cdisk
    # to unmount:
    umount /mnt/cdisk
    cryptsetup luksClose /dev/sdb1

    This requires root to mount and unmount the disk. Users can do it using pmount:

    sudo aptitude install pmount
    sudo nano /etc/pmount.allow
    # add: /dev/sdb1
    # add user to plugdev group
    sudo adduser jcunningham plugdev
    # mount in userspace to /media/sdb1
    pmount /dev/sdb1

    The drive will no doubt initially belong to root.

    Building a custom kernel

    (Note: this is out of date at this point)

    As root:

    apt-get update
    apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential
    cd /usr/src
    gpg -v wget

    If you don't have the's PGP signature on your key ring, you can get it here . Unpack the kernel and edit it's configuration, first importing your previous one:

    tar xvfj linux-2.6.24.tar.bz2
    cd linux-2.6.24
    cp /boot/config-2.6.18-5-486 .config
    make oldconfig [...answer update questions...]
    make menuconfig [...change to suit...]
    make-kpkg clean
    fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_image

    Success will look like:

    This is kernel package version 10.067.

    Install the following backports (note: backports are programs from later versions compiled for an earlier version environment):

    apt-get install module-init-tools initrd-tools procps

    Install new kernel:

    cd ../
    dpkg -i linux-image-2.6.24_custom.1.0_i386.deb
    dpkg -i linux-headers-2.6.24_custom.1.0_i386.deb

    A note said: "You shouldn't call /sbin/update-grub. Please call /usr/sbin/update-grub instead!" (curious). The ramdisk image "initrd.img-2.6.24-custom" has been build, and grub/menu.lst modified accordingly. In theory, you're ready to try booting off the new kernel.

    Building by hand

    (Note: this is out of date at this point)

    apt-get install yaird
    make all
    make modules_install
    make install
    mkinitrd.yaird -o /boot/initrd.img-2.6.24 2.6.24

    I could have run update-grub to get the new stanzas inserted into /boot/grub/menu.lst, but I didn't. I hand edited it this way:

    title = Debian 2.6.24 freehand
    root (hd0,0)
    kernel /vmlinuz-2.6.24 root=/dev/sda4

    This works with IDE drives. With SATA drives I had to load through the ramdisk:

    title = Debian 2.6.24 via ramdisk
    root (hd0,0)
    root (hd0,0)
    kernel /vmlinuz-2.6.24 root=/dev/sda4 ro
    initrd /initrd.img-2.6.24


    1. Falko's Howto Debian method of building kernel
    2. Falko's Howto Vanilla method of building kernel