We will install a Linux distribution like Red Hat in one partition, and use that to build a new Linux system in another partition. I will call the system we are building the ``target'' and the system we are using to build it with, the ``source'' (not to be confused with source code which we will also be using.)
So you are going to need a machine with two spare partitions on it. If you can, use a machine with nothing important on it. You could use an existing Linux installation as the source system, but I wouldn't recommend that. If you leave a parameter out of one of the commands we will issue, you could accidentally install stuff to this system. This could lead to incompatibilites and strife.
Older PC hardware, mostly 486's and earlier, have an annoying limitation
in their bios. They can not read from a hard disk past the first 512M.
This is not too much of a problem for Linux, because once it is up, it
does its own disk io, bypassing the bios.
But for Linux to get loaded by these old machines,
the kernel has to reside somewhere below 512M. If you have one of these machines
you will need to have a separate partition completely below the 512M
mark, to mount as
/boot for any partitions that are over that
Last time I did this, I used Red Hat 6.1 as a source system. I installed the base system plus
I also had X-window and Mozilla so I could read documentation easily, but that's not really necessary. By the time I had finished working, it had used about 350M of disk space. (Seems a bit high, I wonder why?)
The finished target system took 650M, but that includes all the source code and
intermediate build files. If space is tight, you should do a
after each package is built. Still, this mind boggling bloat is a bit of a worry.
Finally, you are going to need the source code for the system we are going to build. These are the ``packages'' that I have discussed in this document. These can be obtained from a source cd, or from the internet. I'll give URL's for the USA sites and for Australian mirrors.
To sum up then, you will need:
I'm assuming that you can install the source system yourself, without any help from me. From here on, I'll assume that its done.
The first milestone in this little project is getting the kernel to boot up
and panic because it can't find an
init. This means we are going to have
to install a kernel, and install lilo. To install lilo nicely though, we
will need the device files in the target
/dev directory. Lilo
needs them to do the low level disk access necessary to write the boot
sector. MAKEDEV is the script that creates these device files.
(You can just copy them from the source system of course, but that's cheating!)
But first of all, we need a filesystem to put all of this into.