This page has been translated from Spanish

...::: Guatewireless.org ::::..

Technology, Software Libre, Guatemala, Open Source, Linux, Wireless, WiFi, Scripting, Debian, CentOS, Gentoo, Redhat, SuSE, Windows

Chapter 2.3 Upgrading a Debian system

One of Debian's goals is to provide a smooth upgrade, secure and reliable. The packaging system alerts the administrator to important changes sometimes asked to make decisions.

You should also read the Release Notes document that describes the details of specific updates, which accompany all Debian CDs and available on the WWW at http://www.debian.org/releases/stable/releasenotes or http://www.debian.org/releases/testing/releasenotes

Debian package management, Chapter 6 provides a practical guide updates. This section describes only the outline, beginning with the packaging tools.


2.3.1 dpkg

This is the main program for manipulating package files, see dpkg(8) for a full description.

dpkg comes with several primitive supplemental programs.

  • dpkg-deb Manipulate. deb. dpkg-deb(1)
  • dpkg-ftp An older retrieval command packet. dpkg-ftp(1)
  • dpkg-mountable An older retrieval command packet. dpkg-mountable(1)
  • dpkg-split Splits a large package into smaller files. dpkg-split(1)

dpkg-ftp and dpkg-mountable have been superseded by the introduction of APT.


2.3.2 APT

APT (Advanced Packaging Tool) is an advanced interface to the Debian packaging system consisting of several programs whose names typically begin with "apt-". apt-get apt-cache and apt-cdrom are tools of the command line to handling packages. These also function as the user for other tools such as dselect and aptitude

For more information, install packages apt and read apt-get(8) apt-cache(8) apt-cdrom(8) apt.conf(5) sources.list(5) apt_preferences(5) ( Woody) and /usr/share/doc/apt/guide.html/index.html

An alternative source of information is the APT HOWTO This can be installed using apt-howto at /usr/share/doc/apt-howto/en/apt-howto-en.html/index.html

apt-get upgrade and apt-get dist-upgrade tend to get all the packages listed under "Depends:" and overlook all the packages listed under "Recommends:" and "Suggests:". To avoid this, use dselect


2.3.3 dselect

This program is a menu-driven user interface management system for Debian packages. Particularly useful for first-time installations and large-scale upgrades. See dselect Section 6.2.3.

For more information, install the install-doc and read /usr/share/doc/install-doc/dselect-beginner.en.html or Documentación dselect para principiantes


2.3.4 Upgrading a running system

The kernel (filesystem) in Debian systems supports replacing files even while they're being used. When packages are upgraded any services provided by these packages are restarted if they are configured to run in runlevel. The Debian system does not require use single user mode to upgrade a running system.


2.3.5 Files. Deb archive files

If you have manually downloaded package files to your disk (which is not absolutely necessary, see above for description of dpkg-ftp or APT), then after you have installed you can delete them.

If APT is used, files are stored in the cache located in the directory /var/cache/apt/archives After installation you can delete them (apt-get clean) or copy the directory /var/cache/apt/archives directory to save the download time for subsequent installations.


2.3.6 Keeping track of updates

dpkg keeps a record of the packages that have been unpacked, configured, removed and / or purged, but (so far) does not maintain a record of terminal activity that occurs when the package is being handled.

The easiest way around this is to run your dpkg dselect apt-get etc.., The program script(1)


2.4 The Debian boot process


2.4.1 The program init

Like all Unixes, Debian boots up by executing the program init The configuration file for init (which is the /etc/inittab specifies that the first script to be executed should be /etc/init.d/rcS

What happens next depends on whether the package is installed sysv-rc or file-rc The following assumes that the package is installed sysv-rc file-rc contains its own script /etc/init.d/rcS and uses a file instead of symlinks in rc directories to control which services are started in runlevels)

