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.
configure
make agetty login
agetty
login
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.
$LFS/etc/inittab
file
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
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.
$LFS/var/run
directorytouch $LFS/var/run/utmp
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.