Installing Util-linux-2.12

The Util-linux package contains miscellaneous utility programs. Among them are utilities for handling file systems, consoles, partitions, and messages.

Approximate build time:  0.2 SBU
Required disk space:     16 MB

Official download location for Util-linux (2.12):
http://ftp.cwi.nl/aeb/util-linux/

For its installation Util-linux depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed, Zlib.

FHS compliance notes

The FHS recommends that we use /var/lib/hwclock, instead of the usual /etc, as the location for the adjtime file. To make the hwclock program FHS-compliant, run the following:

cp hwclock/hwclock.c{,.backup}
sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
    hwclock/hwclock.c.backup > hwclock/hwclock.c
mkdir -p /var/lib/hwclock

Installation of Util-linux

Prepare Util-linux for compilation:

./configure

Compile the package:

make HAVE_KILL=yes HAVE_SLN=yes

The meaning of the make parameters:

And install the package:

make HAVE_KILL=yes HAVE_SLN=yes install

Contents of Util-linux

Installed programs: agetty, arch, blockdev, cal, cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate, dmesg, elvtune, fdformat, fdisk, fsck.cramfs, fsck.minix, getopt, hexdump, hwclock, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root, ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev, rootflags (link to rdev), script, setfdprm, setsid, setterm, sfdisk, swapoff (link to swapon), swapon, tunelp, ul, umount, vidmode (link to rdev), whereis and write

Short descriptions

agetty opens a tty port, prompts for a login name, and then invokes the login program.

arch reports the machine's architecture.

blockdev allows you to call block device ioctls from the command line.

cal displays a simple calender.

cfdisk is used to manipulate the partition table of the given device.

chkdupexe finds duplicate executables.

col filters out reverse line feeds.

colcrt is used to filter nroff output for terminals that lack some capabilities such as overstriking and half-lines.

colrm filters out the given columns.

column formats a given file into multiple columns.

ctrlaltdel sets the function of the Ctrl+Alt+Del key combination, to a hard or a soft reset.

cytune was used to tune the parameters of the serial line drivers for Cyclades cards.

ddate gives the Discordian date, or converts the given Gregorian date to a Discordian one.

dmesg dumps the kernel boot messages.

elvtune can be used to tune the performance and interactiveness of a block device.

fdformat low-level formats a floppy disk.

fdisk could be used to manipulate the partition table of the given device.

fsck.cramfs performs a consistency check on the Cramfs file system on the given device.

fsck.minix performs a consistency check on the Minix file system on the given device.

getopt parses options in the given command line.

hexdump dumps the given file in hexadecimal, or in another given format.

hwclock is used to read or set the system's hardware clock (also called the RTC or BIOS clock).

ipcrm removes the given IPC resource.

ipcs provides IPC status information.

isosize reports the size of an iso9660 file system.

line copies a single line.

logger enters the given message into the system log.

look displays lines that begin with the given string.

losetup is used to set up and control loop devices.

mcookie generates magic cookies, 128-bit random hexadecimal numbers, for xauth.

mkfs is used to build a file system on a device (usually a harddisk partition).

mkfs.bfs creates an SCO bfs file system.

mkfs.cramfs creates a cramfs file system.

mkfs.minix creates a Minix file system.

mkswap initializes the given device or file to be used as a swap area.

more is a filter for paging through text one screenful at a time. But less is much better.

mount attaches the file system on the given device to the given directory in the system's file tree.

namei shows the symbolic links in the given pathnames.

pg displays a text file one screenful at a time.

pivot_root makes the given file system the new root file system of the current process.

ramsize could be used to set the size of the RAM disk in a bootable image.

rdev could be used to query and set the root device and other things in a bootable image.

readprofile reads kernel profiling information.

rename renames the given files, replacing a given string with another.

renice is used to alter the priority of running processes.

rev reverses the lines of a given file.

rootflags could be used to set the rootflags in a bootable image.

script makes a typescript of a terminal session, of everything printed to the terminal.

setfdprm sets user-provided floppy disk parameters.

setsid runs the given program in a new session.

setterm is used to set terminal attributes.

sfdisk is a disk partition table manipulator.

swapdev could be used to set the swap device in a bootable image.

swapoff disables devices and files for paging and swapping.

swapon enables devices and files for paging and swapping.

tunelp is used to tune the parameters of the line printer.

ul is a filter for translating underscores into escape sequences indicating underlining for the terminal in use.

umount disconnects a file system from the system's file tree.

vidmode could be used to set the video mode in a bootable image.

whereis reports the location of binary, the source, and the manual page for the given command.

write sends a message to the given user. That is, if that user has not disabled such messages.