Sunday, May 4, 2008

Installing a Debian GNU/Linux system from a net-install

-ATTENTION-

Before printing this guide and starting, it's a good thing to read it entirely, clarify your doubts now and take software/datas/specifications/howtos you may need during the setup, so you avoid ending up in a mess without the possibility to ask someone for help.

The installation through the net, that is the network install (or "netinst") is one of the best way to install Debian GNU/Linux: you can install a basilar system and then add what you need (and only that) through Internet, it guarantees a clear and user-based system. To avoid the possible troubles with the unstable Debian version, you'd better choose the testing one, an excellent compromise between reliability and updating frequency,

The steps to follow are few and relatively easy.

The first one is to download the Debian Testing's installation CD (daily-builds) .
You download, check and burn the ISO image, and then you can boot the pc with the CD inserted and start the installation.

-NOTE-

You may need to create some space for the new system by resizing the existent partitions: it's an easy step but do it carefully, so I assume the free space (not partitioned) already exists. I hope it's useless to remember a backup of important datas is obligatory before any risk operation.
Booting with the new CD, the first screen presented is quite bare: press ENTER and the installatin will start through text-based screens. With the parameter installgui before pressing ENTER , you're going to use the graphical version of the installer. Keep in mind there is no difference between the two versions: they are the same thing and most people, including me, finds the text-based one to be better.

The installation screens are almost easy and they shouldn't be difficult; so I'm going to talk only about some important aspects

* The needed partitions are substantially 3: a '/' (root) for the operating system, a i 'swap' as a support for the RAM and a '/home' for user's file. The system shouldn't surpass the 3GB, so you can start from this size to decide, the root partition's size. If you can, don't limit the space. The swap's size has to be computed according to the installed ram: with 256mb of ram, the swap should be set to 500mb. With greater quantities, you can set the swap similar to ram's size. What remains of free space is assigned to the '/home' partition.
* Debian needs the setting of at least two passwords: one for the system administrator (or superuser, or root) and one for the "normal" user. Just avoid to choose similar password, too short or too difficult to remember.
* The network configuration, during the setup, should be automatic; if this doesn't happen, don't panic. If your modem isn't supported by GNU/Linux or its installation requires a particolar procedure, take a look on documentation before installing so you won't have surprise. In the case of a normal adsl connection on Internet, the configuration can happen after the setup. In this case, of course, remember to tell the installer, when it asks you, that we want to configure the network later and not to use it during the setup.
* One passage proposes to select some software categories to install, and offers to choose between two generical categories: 'Laptop' and 'Standard system'. The netinst's purpose is installing only what is really needed, so be careful disabling 'Standard system' (flagged by default) and don't select any option. In a following step you will be able to install only the packages you wish, to exploit the customization offered by the netinst.

Once the setup is completed, you will get a text login screen: provide the username created during the installation ando its password to start using you Debian.

The operations related to system administration and software installation must be executed with root privileges (the administrator). Take these privileges with
$ su

and provide the password chosen during the setup.
If your connection hasn't been enabled during the system setup, install the necessary software with this command:
$ apt-get install ppp pppoeconf
wait for the packages to be taken from the CD ad installed. Then with:
$ pppoeconf

a text-based procedure will start to recognize your connection, to enable it and to set the username and password. It's very comfortable to set the connection starting at boot time: to do this, the configuration procedure will ask us, so answer yes.

Now you are logged as admin and connected to Internet: give a life to the system :)
To install software, Debian use a very powerful tool called 'apt'. This tool takes the software you ask for from the net and install it. Moreover, it cares about solving the dependecies, that is downloading and installing other programs needed for the execution of the package requested. To know where the software can be taken, apt looks into a simple text file where some "repositories", that is program archives, are listed. Open this text file with the nano editor and specify the right repositories for Debian. Type:
$ nano /etc/apt/sources.list
and replace the current lines with these others:
deb http://ftp.it.debian.org/debian/ testing main contrib non-free
deb http://www.debian-multimedia.org/ testing main
Save the new file with CTRL+O and close nano with CTRL+X.

Now you must tell apt you inserted new repositories with the command:
$ apt-get update

Although the software on your netinst is very recent, you can wish it's updated to the last existent version. This is valid for the kernel too, the heart of the system. If you decide to update everything, first you need to care about the kernel, and after a system reboot, the rest of the software.

To install a new kernel (or a new one more suitable), you're going to use apt. I assume you already know which kernel is the best for your machine, so:
$ apt-get install linux-image-versionchosen linux-headers-versionchosen

will update. Keep in mind this operation needs a machine reboot. This is because at boot time the system will start with the new kernel instead of the old one. To reboot the system, after the installation, type:
$ reboot


The boot will show us a list (generated by the Grub bootloader) where the systems available on that machine are written. So choose the right system (Debian) with the most recent kernel. In the case of a single-OS machine, you can just wait the system.

Of course, re-login as user, re-gain root privileges and you are ready for the next step.
If you wish, it's possible to update everything to the last versions. Type:
$ apt-get dist-upgrade

and wait. In few time the procedure will end and you now have a shining and super-updated Debian Testing ready to be customized.

Now, although most people think GNU/Linux is a text-based system for hackers like in "Wargames" (beautiful movie!), it's comfortable to install the necessary software to have a DE (Desktop Environment) and a graphical interface. So install the graphical server Xorg and the sound, Alsa.
$ apt-get install x-window-system-core alsa-base alsa-utils

