User Tools

Site Tools


install_minimal_debian

If you have been toying around with the usual mainstream Linux distributions like Ubuntu, Fedora, RedHat, Debian etc., you've realized that most bring large amount of stuff and apps along that you might or might not need. There are alternatives out there that try to be minimalistic ArchLinux or just more lean and mean #! (CrunchBang) Linux), but they all have more or less bloat.

For a living, I've been working with (and also working on the OS) Windows for the past 20+ years. But I do have some work experience with Unix from the late 80s and early 90s. Hence it was tempting for my technical curiosity to get a refresher into the inner works of a Unix kernel and its X Window graphic stack. In the course of getting a small and nimble system up, I hope to also learn and understand how modern Linux systems are organized, configured and layered.

As I mentioned at other opportunities, the stubborn robustness of Debian and its elegant configuration system resonate well with my engineering aesthetics, so I've chosen Debian 6.0/Squeeze (as of now, Jan 2011, it is in its final stretch before the release as the next “stable”).

Speaking of personal preferences:

  • It's a non-goal to create a system for a casual computer user like my wife or other non-techie family members. It is clearly geared towards someone geeky like me. While I truly love and admire VisualStudio for my day-to-day work coding in C# & C++, I still work a lot with the Windows command line for source archive operations, searching/grepping files, compiling etc. Even on Windows with VisualStudio, I use Vim or Emacs for the quick and easy edits of e.g. C# source or .targets files.
  • I like to tune a command line since I use it often. For ease of switching between parallel running apps and command prompts, I do want to have a X Window system, ideally with multiple desktops, but I don't need nor want a busy desktop and no eye candy or graphical thrills.
  • I have other computers where I use Office suites, so no OpenOffice is installed.
  • I like to have my user directory on the fastest/best drive, hence I create a striped and mirrored RAID10 volume for the /home partition. Since this is a desktop system (and not a public web or app server), I don't bother to further split off partitions. I'm fine with the majority of the system on a root partition, a swap partition and the above RAID10 for /home. A nice side-effect of a separate /home partition: My own user data will stay intact should I decide to reinstall a system.

Install Minimal Linux

As mentioned above, I have a subjective preference to Debian, it will be the basis of my journey here.

Start with the NetInstall for Debian 6.0/Squeeze. As of this writing, that release is on its final weeks to become the next "stable" release.

Find the NetInstall ISO image from

With the downloaded NetInstall ISO (typically in the order of ~180MB), burn a CD.

To create a USB, look for section “4.3. Preparing Files for USB Memory Stick Booting” in the installation manual

List of available deb packages, by category:

My system configuration

Dell PowerEdge SC420, ~4 years old

  • Pentium4 hyper-threaded, no x64 support
  • 2GB RAM
  • built-in video controller, i915 Intel Integrated Graphics Chipset
  • 3 disk spindles:
    • sda 40GB
    • sdb 160GB
    • sdc 160GB

on my system, sdb & sdc are already configured as RAID10 (stripped and mirrored) with LVM logical volumes, see RAID10 on Linux

Boot with netinstall CD

Boot parameters of Debian installer: http://www.debian.org/releases/stable/i386/ch05s03.html.en#installer-args

  • pick Install (don't hit enter yet)
  • hit tab to see boot options, arrow left and delete 'vga=788'. On my system, even the text-mode install produced illegible text blur, probably a confused video driver
  • pick language and keymap
  • let DHCP autoconfigure complete
  • pick hostname and domain (.local for internal machine)
  • set strong root password
  • fill in user info when prompted
  • pick timezone
  • continue with the install wizard until…

Partitioning

  • pick “ Guided - use entire disk” (we'll move /home onto a logical volume later)
  • select sda (40GB spindle)
  • verify partitioning config and accept to create the filesystems
  • continue with the install wizard until…

Package selection

  • package manager: select country and mirror
  • software selection
  • UNselect Graphical desktop environment
  • only one selected: Standard system utilities
  • finish install and reboot

First boot

  • login as root
  • get sudo and configure your regular user as sudo-user:
apt-get install sudo
visudo
  • copy line for “root” and change user name for your alias:
# User privilege specification
root   ALL=(ALL) ALL
david  ALL=(ALL) ALL
  • save

Move /home to separate LVM drive

  • login as root; no regular user should be logged in (in any XSession), reboot first if necessary. Check with:

ps -A |grep david

  • rename your old /home directory and create mount point:
mv /home /old-home
mkdir /home
  • if necessary, create the RAID10 with its logical volume(s), see RAID10 on Linux
  • to get an overview of the currently RAID configuration, physical and logical volumes:
cat /proc/mdstat
pvscan
lvscan
  • add the following line to /etc/fstab:

(alter the device name, depends on your lvm setup. I chose to name the one volume group 'vg0' and the logical volumes lvN, hence the /dev/vg0/lv0 device name)

/dev/vg0/lv0  /home   ext4  nodev,async   0   1
  • mount all drives, including the new logical volume:
mount -a
mv /old-home/david /home

Login with your user account

The base system is now ready to login as regular user. We're still in text-only mode, you can switch to a second (or third, fourth …) login session with:

Ctrl + Alt + F2
* by default, the APT system only uses the pure Debian repository, time to add "contrib" and "non-free" to apt's sources.list:
sudo vi /etc/apt/sources.list
  • look for the main debian squeeze entries and add the following components at the end of the line: “contrib non-free”
  • results in deb and deb-src lines like this:
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/debian/ squeeze/updates main contrib non-free
  • update the apt cache:
sudo apt-get update

SSH server

SSH (actually in its OpenSSH incarnation) allows secure remote access to a command line terminal and copying.

sudo apt-get install ssh
sudo apt-get install denyhosts pwgen

To connect from a Windows system, use putty. While logged in to the SSH server system (preferably via a known, secure connection, e.g. physical console or Linode's LISH), the RSA fingerprint of the server can be displayed:

ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key

This fingerprint must match what putty or ssh client shows you on first connect via SSH.

If possible, use public key based authentication: TODO: describe setup

TODO: describe how to access via router

More SSH links:

Tweaks for creature comfort

Additional little tweaks to make day-to-day life good:

connect to Windows shares

see Access Windows Shares

sudo apt-get install cifs-utils

additional fonts

sudo apt-get install xfonts-terminus

font smoothing

add the following to ~/.fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="font">
        <edit name="rgba" mode="assign"><const>rgb</const></edit>
        <edit mode="assign" name="antialias"><bool>true</bool></edit>
        <edit mode="assign" name="lcdfilter"><const>lcddefault</const></edit>
    </match>
</fontconfig>

and restart the X server

Next step: Get graphical

This is now a workable system but it still lacks critter-comfort, even for my taste. Continue to add a GUI and window manager.

install_minimal_debian.txt · Last modified: 2014/11/01 14:14 (external edit)