Though Debian is rock solid, stable, highly customizable and with large software repository, but it is not suitable for absolute beginners. So here is a debian minimal install guide with step by step instruction and screenshots.
1. Which Debian version should I choose ?
There are three main Debian versions, officially called Debian Releases, namely unstable, testing and stable. Each release is assigned with a nice name too, like current Debian unstable is named sid.
So what is the difference between them ?
- Debian unstable contains the latest development version of all software. The software repository is updated everyday, one or many software packages may be broken, thus it could create a havoc.
- Debian testing release contains a somewhat matured and bug fixed software packages than testing. The software repository is updated frequently, still some packages could be broken.
- Debian stable release contains well tested and bug fixed software packages. It’s primary aim is to be stable, not cutting edge. Additionally Debian stable get frequent security updates , unlike Debian unstable and testing.
So choose Debian stable for a server or production system, as they get security updates and software packages are stable.
But if you want the latest cutting edge softwares and latest kernel, use Debian testing and unstable combo, or even a Debian rolling based distro.
This is a brief outline of choosing different Debian releases, there is no rule of choosing, the final choice is up to you, use that whatever you like most.
2. Which installation media should I download ?
Another important question, there are many installation ISO files, different size, different architectures but which one will fit the best for me ? Again it depends on your choice.
Which architecture ? For a normal PC system download the amd64(64 bit) or i386(32 bit) ISO files, other architectures like aarch64, PowerPC are for different purpose. Only the first CD/DVD ISO file is bootable, other CD/DVD ISO file sets are only for installing extra software.
If you want to install debian minimal system with a minimal set of software, want to save your valuable internet bandwidth and confident enough with command line interface, the Debian netinstall ISO file will be sufficient, which is around 250 MB.
3. BIOS or UEFI ?
It depends on your system and personal choice, if your PC is a latest UEFI system then you could try the UEFI and GPT combo, though I prefer to stick with the old BIOS and MBR system. Here in this tutorial we are going to use the UEFI and GPT partition table.
It is also possibble to use a UEFI system in BIOS compatibility mode, but that’s irrelevant to talk about it here.
4. Preparing tools for installing the system
The first thing is to create a bootable USB drive or a burning a CD/DVD, but I’m not going into the details, here I will create the bootable USB with the dd command. This is a destructive way to create bootable USB with dd, but fairly simple.
WARNING: If you are using this method, make sure to keep backup of your data inside that USB drive, the command will delete everything inside that drive. Double check the device name before hitting the enter key.
sudo dd if=debian-testing-amd64-netinst.iso of=/dev/sdd
Don’t forget the to set the proper path of the Debian installer ISO file. The USB storage device name is /dev/sdd in this case, it may be different in your case, and type only /dev/sdd nothing else, like /dev/sdd1 , sdd2 etc. etc. Alternative you could do this in a different but non-destructive way, though some what time consuming.
Here I’m using VirtulaBox for installing the system, the only and only reason is for taking better screenshots, in fact I like repeated formatting and installing a fresh Debian.
5. Start Debian minimal install
Lets start installing the system, reboot the machine and choose the Debian bootable USB drive or DVD drive as boot media at the BIOS menu.
- The Debian installer offers two interface, a GTK+ based another text (ncurses) based. For newbies the GTK+ based interface is recommended, just Press the continue button after each sucess full step. Choose the Graphical Install menu for the GTK+ based installer.
- Then the first step is to select the language, select the language of your choice at this step.
- Then select your location, this step is pretty self documented, read the help text at top.
- Then select the keybmap, i.e. the keyboard layout. this step is important, choose the keymap carefully, differnet keyboard layout will make your typing damn tough, though it could be changed later.
- The next steps are somewhat automatic, the installer will gather some necessary components for installing the base system, now set the hostname of your system, this is the name of your PC (not the brand name like Dell, Acer), the default is debian, you could change it, I’m naming it vbox. This could be changed later too.
- Next set the domain name, leave it blank for a normal desktop system. This domain name plays a significant role if you are using this machine as a server, I’m naming it vbox again.
- Now set the root password, It is always good to set a long difficult password.
- Now setup the username and password for the normal user, i.e. may be your name, I’m setting it user1 for example, again choose a good password for the user account.
- The next few steps are automated, wait and let the installer finish the task automatically.
- The disk partitioning step, this is very important step, and do it with care, as a new install, I’m formating the whole disk, select the Manual partitioning.
- Partitioning the hard drive, at this step you have to determine how much space to allocate to which partition. Look at the example disk partition for a 2 GB Virtual Hard drive. There are two free space of about 1 MB at the start and end of the disk, but that’s fine. Now select the finish partitioning and write changes to disk to finish the partitioning.
- The next step is also somewhat automatic, this will install the basic system utilities. Now choose if you want to use a network mirror or not, I selected NO , but select yes if you have a fast and cheap internet connection.
- Now select which components you want to install, choose only standard system utilities if you want a minimal install, or the XFCE if you want a full blown XFCE desktop.
- Now give some time to let the installer finish the installation process. You may be or may not be asked to select the device to install grub, if you are not an expert, choose only /dev/sda nothing else.
- Now the installation is complete, press the continue button to reboot the machine , and login to the new system with your username and password.
So what to do next ?
That’s an absolute minimal debian install, which takes just around 900MB of disk space, there is no GUI installed. Lets make the minimal system somewhat more usable.
The firs step is to add the repository URLs and update the software repository, assuming you know how to connect this minimal system to the internet.
Update the software repository
su - # type the root user password echo 'deb http://ftp.us.debian.org/debian/ stretch main contrib non-free' >> /etc//apt/sources.list apt-get update
Install and configure sudo
apt-get install sudo usermod -aG sudo user_name
Don’t forget to replace the user_name with your system user name. Now install necessary device firmware packages
sudo apt-get install firmware-linux firmware-linux-free firmware-linux-nonfree
Install networking support with Network Manager,
apt-get install network-manager
So that’s it, step by step debian installation guide, I hope this guide will help you. If you have any problem, question or suggestion please let us know, just leave leave a comment. And hey, please share this guide with your friends.