Next Previous Contents

10. Util-linux (getty and login)

The util-linux package contains agetty and login. We need both of these to be able to log in and get a bash prompt. After it is instlalled, make a symlink from agetty to getty in the target /sbin directory. getty is one of the programs that is supposed to be there on all Unix-like systems, so the link is a better idea than hacking inittab to run agetty.

I have one remaining problem with the compilation of util-linux. The package also contains the program more, and I have not been able to persuade the make process to have more link against the ncurses 5 library on the target system rather than the ncurses 4 on the source system. I'll be having a closer look at that.

You will also need a /etc/passwd file on the target system. This is where the login program will check to find out if you are allowed in. Since this is only a toy system at this stage, we can do outrageous things like setting up only the root user, and not requiring any password!! Just put this in the target /etc/passwd

root::0:0:root:/root:/bin/bash

The fields are separated by colons, and from left to right they are user id, password (encrypted), user number, group number, user's name, home directory and default shell.


Next Previous Contents