A Custom Debian Build

If you don't want to get dirty with building a debian box from the net-install, I highly suggest crunchbang as this custom build is similar but will be lighter, quicker, and more minimalistic than cb.

As mentioned before, we are starting with a debian net-install so grab the latest for your hardware. I don't like burning cd's for every distro install so I use unetbootin to burn the image to a partitioned usb drive. Now you can simply plug the usb drive in, boot your box (make sure to adjust your bios to allow for booting from usb devices) and we are ready to install!

Installing Debian

The installer is pretty basic, you do have a GUI and console based installer, to be honest there's not much difference as the console installer is very nice so I use it. Run through the installer selecting things as you need/want. I always create the following partitions in my setups:

Partition Format Size Type Notes
/boot ext4 120mb primary 120mb is plenty of space for me as I usually only keep 2-3 kernels around
swap swap 2gb primary minimum of 2gb, a good rough estimate is to make this the same (or larger) as the amount of RAM you have as you will need it that large to hibernate if you use that
/ ext4 6gb primary I typically go 8gb but I have a 32gb SSD drive so I went 6 and have 2.6gb leftover after everything I need is installed
/tmp ext4 1gb extended I like to separate tmp out (I've ran into issues where this actually saved me from a saturated disk)
/home ext4 * extended all remaining space goes to home


One of the last steps of the installer is choosing the modules to install (GUI, print server, etc.). Since this is a laptop I choose the laptop module and of course we need common tools module, I uncheck all others as I'll install all needed things (such as a GUI) myself.

Switching to Sid & Setting Up Repos

To keep dradux lean and clean, I disable "suggested" and "recommended" from apt. To do this, run the following command which creates an apt.conf.d file to disable the two groups:

echo -e "APT::Install-Suggests \"0\";\nAPT::Install-Recommends \"0\";" > /etc/apt/apt.conf.d/99dradux

I like a rolling distro as I hate upgrades so the first thing I do is switch to Sid. Doing this is painless, open the /etc/apt/sources.list file in a text editor and make the following changes:

  • change all occurrences of current release (e.g. "squeeze", "wheezy", etc.) with "sid" (without quotes) also note that you do not need to change the security.debian.org and "squeeze-updates" sites as they are not available/pertinent for Sid
  • add in the multimedia repo as follows (this is not required but I use mythfrontend so I needed it, feel free to skip this step)
  • add in 'non-free' items by adding "contrib non-free" (without ") after main on the two sid lines

After you make the above changes do an update (apt-get update), upgrade (apt-get upgrade), and finally a dist-upgrade (apt-get dist-upgrade) and you will be rollin on Sid!
Note: if you do add the multimedia repo, do an apt-get install deb-multimedia-keyring after apt-get update to get the multimedia keyring (for repo authentication verification).

The Setup

Now the fun begins. Setting up your box is definitely a personal thing as you can install anything you want in any way you want. The following setup is geared for my ultralap using Openbox as the Window Manager (WM) with no Desktop Manager (DM). The following list is broken out by group (e.g. Tools) followed by a list of items (e.g. dmenu mrxvt mc). The list of items presents the name of items in the repo and are meant to be presented in a manner such that you can copy and past the list of items directly after "$ apt-get install " in a shell.

  • Security / Admin
  • Tools
    • sudo nfs-common ntp ntpdate dmenu mrxvt mc zip bzip2 curl xsltproc
  • Optional (the following items are optional dependant upon preference)
    • system-config-lvm (if you use lvm, this may be of use)
  • GUI
    • Install Xorg
      • xorg ttf-dejavu libxml2-dev menu fonts-liberation
        you may also want to consider menu-l10n
    • Install Openbox
      • openbox openbox-themes obconf obmenu arandr python3-xdg
    • Misc
      • geany numlockx keepassx
        you may also want zenity but note it pulls in a lot of extra packages
    • Bling (eye candy)
      • conky nitrogen scrot
        if you want system panel, check out tint2. if you need a login manager, I suggest slim
  • Power Management (feel free to skip if you are not using a laptop)
  • Sound
    • ALSA
      • alsa-base
        use "alsamixer" to set volume and "alsactl store" to save volume
    • Player
      • vlc
    • Get sound to work over HDMI (if needed)
  • Documents
    • PDF
      • mupdf mupdf-tools xpdf
        MuPDF is fast and light, it does not have the ability to print. I suggest printing with lp ($ lp -d "printer-name" "file-name.pdf") or you may want to use a pdf app such as xpdf that has printing capabilities.
      • flpsed
        If you need the ability to edit a pdf file (fill in form data, alter the pdf, etc.) then you can use flpsed or gimp and convert.
    • Office Suite
      • libreOffice
        • add myspell for spellcheck
        • look and feel: check out libreoffice-style-tango libreoffice-style-crystal libreoffice-style-oxygen; also see the debian wiki on libreOffice for more tips and info
  • Images
    • feh gthumb gimp
      feh is a nice, lightweight viewer, gthumb is great for organizing/managing large groups of images, and gimp for the heavy work
  • Video
    • vlc works fine for viewing nearly any video, as stated earlier, I use mythtv-frontend so
      • mythtv-frontend
  • Internet
    • Browser
      • xombrero
        firefox tends to be too bloated (primarily memory consumption; when you have several instances with multiple tabs open), due to this and other reasons I have started using xombrero and love the secure, light, keyboard driven approach of the app. xxxterm is generally the name of the app in the repos at current, xombrero is the new name for the app. I prefer to build from source to get the "open search in new tab" functionality.
      • iceweasel mozplugger vorbis-tools midori links2 luakit
        you may need icedtea-7-plugin if you need java capabilities within your browsers
        iceweasel is the unbranded version of firefox. Midori is a nice, lightweight second browser. I've also recently discovered luakit which is a highly customizable and keyboard driven webkit based browser
    • Flash
      • flashplugin-nonfree
        adobe flash, everyone hates it but its near impossible to not have it. you may want to give gnash or lightspark a try, I've had little to no success with either
        • gnash gnash-cygnal gnash-tools mozilla-plugin-gnash
        • lightspark browser-plugin-lightspark
  • Email
    • icedove iceowl-extension
      icedove is the unbranded version of thunderbird. if you already have an instance of thunderbird all setup, copy the ~/.thunderbird directory to your local directory, rename it .icedove and start icedove up, all of your accounts and email will be there!
  • Wifi (if needed)
    • rfkill
      used to see if your wireless device is turned off or on and to block/unblock (turn on/off) your wireless card
    • use lspci -v to find wireless card (I have an Intel Corporation Centrino Wireless-N 1030 (rev 34) card)
      • shortcut: lspci -v | grep Wireless
      • you should see a Network controller listed, find the chipset (for instance I have Intel Corporation Centrino Wireless-N 2200 (rev c4), 2200 is the chipset)
      • next, use apt-cache search 2200 (this is the chipset from above)
      • this should get you the firmware needed for your wireless device
      • for more info see: http://wiki.debian.org/WiFi or http://wiki.debian.org/WiFi/HowToUse
    • install firmware for your card (I used the firmware-iwlwifi firmware - install with apt-get)
    • reload the iwlagn module (or reboot) to get wlan0 interface available
      modprobe -r iwlagn ; modprobe iwlagn
    • I do not like NetworkManager and took a few minutes to learn a bit about wpa_supplicant, it is painless and easy to setup and use, check out the following for more info
    • after setting up /etc/network/interfaces and /etc/wpa.conf you'll need to restart your network daemon (/etc/init.d/network restart) and you should be good to go!
  • Printing
    • cups can handle all of my printing requirements (my setup)
  • Configure
    • Encrypted Home & Swap
      I prefer to have encrypted home directories (and therefor swap partition), if you choose disk/partition encryption or do not need/want this please skip the following
    • grab a copy of your favorite .bashrc and .profile files if you have them
      • disable truncate of bash history file and ignore dups (edit ~/.bashrc):
        # don't truncate history file
        export HISTFILESIZE=
        export HISTFILE=
    • disable root login from ssh (edit /etc/ssh/sshd_config):
      #uncomment the following line to disable root login from ssh and restart ssh
      #PermitRootLogin no
    • I use nfs to connect network shares, the nfs-common package provides the base tools, you will then need to add shares to your /etc/fstab as needed, an example:
      • serverName:/mnt/share  /media/share  nfs  _netdev,noauto,rw,hard,intr  0 0
    • I also like my primary user to have sudo access
      • adduser drad sudo
    • note: after adding groups to a user you will need to log out and back in - also note that I had to actually reboot to get sshfs working for my user
    • you may also want to copy over .conkyrc, .firefox/*, .config/openbox/* and other config files if you have them
    • Optimizations
      • Replace getty with ngetty
        • install: apt-get install ngetty
        • edit /etc/inittab
          • comment out all of the "..:/sbin/getty ... ttyX" entries
          • add the single ngetty entry of "ng:2345:respawn:/sbin/ngetty 1 2 3 4 5" directly after the commented out getty entries

You should now be set with your custom debian/Openbox box! Feel free to check out Minimalist App List article for more apps you may want/need.

Misc Info

Multimedia keys

CB Theming


Hard Drive MBR Wipe Issue

For some odd reason my SSD had issues with wiping and installing a new OS, this is the infamous MBR issue. If you install a new OS and it then fails to boot (GRUB error) you may have this issue. I remedied it with the following:

  • boot from a live cd (used cb from sd card)
  • delete all partitions from mSATA SDD (fdisk)
  • wiped drive with: dd if=/dev/zero of=/dev/sda bs=1M count=1 (note: this took .00209114 seconds at a rate of 501MB/s)
  • wiped mbr with: dd if=/dev/zero of=/dev/hda bs=446 count=1
  • do install as needed