7.3. Boot-scripts for CLFS 3.0-20140710

The Boot-scripts package contains a set of scripts to start/stop the CLFS system at bootup/shutdown.

7.3.1. Installation of Boot-scripts

Install the package:

make DESTDIR=/tools install-boot-scripts

The setclock script reads the time from the hardware clock, also known as the BIOS or the Complementary Metal Oxide Semiconductor (CMOS) clock. If the hardware clock is set to UTC, this script will convert the hardware clock's time to the local time using the /tools/etc/sysconfig/clock file (which tells the hwclock program which timezone the user is in). There is no way to detect whether or not the hardware clock is set to UTC, so this needs to be configured manually.

If you do not know whether or not the hardware clock is set to UTC, you can find out after you have booted the new machine by running the hwclock --localtime --show command, and if necessary editing the /tools/etc/sysconfig/clock file. The worst that will happen if you make a wrong guess here is that the time displayed will be wrong.

Change the value of the UTC variable below to a value of 0 (zero) if the hardware clock is not set to UTC time.

cat > /tools/etc/sysconfig/clock << "EOF"
# Begin /tools/etc/sysconfig/clock


# End /tools/etc/sysconfig/clock

7.3.2. Contents of Boot-scripts

Installed scripts: checkfs, cleanfs, functions, halt, localnet, mountfs, mountkernfs, rc, reboot, sendsignals, setclock, swap, and udev.

Short Descriptions


Checks the integrity of the file systems before they are mounted (with the exception of journal and network based file systems)


Removes files that should not be preserved between reboots, such as those in /run/ and /var/lock/; it re-creates /run/utmp and removes the possibly present /etc/nologin, /fastboot, and /forcefsck files


Contains common functions, such as error and status checking, that are used by several boot-scripts


Halts the system


Sets up the system's hostname and local loopback device


Mounts all file systems, except ones that are marked noauto or are network based


Mounts virtual kernel file systems, such as proc


The master run-level control script; it is responsible for running all the other boot-scripts one-by-one, in a sequence determined by the name of the symbolic links being processed


Reboots the system


Makes sure every process is terminated before the system reboots or halts


Resets the kernel clock to local time in case the hardware clock is not set to UTC time


Enables and disables swap files and partitions


Starts and stops the Eudev daemon