The file /etc/init.d/rcS package sysv-rc runs all scripts in /etc/rcS.d/ to perform initialization such as checking and mounting file systems, loading modules, starting network services, setting the clock, and so on. Then, for compatibility, it also runs all files (except those with a `. 'In its filename) in /etc/rc.boot/ This directory is reserved for system administrator and its use has fallen into disuse. See tips for system initialization, Section 9.1 and Sistema de niveles de ejecución y scripts init.d in the Debian Policy Manual for more information.

Debian does not use the BSD style rc.local directory.


2.4.2 Runlevels

After completing the boot process, init starts all services that are configured to run in the default runlevel. The latter is indicated by an entry id in the /etc/inittab Debian ships with id = 2.

Debian uses the following runlevels:

  • 1 (single-user mode),
  • 2 to 5 (multiuser modes) and
  • 0 (halt the system),
  • 6 (reboot the system).

Can also be used Runlevels 7, 8 and 9 but their rc directories are not populated as they are installed packages.

Switch runlevels using the command telinit

When entering a runlevel run all scripts in /etc/rc nivel_de_ejecución .d/ The first letter of the script determines how the script is run: scripts whose names begin with K are run with the argument stop. Scripts beginning with S are run with the argument start. The scripts are run in alphabetical order of their names, thus the "stop" scripts are run before the "start" scripts and the two-digit numbers following the K or S determine the order in which the scripts are run.

The scripts in /etc/rc nivel_de_ejecución are in fact just symbolic links back to scripts in /etc/init.d/ These scripts also accept an argument "restart" and "force-reload", these methods can be used to restart the services once the system has been booted or force them to reload their configuration files.

For example:

  # / Etc/init.d/exim4 force-reload 


2.4.3 Customizing runlevels

Customizing runlevels is an advanced task manager system. The following advice holds for most services.

To enable service service in runlevel R create the symbolic link /etc/rc R .d/S xy servicio with target ../init.d/ servicio The sequence number xy should be assigned to the service when the package was installed.

To disable the service, rename the symbolic link so that its name begins with K and with an S and its sequence number is 100 minus xy.

For these purposes it is convenient to use a runlevel editor such as sysv-rc-conf or ksysv

Instead of renaming it is possible to delete the S symlink a directory service of a particular runlevel. This does not disable the service but leaves it in a "floating" at least in regard to the init system sysv-rc Changing runlevel the service will be neither started nor stopped but will be left as was, whether running or not. Note, however, that a service that is in this state will be started if its package is upgraded whether or not it was running before the upgrade. This is a known shortcoming of the current Debian system. Note also that you should keep K symlinks for a service in runlevels 0 and 6. If you delete all the symlinks for a service then on upgrade the package will restore the symlinks to their factory default state.

It is advisable to make any changes to symlinks in /etc/rcS.d/


2.5 Supporting diversity

Debian offers several avenues to accommodate the wishes of the system without breaking the system.

  • dpkg-divert see the command dpkg-divert Section 6.5.1.
  • equivs see Package equivs Section 6.5.2.
  • update-alternative see Alternative commands, Section 6.5.3.
  • make-kpkg can accommodate many boot loaders. See make-kpkg(1)

Any files under /usr/local/ belong to the system administrator and Debian will not touch. Most files under /etc/ are conffiles (configuration files) and Debian will not overwrite them upon upgrade unless the system administrator requests so explicitly.


2.6 Internationalization

The Debian system is internationalized and provides support for display and entry of characters in many languages, both in the console and under X. Many documents, manual pages and system messages have been translated into an increasing number of languages. During installation, Debian prompts the user to choose an installation language (and sometimes a local language variant)

If the installed system does not support all the features you need for your language, you need to change languages or install a different keyboard to support your language, see Localization language support, Section 9.7.


2.7 Debian and the kernel

See The Linux kernel under Debian, Chapter 7.


2.7.1 Compiling a kernel from non-Debian source

One has to understand the Debian policy with respect to headers.

The Debian C libraries are built with the latest kernel headers from the stable branch.

For example, the Debian-1.2 release used version 5.4.13 of the headers. This practice contrasts with the kernel source packages distributed at all Linux FTP archive sites use even more recent versions of the headers. The header files distributed with the kernel source are located in /usr/include/linux/include/

If you need to compile a program with kernel headers that are newer than those provided by libc6-dev should include at compile -I/usr/src/linux/include / at the command line. This happened to me once with the packaging of the automounter daemon amd When new kernels changed some internals dealing with NFS, amd needed to know about them. This forced me to include the latest kernel headers.


2.7.2 Tools to build custom kernels

Users who wish to (or must) build a custom kernel are encouraged to download the package kernel-package This package contains the script to build the kernel package, and provides the ability to create a Debian kernel-image by running the command

  # Make-kpkg kernel_image 

in the main directory of the kernel source. Help is available by executing the command

  # Make-kpkg - help 

or through the manual page make-kpkg(1) and The Linux kernel under Debian, Chapter 7.

Users must separately download the source code more recent kernel (or the kernel of their choice) from their favorite Linux archive site, unless a package is available kernel-source-version (where version stands for the kernel version ). Startup Script initrd Debian requires a special kernel patch called initrd see http://bugs.debian.org/149236

In the file /usr/doc/kernel-package/README will give detailed instructions for using the package kernel-package


2.7.3 Special provisions for dealing with modules

The package modconf package provides a shell script /usr/sbin/modconf which can be used to customize the configuration of modules. This script presents a menu-based interface where the user can choose the device drivers that can be loaded into the system. The responses are used to customize the file /etc/modules.conf (which lists aliases, and other arguments to be used with various modules) through files in /etc/modutils/ and /etc/modules (which lists the modules to be loaded at boot time).

As files (new) Configure.help now available to support the construction of custom kernels, the package modconf package comes with a set of help files (in /usr/share/modconf/ which provide detailed information on appropriate arguments for each of the modules. See The modular kernel 2.4, Section 7.2 for some examples.


2.7.4 an old kernel package

The script kernel-image- NNN .prerm checks whether the kernel you are currently running is the same as that which is trying to uninstall. Therefore, you can safely remove unwanted kernel no packages using the command:

  # Dpkg - purge - force-remove-essential kernel-image-NNN 

(obviously, replace NNN by the version number and revision of its kernel)

Popularity: 1%

Please enter a comment

Please note the following:
Comments are moderated, so it can take in being published. No need to repeat his comment.
Your email will never be revealed.