An up-to-date look at free software and its makers

Projects on the Move


Although a couple of scratches are visible, you can read from the backup CD. The question is, for how long? Cdck measures the sector access times to give you an idea. Have you overwritten the bootloader on your disk? Super Grub Disk to the rescue!

By Peter Kreußel and Martin Loschwitz

CDs and DVDs use optical structures of approximately 100 nanometers to store data. Even tiny scratches can destroy large numbers of data bits, without the user even noticing at first. Data redundancy and error-correcting techniques, such as cross-interleaved Reed-Solomon code, support error-free data reading, despite damage to parts of the disk. Even newly burned media might not be free of errors: depending on how well (or how badly) your burning device supports your choice of media, the disks could have unreadable sectors right from the outset.

Disk Check

It would be nice to know how much of the existing redundancy has already been used up, or how grave the danger of imminent data loss is. The test functions that many burning tools use for media verification are not a big help. The functions only check whether the filesystem is legible after applying error-correction techniques.

If you have a big collection of CDs, like the program's author, Alexey Semenoff, and do not want to create backups of all your CDs and DVDs but still want to avoid losing critical data, you need a tool that can check the state of your disks for you.

Semenoff's program, cdck [1], does a low-level read of the media and measures how long it takes to get the data, block by block. Error-correction techniques for optical media work in such a way that the time it takes to access data is a metric for the number of read errors that need correcting. Correction techniques use a combination of parity bits and interleaving, which is the distribution of successive bits across the surface of the CD. If the data bits were stored sequentially on the disk, parity checks would not serve any useful purpose. Because of the minuteness of the recesses on the disk, scratches would always destroy contiguous bits, which is not typically the case when data is scattered across the disk.

Depending on the quantity of data destroyed by the scratch, the drive has to read farther ahead to reconstruct the data. It takes longer to retrieve the data for a block, even in the case of modern drives with cache memory. Semenoff's statistical observations provide empirical evidence that read errors typically occur in sectors for which access times were high in previous measurements.

Detailed Test Report

After testing a medium, cdck displays a report. CD overall lists hard read errors, which are indicative of data loss. If data loss has not yet occurred, the CD Timing values are of interest. Cdck lists the minimum, maximum, and average access times for reading CD or DVD sectors.

To let non-experts interpret the report, cdck sums up the output with a clear message: CD is excellent (for read times of less than 0.1 seconds throughout), CD is satisfactory (between 0.1 and 1 second), or CD is unstable (access times greater than 1 second). Setting the -p option tells the tool to create a logfile, which you can visualize in Gnuplot [2] (Figure 1).

Figure 1: Red bars in the graphic indicate CD or DVD sectors with above-average read times. Data loss is probable.

The red bars in the graphic represent sectors with unusually long access times. The figure also shows the read speed of the drive increasing; this has nothing to do with the quality of the medium, but with the increasing angular velocity.

Super Grub Disk

Murphy's Law dictates that if things can go wrong - like overwriting the bootloader on your disk - they will go wrong, especially when you're in a hurry. Even the most experienced administrators want a tool to handle what would otherwise be a manual task at the spartan Grub command line. Super Grub Disk [3] is an ISO image that weighs in at about 3MB, with its functionality based on Grub. After burning the image to a CD or installing the tool on a USB stick [4], you can boot a rescue system (Figure 2).

Figure 2: Super Grub Disk helps repair Linux, Solaris, GNU Hurd, or Windows systems if the Master Boot Sector or bootloader configuration is missing.

Search, Find, Fix

Super Grub Disk saves you having to guess the name your distribution's kernel image uses on the disk. The live system automatically searches for the Grub configuration files.

Users can either specify the partition with /boot/grub, or - if you did not set up the system yourself - leave the tool to its own devices, without wasting any time guessing.

If the boot issue is caused by a faulty or missing Grub configuration file, the software will alternatively check the /boot directory for kernel images and boot the images without parsing the menu.lst file.

Super Grub Disk's prowess is not restricted to temporary fixes. The tool will reinstall Grub and LILO, both in the Master Boot Record and in the boot sector on certain partition types. Besides this, the live disk can help you solve issues, such as setting the boot flag for the primary partition, that occur when booting Windows. Super Grub Disk can boot Windows with Grub's chainloader option, or by writing a generic entry to the Master Boot Record and flagging the Windows partition as active for the boot process.

Because Super Grub Disk gives users without Linux skills the ability to install Grub, the developers recommend the tool to Windows users who need a replacement for the less-than-flexible Windows bootloader. Besides Windows, the admin tool will also reanimate GNU Hurd and OpenSolaris kernels.

Of course, Super Grub Disk doesn't actually do anything a system administrator couldn't do manually, but the practical tool does save time and headaches. A footprint of just less than 3MB means that Super Grub Disk will fit on any USB stick, and thus in your pocket.

Etch

We know that Debian 4.0 - or Etch - has now been frozen and new features are no longer being accepted, but we don't know whether Etch will have been released by the time this issue of Linux Pro Magazine hits the stores. A peek at the new features in version 4.0 and what administrators and users can expect is still a good idea [5].

Installation

The installation breaks with old traditions - the base-config script (the legacy tool for the initial system configuration) has been dropped. Instead, the developers have integrated the initialization phase with the installer to create a unified tool. This is the first version to let users create encrypted partitions during the install.