and wait. Maybe it will prompt you the video resolutions to used in your system: in the menu select the interesting ones with the spacebar and confirm the operation.

Now customize rapidly X and Alsa. For X, edit its configuration file. Like apt, it's just a text file. Open it
$ nano /etc/X11/xorg.conf

look for "Monitor" where the value for "Horizontal sync" and "Vertical refresh" are specified. By setting the correct values for your monitor, you can enjoy a nice graphical experience. The values are available on the monitor manuale or in Internet, but if you are doubt about the numbers you have, jump this step to avoid unwanted consequences. You can do it later.

To configure the sound card and server with Alsa, use:
$ alsaconf

If you have more than one sound card, choose from the list. After the operation is saved and finished, you can adjust the system values with a text based mixer. Execute
$ alsamixer
modify what it's useful and press ESC to exit. To make this sound configuration permanent, type:
$ alsactl store


Now video and sound are okay, one step is missing: choosing a Desktop Environment. The flame war about what is the best is opened since some years on forums and newsgroups all over the world: so I don't express any judgement also in this tutorial. Later I will show you how to behave with Gnome chosen as a Desktop Environment. Nothing denies to use Kde or many other combinations between WM (Window Managers) and DE.

To obtain and usable environment, you need few things. With:
$ apt-get install gnome-core gdm synaptic gnome-volume-manager gnome-system-tools

the starting point is good.
Wait for the download and software installation to finish, leave the root privileges and come back being a normal user:
$ su - username
start Gnome:
$ startx


The DE will start and you notice two things: installing a netinst and having a nice system is very satisfactory, and Gnome is very thin. It's normal, something is missing. Yes, our customization. Other than themes and icons, you can and you must install other software on your Debian. This is a step that vary a lot according to the user requirements, so it's useless to speak in details. Just know that with Synaptic you can do graphically what you did textually with apt, before. Without any doubt it's a convenience, so use it.

Below, a short list of software (with descriptions) which can be interesting to install.

alacarte (Gnome's menu editor)
d4x (download manager well integrated with Firefox)
evince (PDF document's viewer)
file-roller (zip, tgz, bz2 archives handler)
firefox (web browser)
flashplayer-mozilla (Flash plugin for Firefox)
gcalctool (calculator)
gconf-editor (Gnome's configuration editor)
gdm-themes (login manager's themes)
gimp (picture's editor)
gimp-data-extras (addictional tools for gimp)
gnome-power-manager (configures the power saving)
gnome-screensaver (Gnome's screensaver)
gnome-system-monitor (process monitor)
gnome-utils (utilities for Gnome)
gnupg (system for coding and deciphering)
gthumb (picture's viewer and editor)
gtk2-engines-clearlooks (Gnome's interface theme)
mozilla-mplayer (multimedial firefox plugin)
nautilus-gksu (more functionalities to the Gnome file manager)
nautilus-open-terminal (more functionalities to the Gnome file manager)
openoffice.org-base (suite Office, database program)
openoffice.org-calc (suite Office, sheets)
openoffice.org-draw (suite Office, vectorial graphic art)
openoffice.org-gtk-gnome (suite Office, addictional tools)
openoffice.org-help-it (suite Office, help file)
openoffice.org-impress (suite Office, presentations)
openoffice.org-l10n-it (suite Office, Italian language files)
openoffice.org-writer (suite Office, word processing)
rhythmbox (sound player for Gnome)
sound-juicer (extracts tracks from audio CDs)
totem-xine (Gnome video player)
wine (it lets you, within some limitations, use Windows software GNU/Linux)
wine-utils (Wine tools)
msttcorefonts (essential fonts)
xfonts-base-transcoded (essential fonts)
xfonts-100dpi-transcoded (essential fonts)
xfonts-75dpi-transcoded (essential fonts)
xsane (graphical frontend to the scanner)

Indeed, if you want to install Kde as your Desktop Environment, the operations to follow are almost the same. For a basilar system you will need few things:
$ apt-get install kdebase kdm kde-i18n-it kde-kio-plugins hal pmount

Once finished, as usually, you must leave root privileges and log in as normal users, with the command
$ su - username
and start your DE:
$ startx

For KDE there is lots of software too, let's have a look:

amarok (KDE sound player)
ark (zip, tgz, bzip2 archives handler)
gnupg (system for coding and deciphering)
gtk2-engines-gtk-qt (useful tool to integrate well the gtk applications under Kde)
kaffeine (KDE video player)
kaudioconvert (extracts tracks from audio CDs)
kde-admin (system administration tools)
kdeutils (KDE utilities)
kdm-themes (login manager themes)
kget (download manager)
kooka (graphical frontend for the scanner)
kpdf (PDF documents viewer)
openoffice.org-base (suite Office, database program)
openoffice.org-calc (suite Office, sheet program)
openoffice.org-draw (suite Office, vectorial graphic art)
openoffice.org-kde (suite Office, addictional tool)
openoffice.org-help-it (suite Office, help file)
openoffice.org-impress (suite Office, presentations)
openoffice.org-l10n-it (suite Office, Italian language files)
openoffice.org-writer (suite Office, word processing)
wine (it lets you, within some limitations, use Windows software GNU/Linux)
wine-utils (Wine tools)
msttcorefonts (essential fonts)
xfonts-base-transcoded (essential fonts)
xfonts-100dpi-transcoded (essential fonts)
xfonts-75dpi-transcoded (essential fonts)

No comments: