SysVinit Install

Next, we are going to compile and install SysVinit. The init program
is the very first file that is loaded into linux after the kernel boots
into memory. It also always has process id number 1. This would be a good
place for us to start.
Your linux2 system should still be mounted.
Go ahead and unzip sysvinit by typing gzip -d filename.tar.gz You substitute
whatever the filename is. Next, untar it by typing tar -xvf filename.tar
Again, substitute the filename, this time without the .gz extension but
with the .tar extension.
Now, go into the /src directory of this package. Find a file in there
called Makefile - we need to edit this so fire up vi. On the very first
line, add the following to the text file: ROOT=/mnt/linux2
Next, go to the last 4 lines of this file. Precede every /dev by $(ROOT)
@if [! -p $(ROOT)/dev/initctl ]; then \
echo "Creating $(ROOT)/dev/initctl" \
rm -f $(ROOT)/dev/initctl; \
mknod -m 600 $(ROOT)/dev/initctl p; fi
It may be hard to see, but there is a space before every $. Save and
exit vi. Make sure your linux2 filesystem is mounted. Type make LDFLAGS=-static
followed by make install
Linux will complain about a missing /usr/share/man directory, this is
normal. The directory doesn't exist yet. Actually, it will be a symlink
to another directory later. Don't worry, we'll be re-installing this package
again dynamically later and the error will be taken care of.
You just compiled and installed your first package into your new system,
congratulations!
Next, we need to write a quick, temporary, /mnt/linux2/etc/inittab
file. Fire up vi again and copy what I have below.
id:S:initdefault:
~~:S:wait:/sbin/sulogin
z6:6:wait:/sbin/sulogin
1:2345:respawn:/sbin/sulogin
Go ahead and save that.
|