A minimal Debian installation

I’m a big fan of the ‘less is more’ approach and although I’m quite happy to check out the latest release of Debian (or Ubuntu) using a live CD or by just selecting the standard desktop packages and letting the installer get on with it when it comes to installing a more permanent setup on a real machine I’m a lot more conservative.

Note – Instructions on how to install a minimal system on a Raspberry Pi are here.

Installing Debian is very straight forward and the Debian documentation is very good but there are a couple of steps where I have deviated from the ‘defaults’ to minimize the number of installed packages.

The install process is more or less identical for jessie, wheezy, squeeze or even lenny and this minimal installation makes a great starting point for a dedicated server, but you will need to make some changes to the system configuration to add support for ssh, configure the firewall, prevent the system from installing the recommended packages in the future and to remove unwanted language support files. After you have done that then if you want to build a desktop system then the next step is probably to install either MATE or XFCE. Alternatively you could configure NFS and turn the system into a file server.


Rather than just select ‘guided partitioning’ and use the default layout I’ve configured the partitions by hand, firstly because on the machine I was using the default partitioning scheme only allocated about 460Mb of the disk to the swap partition and I wanted a swap partition slightly bigger then the amount of physical RAM, and secondly because I wanted to demonstrate how you can choose which partition you want to use as the root partition.

Installing Debian

If you are installing wheezy/jessie on a physical machine then all you need to do is download the netinst image, burn it to a CD, then boot the physical machine from CD.

If everything works the first screen you should see is the initial boot menu for the debian installer.
wheezy-install-QEMU-01The next three screens select the default keyboard layout and language settings
wheezy-install-QEMU-04The installer will then try to detect the hardware and find the CD device.
wheezy-install-QEMU-05Next the installer will try to configure the network, if you get the following error message then you need to check that the machine is connected to the network and your router is set up to respond to DHCP requests.
wheezy-install-QEMU-08You can then continue by setting the hostname and domain name – you can leave the domain name blank if you want.
wheezy-install-QEMU-12Then you should select a strong password for the root account, make sure it is one you will be able to remember as there is not a lot you can do if you forget it, apart from reinstall everything!
wheezy-install-QEMU-14Then you need to create a default user account, this is normally the account you will use to login. You do not have to enter your full name and can leave it blank.
wheezy-install-QEMU-19Then you should select a strong password for your new user account, obviously it should be different from the root password.
wheezy-install-QEMU-20The installer will then attempt to detect all the disks on the system before displaying the disk partitioning options, normally if you do not plan on running multiple operating systems on the same machine you can just select the first option, but in this case I wanted to use a slightly different partitioning scheme, so I selected ‘manual’.
wheezy-install-QEMU-24First I created a 640MB swap partition.
wheezy-install-QEMU-34Then I used the remaining disk space for the root partition.
wheezy-install-QEMU-42Up to this point you haven’t actually made any changes to your disk, the installer runs in memory, but when you write the changes to the partition table to the disk they are permanent. Any data held in any partitions that will be deleted or formatted will be lost.
wheezy-install-QEMU-44Now we can start actually installing the system, first you need to tell the installer which network mirror to down load the debian packages from.wheezy-install-QEMU-46
wheezy-install-QEMU-47Normally you can leave the proxy settings blank, unless you are behind a firewall that requires you to specify a proxy server to browse the web.
wheezy-install-QEMU-48The installer will then start to download an install the base system, if you are running in a virtual machine using QEMU this can take a while – be patient!
wheezy-install-QEMU-49Having installed the base system the installer will next let you choose which additional packages to install, after asking you if you want to allow your system to send information on package usage back to the debian package maintainers.
wheezy-install-QEMU-50For a minimal installation I uncheck ALL the default options, if you change your mind you can always add stuff later.
wheezy-install-QEMU-52The last thing to do is install the boot loader, by default this is installed in the master boot record, but you can choose any active (boot) partition.wheezy-install-QEMU-53
wheezy-install-QEMU-54If it all worked then the system should start to boot normally and you should see boot menu…
wheezy-install-QEMU-55That is all there is to it…

This entry was posted in Debian, Linux and tagged , , , . Bookmark the permalink.

2 Responses to A minimal Debian installation

  1. Great post! Can you post the output of the command “$free -m” in this fresh install Linux Debian?

    • mike632t says:

      #free -m
             total    used    free  shared buffers  cached
      Mem:   502        36     465       0       2      19

      More importantly from my perspective is that it only uses about 500 MB of disk space.

      #df -m
      Filesystem     1M-blocks  Used Available Use% Mounted on
      rootfs              8064   491      7164   7% /

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s