How to install Debian – my way
In this post I am not going to analyse the positive or negative (there is nothing negative :P) aspects of Debian.
I suppose that you know why Debian is such a good distro (number of packages, stability, rolling distro) and you want to install Debian but you are scared of the process. Actually it isn’t as difficult as it may sound. There is the easy way that you just install everything that the installation CD tells you or you can do something like the followings. My way of installing the Debian may be a little more ( ) complex but after understanding it, the whole process will be quite automated and quick.
Before I start talking about the installation process I must check whether you are aware of some little but very important things! First of all the Debian OS is divided into three releases, the stable release, the testing and unstable or sid.
The “stable” distribution contains the latest officially released distribution of Debian.This is the production release of Debian, the one which we primarily recommend using.
The “testing” distribution contains packages that haven’t been accepted into a “stable” release yet, but they are in the queue for that. The main advantage of using this distribution is that it has more recent versions of software.
The “unstable” distribution is where active development of Debian occurs. Generally, this distribution is run by developers and those who like to live on the edge.The “unstable” distribution is called sid.
Stable release is better for a server, testing for your pc and unstable (sid) if you are going to contribute to the Debian distro and you want to fix bugs and other. Personally I am using the testing release because it is pretty stable, not as the actual stable release but if you are installing this OS for personal use you will not have any problem and you will upgrade to the newer version of the packages quicker.
Also Debian’s packages are divided into three components: main, non-free and contrib:
- the free packages go into main
- the non-free ones into non-free, and
- the free ones which depend on non-free ones into contrib.
For more info about the Debian repository check this out.
Another thing that you may not know is about the filesystem’s hierarchy in linux. From wikipedia:
The Filesystem Hierarchy Standard (FHS) defines the main directories and their contents in Linux operating systems.
The least that you must know is that the root directory (/) is the root of the entire file system hierarchy, and that users’ home directories, containing saved files, personal settings, etc. are saved under /home. So a good idea is to have different partitions at least for your / (root) and /home (home) directories. This is because if you need in the future to format the /root directory for any reason (e.g. a crash that you can not fix) you can keep the /home directory with all the users’ data and personal settings.
But enough with those tiring things… lets start talking about the installation process.
I must note that one of the things that I am always scared of is to have my OS crashed when a deadline is approaching. So to face a problem like that and make a re-installation of my OS and having my configurations back in less than 45 minutes (it depends on your Internet connection), I make something like the followings.
Firstly, I always carry in my laptop’s bag a netinstall CD of Debian. The netinstall CD is about 175 MB and let you install the Debian OS over the Internet. As it is written in the official site:
A “network install” or “netinst” CD is a single CD which enables you to install the entire operating system. This single CD contains just the minimal amount of software to start the installation and fetch the remaining packages over the Internet.
So in order to install the Debian OS with the netinstall CD you must have primarily an ethernet connection to Internet.
You just have to continue with the installation by following the install choice. I am not going to explain the whole process of the installation because it is the same as in all the OS installations (Ubuntu, Windows etc).
But I must notice that when you will reach the point of the partitioning it is good to do it manually, either because you have other Operating systems intalled in some other partitions and you don’t want to overwrite them or because you want to partition at least your disk for a different /home (home) and / (root) directory, for the reasons that I explained above.
The ammount of GB that you will dedicate to each partition is up to you. For the swap you can leave from 1 to 5 GB . It depends on your ram and the apps that you are running. For the / (root) partition a good ammount is about 30-40 GB if this will be your primary OS. The rest will be for the /home (home) partition. You must partition your disk(s) in a way that the / (root) partition will be smaller than the /home (home), because in your /home (home) directory you will keep your data.
The partitioning should look somehow like the image below.
I am always installing just the standard system because the repositories in the netinstall CD are set for the stable version of Debian and I am using the testing version for my desktop. So I install the standard system and then I log in to Debian and change the repositories to update the OS to the testing release. In this way I have to update just about some megabytes of software and not a bunch of gigabytes.
After installing the standard system, your PC will restart and ask you to login for the first time in Debian. Don’t be scared, it will be from command line because we had installed only the basics.
Probably you are a fan of the “sudo” command and you will want to install it:
su -c 'aptitude install sudo'
To configure the sudo command to work for you too and not just for the root, you just have to edit the sudoers file:
su -c 'visudo'
To give to a user full access to the root commands just type something like that:
... # User privilege specification root ALL=(ALL) ALL YOUR_USERNAME ALL=(ALL) ALL ...
The next step is to set the repositories (as I said before). Open with an editor (vi, nano etc) the /etc/apt/sources.list file that lists the “sources” from which packages can be obtained and wherever you see the word stable or the name of the stable release e.g. lenny (this is the name of the stable release now) change it to the release that you want to have… (testing, sid (for unstable), or keep it to stable)… If you want to have access to all Debian’s packages add after the “main” word the “contrib non-free”.
After this step this list should look like that:
deb http://ftp.gr.debian.org/debian/ testing main contrib non-free deb-src http://ftp.gr.debian.org/debian/ testing main contrib non-free deb http://security.debian.org/ testing/updates main contrib non-free deb-src http://security.debian.org/ testing/updates main contrib non-free
Note that the above links are for the greek mirror of Debian, because I leave in Greece. You may have another link If you are leaving somewhere else. The link’s structure is
You can find the Debian worldwide mirror sites here.
Also if you want to include some more multimedia packages and to install the skype to your OS add also the followings:
# debian multimedia deb http://www.debian-multimedia.org/ testing main non-free # skype deb http://download.skype.com/linux/repos/debian stable non-free
In order to have access to the multimedia packages you will need also to install the debian-multimedia-keyring package with “dpkg -i debian-multimedia-keyring_2008.10.16_all.deb” (click on the previous link to download the package).
After setting your list of repositories you should update and upgrade the system by typing the following commands:
sudo aptitude update sudo aptitude safe-upgrade sudo aptitude dist-upgrade
Then you can install all the other packages that you may need… like a graphic interface, a web browser and others.
For this reason I had made a little script that installs everything that I am using:
#--GRPAPHIC ENVIRONMENT------------------------------------------------------ # xorg server sudo aptitude -y install xorg # kde graphic environment sudo aptitude -y install kdm kde-full #--ACCESS THE NETWORK-------------------------------------------------------- # network manager for kde sudo aptitude -y install network-manager-kde # access wpa hot spots sudo aptitude -y install wpasupplicant #--INSTALL THEM-------------------------------------------------------------- # JDK, JRE sudo aptitude -y install sun-java6-bin sudo aptitude -y install sun-java6-jdk sun-java6-jre # headers for the linux kernel sudo aptitude -y install linux-headers-$(uname -r) #--MUST HAVE (FOR ALMOST EVERYONE)------------------------------------------- # drivers for the audio card sudo aptitude -y install alsa-base alsamixergui # movie and audio players sudo aptitude -y install mplayer smplayer amarok # openoffice, kate: editor, okular: pdf viewer, dia: make diagrams # aspell-el: spelling checker for greek sudo aptitude -y install openoffice.org kate okular lsb dia aspell-el # pidgin, kmess: IM client, icedove: mail client(thunderbird) # iceweasel: broswer(firefox), deluge: torrent client # choqok: twitter client sudo aptitude -y install pidgin kmess icedove iceweasel deluge-torrent choqok # make the firefox the default browser of the system sudo update-alternatives --set x-www-browser /usr/bin/iceweasel # mplayer plugin for browsers in order to access radio stations and others... sudo aptitude -y install gecko-mediaplayer # silverlight for linux sudo aptitude -y install moonlight-plugin-mozilla # skype sudo aptitude -y install skype # cd/dvd burner sudo aptitude -y install k3b # to run .exe sudo aptitude -y install wine # gwenview: image viewer, ksnapshot: print screen, gimp: image editing sudo aptitude -y install gwenview ksnapshot gimp # decompressing - compressing sudo aptitude -y install ark # unrar sudo aptitude -y install unrar # access ntfs filesystems sudo aptitude -y install ntfsprogs libntfs-dev libntfs-3g54 libntfs-3g-dev sudo aptitude -y install libntfs10 # for kdenlive mpeg-4 # http://tinyurl.com/2334yr4 sudo aptitude -y install libavcodec-dev libavdevice-dev libavfilter-dev sudo aptitude -y install libavformat-dev libavutil-dev libpostproc-dev sudo aptitude -y install libswscale-dev # movie maker sudo aptitude -y install kdenlive # kde chm(format) viewer sudo aptitude -y install kchmviewer #--DEVELOPING TOOLS---------------------------------------------------------- # latex, kile is an ide for *tex sudo aptitude -y install kile texlive-full # code development tools sudo aptitude -y install manpages-dev kompozer kdevelop eclipse subversion sudo aptitude -y install build-essential valgrind mercurial python-wxglade sudo aptitude -y install kdiff3 kompare # produce code documentation sudo aptitude -y install doxygen doxygen-gui # emacs editor sudo aptitude -y install emacs # yakuake: console, wireshark, nmap: network tools sudo aptitude -y install yakuake kdesdk wireshark nmap # ssh server sudo aptitude -y install openssh-server # ssh client sudo aptitude -y install openssh-client # virtual machine sudo aptitude -y install virtualbox-ose virtualbox-ose-modules-$(uname -r) #--CHECK WHAT U WANT--------------------------------------------------------- # common unix printing system sudo aptitude -y install cups # drivers for hp printers sudo aptitude -y install hplip # boinc: volunteer computing sudo aptitude -y install boinc-manager # checking for cpu/gpu temps, battery level and other sudo aptitude -y install acpi # disk partitioning system sudo aptitude -y install gparted # similar to more sudo aptitude -y install less sudo aptitude -y install libxp6 # for pdfnup sudo aptitude -y install pdfjam # typing tutor sudo aptitude -y install gtypist # chm to pdf converter sudo aptitude -y install chm2pdf # samba sudo aptitude -y install samba samba-client
So you can do the same and have this file to a USB flash drive and just mount it and run the script by typing:
If the file isn’t executable and you can’t run the previous command, you can change the script’s permissions by typing:
chmod +x path_to_the_script
And now you must have your Debian OS up and running!
Note that you may need to download and install some drivers too, like one for your GPU.
I must repeat that the whole process may seem a little difficult, but if you are using Linux for some time, you’ ll probably know the most of the above.
Summarizing the above steps:
- Install the standard system from the netinstall CD
- Install and configure the sudo command
- Change the repositories
- Update and upgrade the system
- Run the installation script
Fortunately for me and you, this is the END of this article!!!
ps: Seeing the length of this article, I am not sure if anybody will ever read it. If you are the One, please comment (lol)!