Core Linux Installation Guide
This version of the documentation is no longer maintained. It is kept on-line for reference, as it may be of use to some. However, an installation guide for the latest version of Core Linux can be found from the index page
If you want any more details about the sections listed below, click on the "Give me more details on this" link at the bottom of each paragraph.
Requirements
- A working PC with CD burner. This can be *nix based or Windows based. This PC must be able to access WWW and FTP sites on the internet. It must also have a floppy disk drive and sufficient spare hard disk space for the 60Mb downloaded files.
- A second PC that will become your "Core Linux" PC. This PC should have a CD-ROM drive capable of reading CD-Rs or CD-RWs. If it also reads multi-session CDs that may prove helpful.
- Your Core Linux PC should also have a hard disc for install. I suggest at least 200MB hard disk space for the install. You could use your working PC, if it has unpartitioned space on the hard disk, or you have an alternative hard disk you want to use.
- Four blank floppy disks.
Hardware Used
- This document uses the following example system. You may need to adapt some of the commands in this document depending on your hardware setup.
- An 3Gb IDE hard disk on
/dev/hda. This hard disk is the master on the primary IDE channel. The example hard disk has no existing partitions. If you have a SCSI hard disk, you will use a device of the form/dev/sda. - An IDE CD-ROM drive on
/dev/hdb. The CD-ROM drive is the slave on the primary IDE channel. If you use a different channel, you will need to adjust the statements below. - 1.44Mb Floppy disk drive on
/dev/fd0. - The system is based on an Intel P233 (6x86) system with 64Mb RAM.
- A Realtek 8139 chipset PCI network card. If your machine is to be on a network, you will need to know various settings for the network:
- The IP address and netmask that the machine will use. This example uses an IP address of 192.168.0.10 and a netmask of 255.255.255.0.
- The IP address of your local network's gateway. In this example 192.168.0.1 is used.
- The IP address of the DNS servers you are to use. This may be the same as your default gateway, another machine on your local network or a remote machine. You may have two DNS servers available to use. The example here uses the IP addresses 192.168.0.1 and 192.168.1.1 for the two nameservers.
- A basic graphics card.
- A standard keyboard.
Preparation
- Download the
mass-2.tarfile. - Download the latest Linux kernel from www.kernel.org. You will need the full source code, not just an update or patch. Download it in
.tar.gzformat. - Download any other applications you plan to install (eg Apache)
- Extract all the files from
mass-2.tar. - Burn the contents of
mass-2.tarand the kernel.tar.gzfile to a CD. Burn any additional applications to a subdirectory (perhaps called/apps). The CD-ROM can be a multi-session disk, allowing you to add any files you have forgotten. - Have four floppy disks standing by. One will be a backup disk. If you will be backing up to a MS-DOS/Windows system, ensure that the backup disk is formatted with FAT.
- Create the boot disk, the root disk and the "util" disk. Label the disks clearly. The fourth disk will be a backup disk. If you will be backing up to a MS-DOS/Windows system, ensure that the backup disk is formatted with FAT.
Booting
- Boot from the boot disk.
- Insert the root disk when prompted.
- Login as
root. You are not prompted to enter a password. - Mount the "util" disk under
/mnt/floppy.
Configuring Hard Disks
- Use
fdiskto create hard disk partitions as required. - Use
mke2fsto format new ext2 partitions. - Use
mkswapto format the swap partition. - Mount the partition you will use as the root partition for your installation under
/mnt/root. - Use
mkdirto create empty directories under/mnt/rootwhere you will mount other hard disk partitions (eg/usror/home). - Mount the other partitions at the directories you have just created.
Installing the "Core"
- Mount the CD with the Core source files at
/mnt/cdrom. - Change to
/mnt/cdromand run the./install_corescript with the argument:./install_core /mnt/root - Copy the Linux kernel
.tar.gzfile to the directory/mnt/root/usr/src. - Unmount the floppy disk drive and the CD drive.
- Change to the new root directory, using the command:
chroot /mnt/root /usr/bin/env HOME=/root /bin/bash --login
The Kernel
- Change to
/usr/src. Unzip and untar the kernel source. - Add a symlink called
linuxin the/usr/srcdirectory to the unzipped Linux kernel source directory (eglinux-2.4.19). - Change to the Linux kernel source directory.
- At the system prompt enter:
make mrproper && make menuconfig - Configure your kernel with the features you predict will be necessary for your machine, given its planned purpose. If you have a network card fitted in your system, or will fit one in the near future, remember to select the correct drivers in the Network Configuration section of the kernel configuration interface.
- Save the configuration file with a memorable name (eg
myconfig). - At the system prompt enter:
make dep && make bzImage - Copy the file
System.mapto/boot. - Copy the file
arch/i386/boot/bzImageto/boot. - You could also backup your kernel config settings if you wish to use them again.
Take time to backup
- Insert your backup floppy into the drive.
- Mount the floppy, remembering to use the
-t msdosswitch if necessary. - Copy the file
/boot/System.mapto/mnt/floppy. - Copy the file
/boot/bzImageto/mnt/floppy.
Configure LILO
- Change to the
/etcdirectory. - Edit the file
lilo.conf. - Change the line
to read
image = /boot/vmlinuzimage = /boot/bzImage - You may want to add the line
after the
label = Coreimage = /boot/bzImageline. - Save the file and exit the text editor.
- At the system prompt enter:
lilo
Configure boot settings
- Edit
/etc/fstab. - Add lines for the swap partition and any other partitions you want mounted on startup.
- Save the file and exit the text editor.
- Change to the
/sbindirectory. - Add a symlink to
swaponcalledswapoff. - Change to the
/etc/rc.ddirectory. - Locally backup the files:
rc.si rc.ha rc.rb rc.mu - Edit
rc.si, the system initialisation script. - Add the line
after the line
swapon -amount -aormount -av - Save the file and exit the text editor.
- Edit
rc.ha, the system halt script. - Add the line
before the line
swapoff -aumount -a. Change the lineumount -ato readumount -afv - Save the file and exit the text editor.
- Edit
rc.rb, the system reboot script. - Add the line
before the line
swapoff -aumount -a. Change the lineumount -ato readumount -afv - Save the file and exit the text editor.
- Edit
rc.mu, the system initialisation script. - Change the line
to read
hostname localhostwherehostname coreboxcoreboxis the name you want to give your system. This is name that appears at the login prompt. - Save the file and exit the text editor.
Configure basic networking - optional
- You should already be in the
/etc/rc.ddirectory. If not, change to it. - Edit the file
rc.mu, the initialistaion script for runlevel 3. - Add the following lines to the end of the file, after the comment
# network setup:ifconfig eth0 192.168.0.10 netmask 255.255.255.0 up - Add additional lines in a similar way for any other ethernet cards on your system.
- Add routing rules to the local network and the default gateway:
Thanks to DJ Ruden for the correction on this section!
route add -net 192.168.0.0/24 dev eth0
route add -net default gw 192.168.0.1 - You may wish to add comments or echoes to the file for your own information.
- Save the file and exit the text editor.
- Edit the file
rc.rb. - At the second line of the file add the line:
ifconfig eth0 down - Add similar lines for any other ethernet cards on your system, adapting the above example as necessary.
- You may wish to add comments of echoes to the file for your own information.
- Save the file and exit the text editor.
- Edit the file
rc.ha - At the second line of the file add the line:
ifconfig eth0 down - Add similar lines for any other ethernet cards.
- You may wish to add comments of echoes to the file for your own information.
- Save the file and exit the text editor.
- Edit
/etc/resolv.conf. - Add the following lines to the file:
domain localhost
search
nameserver 192.168.0.1
nameserver 192.168.1.1 - If you have a FQDN for your machine, then you may substitute it into the
domainline instead oflocalhost. - Save the file and exit the text editor.
Another Backup point
- Copy
/etc/lilo.confto/mnt/floppy - Copy
/etc/fstabto/mnt/floppy - Copy
/etc/rc.d/*to/mnt/floppy - Copy
/etc/resolv.confto/mnt/floppy
Rebooting to your new system
- Unmount the floppy drive and remove the disk.
- Reboot the system using
shutdown -r now - If you receive an error message at this command and the system does not reboot, use the command
shutdown -rn now - When the system has rebooted log in as
root. - At the system prompt enter:
passwd - Type and confirm a new password.
Converting to ext3
- If you wish to use ext3, the journalling version of the ext2 file system, you can convert ext2 partitions to ext3 partitions. Kernel support for ext3 should be included in the kernel rather than as a module for stability.
- Hard disk partitions cannot be formatted in ext3 earlier in the installation process because the Linux kernel on the Core Linux boot disks does not support ext3. You could use an alternative boot disk to get around this.
- Convert your ext2 partitions to ext3 using the
tune2fscommand. - Edit
/etc/fstab. - Change the lines listing
ext2to readext3. For example:/dev/hda1 / ext3 defaults 1 1 - Reboot the system using:
shutdown -r now

The text of this page is licensed under a Creative Commons License.