The Installer team has done desktop users a big favor by providing a GUI. Although the graphical installation process is far removed from tools like YaST2, the framebuffer methods it implements give less experienced users the option of clicking to install, rather than relying on the keyboard.

Also, a number of minor bugs that became apparent after the release of Sarge have been removed from the Debian Installer in the normal course of the release cycle and version update.

Secure APT

Users and administrators alike have been looking forward to Debian APT validating package sources for quite awhile. Up until the Sarge release, malevolent hackers could manipulate packages and foist them on unexperienced Debian users. Etch changes this - the Secure APT tool uses a package list with GPG signatures to make sure the download really is a Debian package. If the package fails to validate, APT refuses to install it.

Debian for Servers

Debian has always had an excellent reputation as a server operating system, and Etch continues in the same vein. If you install a database like MySQL or PostgreSQL, the dbconfig-common utility helps out by providing a standardized front-end. The utility also supports seamless integration of packages that need to access the database to work properly, removing the need for administrators to fulfill database dependencies.

The new release sees a change in the standard character set to UTF-8 and uses udev in combination with kernel 2.6.

Debian for Desktops

Gustavo Franco, the Debian Desktop project maintainer, made liberal use of superlatives when referring to Etch as the "user-friendliest" Debian of all time. Debian has ignored the desktop market for far too long, which is probably one of the reasons users are moving to Ubuntu. Mark Shuttleworth's Ubuntu team clearly targeted the desktop as the focus of development work on the distribution from the outset.

To make Debian more accessible to users, the new version adds a number of changes. KDE and Gnome have both been customized to reflect the Debian look, but without both desktops looking exactly the same. In contrast to Sarge, Etch now gives users the option of selecting Gnome or KDE during the installation phase and booting into the desktop right after completing the installation. This takes users straight to an X environment with a configured desktop and steers safely clear of the console.

Other changes have been introduced, too. Etch automatically notifies users of required security updates and supports point-and-click installation. At the same time, Etch detects any printers and scanners you connect to your machine and automatically configures your peripherals. Gaim now handles instant messaging, although Kopete is still included.

Package Searching with Debtags

Searching for packages on Debian was previously restricted to the short name and the slightly longer description of all packages. In Etch, developers have Debtags to facilitate the process [6]. This is a simple trick that involves adding a Debtags: line to a package's control file to assign the package content to a specific category on the basis of keywords. Tags also determine which user interface is required (console or X11), the program usage, its properties (core application or utility, for example), or the file formats the program can handle.

The command-line Debtags program gives users the ability to search the list of installed programs on the basis of program tags. If you are looking for packages somehow connected to the Z Shell, for example, typing debtags related zsh will give you the results.

In contrast to the former classification in sections, or searching the package descriptions, Debtags searching is efficient; however, not all packages have tags, so lists you view could be incomplete.

En Route to Etch

In the course of Etch development, many changes have occurred under the hood, and some of them are not easily visible, whereas others are. Etch is the first version of Debian to officially support the AMD64, although Sarge had semi-official support thanks to some hard-working Debian developers. Besides this, Debian Version 4.0 now complies with the LSB 3.1 specs.

The mirror split that the project completed last year was the subject of discussion. The FTP Master team is still worried that continued rapid growth will consume storage capacity on the mirror servers. To resolve the problem, the project distributed packages for different distributions over different mirrors. Users can no longer expect to find packages for every single architecture on every single mirror. This decision was fairly controversial. Users of older architectures in particular feared that the number of mirror servers available for the user's choice of architecture might be small. On a more positive note, these fears seem to be unfounded.

The Battle Continues

It's time to refresh our memories and take a look at the minor scuffles and major battles that have accompanied the Etch release thus far. For example, Jörg Schilling pushed Debian too far with machinations concerning the Cdrecord license to such an extent that Debian finally decided to fork an older version of Schilling's cdrecord and introduce cdrkit as the Debian burning tool for Etch.

Then there was the fight with the Mozilla project, which was worried about its reputation because distributors insisted on releasing (considerably) modified versions of Mozilla programs under the Mozilla names. Again, things came to a peaceful conclusion, as evidenced by the renaming of Firefox on Etch to IceWeasel. Mozilla to IceApe, and Thunderbird to IceDove.

The Dunc Tank waves still haven't died down; Project Leader Anthony Towns launched the project to pay the overworked release managers, Andreas Barth and Steve Langasek, US$ 12,000 each for two months of work with the aim of being able to keep the release on schedule. Unfortunately, this didn't work; if it had, Etch might have been released in 2006. The Dunc Tank project's future depends on the progress Etch is making, and nobody really knows whether Debian will continue to experiment with full-time staff [7].

Business as Usual

A lack of surprises is inherent in the nature of any Debian release. After all, users are invited to test and evaluate the distribution content long before it reaches the CDs. Despite repeated criticism of the long gaps between releases, Debian has always managed to inspire users and admins, and there is no reason to expect Etch to be an exception.

INFO
[1] cdck: http://packages.debian.org/unstable/utils/cdck
[2] Gnuplot: http://www.gnuplot.info
[3] Super Grub Disk: http://supergrub.forjamari.linex.org
[4] Super Grub Disk on USB-Sticks: http://users.bigpond.net.au/hermanzone/SuperGrubDiskPage.html#Super_Grub_USB_Disk
[5] Etch: http://www.debian.org/releases/testing/
[6] Debtags: http://debtags.alioth.debian.org/
[7] Dunc Tank: http://www.dunc-tank.org/