7.6. Sysvinit-2.86

#### Cross-Compiled Linux From Scratch - Version 1.0.0rc2-x86

### Chapter 7. If You Are Going to Boot

- Prev

  E2fsprogs-1.39

- Next

  Module-Init-Tools-3.2.2

- Up.
- Home

# 7.6. Sysvinit-2.86

The Sysvinit package contains programs for controlling the startup, running, and shutdown of the system.

## 7.6.1. Installation of Sysvinit

Make some modifications to allow you to boot into the minimal temp-system:

    cp -v src/Makefile src/Makefile.orig
    sed -e 's@root@0@g' \
        -e "s@/dev/initctl@${CLFS}&@g" \
        -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \
        -e "s@/usr/lib@/tools/lib@" \
        src/Makefile.orig > src/Makefile

Compile the package:

    make -C src clobber
    make -C src CC="${CC}"

Install the package:

    make -C src install INSTALL="install" ROOT="${CLFS}"

## 7.6.2. Configuring Sysvinit

Create a new file `${CLFS}/etc/inittab` by running the following:

    cat > ${CLFS}/etc/inittab << "EOF"
    # Begin /etc/inittab

    id:3:initdefault:

    si::sysinit:/etc/rc.d/init.d/rc sysinit

    l0:0:wait:/etc/rc.d/init.d/rc 0
    l1:S1:wait:/etc/rc.d/init.d/rc 1
    l2:2:wait:/etc/rc.d/init.d/rc 2
    l3:3:wait:/etc/rc.d/init.d/rc 3
    l4:4:wait:/etc/rc.d/init.d/rc 4
    l5:5:wait:/etc/rc.d/init.d/rc 5
    l6:6:wait:/etc/rc.d/init.d/rc 6

    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

    su:S016:once:/sbin/sulogin

    1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
    2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
    3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
    4:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
    5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
    6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600

    # End /etc/inittab
    EOF

Details on this package are located in Section 10.48.3, “Contents of Sysvinit.”

- Prev

  E2fsprogs-1.39

- Next

  Module-Init-Tools-3.2.2

- Up.
- Home.