Next Previous Contents

8. Installing login utilities

8.1 Installing agetty + login

This parts needs to be done using the normal Linux system since we need a text editor. You need the Util Linux package again for this section. If you haven't deleted the Util Linux source directory, you can skip the first two steps.

8.2 Modifying $LFS/etc/inittab

The next step is modifying the $LFS/etc/inittab file so that agetty is started on a virtual console every time we start the system. This is how it works on most if not every Linux system.

   1:2345:respawn:/sbin/agetty /dev/tty1 9600
   2:2345:respawn:/sbin/agetty /dev/tty2 9600
   3:2345:respawn:/sbin/agetty /dev/tty3 9600
   4:2345:respawn:/sbin/agetty /dev/tty4 9600
   5:2345:respawn:/sbin/agetty /dev/tty5 9600
   6:2345:respawn:/sbin/agetty /dev/tty6 9600
 

8.3 Creating the UTMP record file

Every time you logon to a Linux system, the /var/run/utmp file is modified. When this file isn't present, a lot of programs will start complaining, including agetty and login. So we just create an empty $LFS/var/run/utmp file and those programs won't complain anymore.

8.4 Testing the system

If you want you can test the system now. Restart the system and boot into the LFS system. After the kernel and sysvinit are done loading, agetty should start and prompt you with a username. Since the only user we currently have is 'root', you login as root.


Next Previous Contents