The rest of the software that's part of our basic system will be installed in this section. You don't need all the software, but it's recommended to have it.
configure
make
When compiling I'm getting this error: mke2fs.c:142:SCSI_DISK_MAJOR not defined. I solved it the following way:
misc/mke2fs.c
file and find the first occurrence of SCSI_DISK_MAJORPlease note that I have no idea what this does when you're using a SCSI system, but I can guess not a heck of a lot of good. Since I'm using an IDE system this doesn't harm me. If you're using SCSI you're on your own I'm afraid since I have no idea on how to fix this. Perhaps you don't even get it when using (a) SCSI disk(s).
make install
We'll create a checkroot bootscript so that whenever we boot our LFS system, the root file system will be checked by fsck.
/etc/init.d/checkroot
containing the following:
#!/bin/sh # Begin /etc/init.d/checkroot echo "Activating swap..." /sbin/swapon -av if [ -f /fastboot ] then echo "Fast boot, no file system check" else mount -n -o remount,ro / if [ $? = 0 ] then if [ -f /forcecheck ] then force="-f" else force="" fi echo "Checking root file system..." fsck $force -a / if [ $? -gt 1 ] then echo echo "fsck failed. Please repair your file system manually by" echo "running fsck without the -a option" echo "Please note that the file system is currently mounted in" echo "read-only mode." echo " echo "I will start sulogin now. CTRL+D will reboot your system." /sbin/sulogin /reboot -f fi else echo "Cannot check root file system because it is not mounted in" echo "read-only mode." fi fi # End /etc/init.d/checkroot
/etc/init.d/umounts
file and put these lines as the first commands
(under the "# Begin /etc/init.d/umountfs" line)
echo "Deactivating swap..." /sbin/swapoff -av
chmod 755 /etc/init.d/checkroot
cd /etc/rcS.d; ln -s ../init.d/checkroot
S05checkroot
configure
make
make install
configure
make
make install
configure
make CC=/usr/gcc2723/bin/gcc
This package will only be used, as far as I can tell and know, for the installation of Lilo which will be installed next. So you could remove the two programs as86 and ld86 after you've installed Lilo.
make
as86
make
ld86
make
make install
/etc/lilo.conf
file from your normal Linux system to the /etc
directory on the LFS system
/boot
directory from your normal Linux
system to /boot on the LFS systemWe don't install the Debian Package manger itself, but a small program that is shipped with this package; the start-stop-daemon program. This program is very useful in boot scripts so we're going to use it.
make start-stop-daemon
start-stop-daemon
start-stop-daemon.8
make CC=/usr/gcc2723/bin/gcc
make INSTALL=/bin/install install
/etc/syslog.conf
containing the following:Please note that the white spaces must be tabs and not just hitting the space bar a few times.
#!/bin/sh # Begin /etc/syslog.conf auth,authpriv.* /var/log/auth.log *.*;auth,authpriv.none /var/log/syslog daemon.* /var/log/daemon.log kern.* /var/log/kern.log mail.* /var/log/mail.log user.* /var/log/user.log mail.info /var/log/mail.info mail.warn /var/log/mail.warn mail.err /var/log/mail.err *.=info;*.=notice;*.=warn; \ auth,authpriv.none; \ daemon.none /var/log/messages *.emerg * # End /etc/syslog.conf
/etc/init.d/sysklogd
containing the following:
#!/bin/sh # Begin /etc/init.d/sysklogd test -f /usr/sbin/klogd || exit 0 test -f /usr/sbin/syslogd || exit 0 check_status() { if [ $? = 0 ] then echo "OK" else echo "FAILED" fi } case "$1" in start) echo -n "Starting system log daemon..." start-stop-daemon -S -q -o -x /usr/sbin/syslogd -- -m 0 check_status echo -n "Starting kernel log daemon..." start-stop-daemon -S -q -o -x /usr/sbin/klogd check_status ;; stop) echo -n "Stopping kernel log daemon..." start-stop-daemon -K -q -o -p /var/run/klogd.pid check_status echo -n "Stopping system log daemon..." start-stop-daemon -K -q -o -p /var/run/syslogd.pid check_status ;; reload) echo -n "Reloading system load daemon configuration file..." start-stop-daemon -K -q -o -s 1 -p /var/run/syslogd.pid check_status ;; restart) echo -n "Stopping kernel log daemon..." start-stop-daemon -K -q -o -p /var/run/klogd.pid check_status echo -n "Stopping system log daemon..." start-stop-daemon -K -q -o -p /var/run/syslogd.pid check_status sleep 1 echo -n "Starting system log daemon..." start-stop-daemon -S -q -o -x /usr/sbin/syslogd -- -m 0 check_status echo -n "Starting kernel log daemon..." start-stop-daemon -S -q -o -x /usr/sbin/klogd check_status ;; *) echo Usage: $0 {start|stop|reload|restart} exit 1 ;; esac # End /etc/init.d/sysklogd
chmod 755 /etc/init.d/sysklogd
cd /etc/rc2.d; ln -s ../init.d/sysklogd S03sysklogd cd ../rc6.d; ln -s ../init.d/sysklogd K90sysklogd cd ../rc0.d; ln -s ../init.d/sysklogd K90sysklogd
configure
make
make install
configure
make
make install
make install
make CC=/usr/gcc2723/bin/gcc
make install
make
make install
This package contains the utilities to modify user's passwords, add new users/groups, delete users/groups and more. I'm not going to explain to you what 'password shadowing' means. You can read all about that in the doc/HOWTO file. There's one thing you should keep in mind, if you decide to use shadow support, that programs that need to verify passwords (examples are xdm, ftp daemons, pop3d, etc) need to be 'shadow-compliant', eg. they need to be able to work with shadowed passwords.
If you decide you don't want to use shadowed passwords (after you're read the doc/HOWTO document), you still use this archive since the utilities in this archive are also used on system which have shadowed passwords disabled. You can read all about this in the HOWTO. Also note that you can switch between shadow and non-shadow at any point you want.
configure
make
make install
limits login.access
login.defs.linux shells suauth
/etc/login.defs.linux
to /etc/login.defs
Now is a very good moment to read section #5 of the doc/HOWTO file. You can read how you can test if shadowing works and if not, how to disable it. If it doesn't work and you haven't tested it, you'll end up with an unusable system after you logout of all your consoles, since you won't be able to login anymore. You can easily fix this by passing the init=/sbin/sulogin parameter to the kernel, unpack the util-linux archive, go to the login-utils directory, build the login program and replace the /bin/login by the one in the util-linux package. Things are never hopelessly messed up, but you can avoid a hassle by testing properly and reading manuals ;)
configure
make
The installation by running make install right now will fail because it can't find all the header files that need to be copied to /usr/include/g++-v3. The thing is, the installation script tries to find the files in the src/bits src/shadow src/ext and src/backwards directories. The files are actually in the bits, shadow, ext and backwards directories in the top-level directory. I don't know who to blame; the make program, or the Makefile file. Either way, by making a few symlinks and copying some extra header files to a different directory the installation will finish properly.
To setup up the directories and file in such a way that the Makefile script can find them, execute the following commands from within the src directory:
ln -s ../bits bits ln -s ../backward backward ln -s ../ext ext ln -s ../shadow shadow cp ../stl/bits/* bits cp ../stl/backward/* backward cp ../stl/ext/* ext
Now that the files are in a place where they can be found during make install, we can proceed with this step.
make install