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.
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.
The next three screens select the default keyboard layout and language settings
The installer will then try to detect the hardware and find the CD device.
Next 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.
You can then continue by setting the hostname and domain name – you can leave the domain name blank if you want.
Then 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!
Then 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.
Then you should select a strong password for your new user account, obviously it should be different from the root password.
The 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’.
First I created a 640MB swap partition.
Then I used the remaining disk space for the root partition.
Up 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.
Now we can start actually installing the system, first you need to tell the installer which network mirror to down load the debian packages from.
Normally 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.
The 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!
Having 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.
For a minimal installation I uncheck ALL the default options, if you change your mind you can always add stuff later.
The 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.
If it all worked then the system should start to boot normally and you should see boot menu…
That is all there is to it…