tonywhitmore.co.uk  

      blog : gallery : wiki : articles : projects : shell scripts : wallpaper : cv : links :
 Project Homepage

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

  1. 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.
  2. 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.
  3. 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.
  4. Four blank floppy disks.

Hardware Used

  1. This document uses the following example system. You may need to adapt some of the commands in this document depending on your hardware setup.
  2. 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.
  3. 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.
  4. 1.44Mb Floppy disk drive on /dev/fd0.
  5. The system is based on an Intel P233 (6x86) system with 64Mb RAM.
  6. 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.
  7. A basic graphics card.
  8. A standard keyboard.

Preparation

  1. Download the mass-2.tar file.
  2. 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.gz format.
  3. Download any other applications you plan to install (eg Apache)
  4. Extract all the files from mass-2.tar.
  5. Burn the contents of mass-2.tar and the kernel .tar.gz file 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.
  6. 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.
  7. 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.

Give me more details on this

Booting

  1. Boot from the boot disk.
  2. Insert the root disk when prompted.
  3. Login as root. You are not prompted to enter a password.
  4. Mount the "util" disk under /mnt/floppy.

Give me more details on this

Configuring Hard Disks

  1. Use fdisk to create hard disk partitions as required.
  2. Use mke2fs to format new ext2 partitions.
  3. Use mkswap to format the swap partition.
  4. Mount the partition you will use as the root partition for your installation under /mnt/root.
  5. Use mkdir to create empty directories under /mnt/root where you will mount other hard disk partitions (eg /usr or /home).
  6. Mount the other partitions at the directories you have just created.

Give me more details on this

Installing the "Core"

  1. Mount the CD with the Core source files at /mnt/cdrom.
  2. Change to /mnt/cdrom and run the ./install_core script with the argument:
    ./install_core /mnt/root
  3. Copy the Linux kernel .tar.gz file to the directory /mnt/root/usr/src.
  4. Unmount the floppy disk drive and the CD drive.
  5. Change to the new root directory, using the command:
    chroot /mnt/root /usr/bin/env HOME=/root /bin/bash --login

Give me more details on this

The Kernel

  1. Change to /usr/src. Unzip and untar the kernel source.
  2. Add a symlink called linux in the /usr/src directory to the unzipped Linux kernel source directory (eg linux-2.4.19).
  3. Change to the Linux kernel source directory.
  4. At the system prompt enter:
    make mrproper && make menuconfig
  5. 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.
  6. Save the configuration file with a memorable name (eg myconfig).
  7. At the system prompt enter:
    make dep && make bzImage
  8. Copy the file System.map to /boot.
  9. Copy the file arch/i386/boot/bzImage to /boot.
  10. You could also backup your kernel config settings if you wish to use them again.

Give me more details on this

Take time to backup

  1. Insert your backup floppy into the drive.
  2. Mount the floppy, remembering to use the -t msdos switch if necessary.
  3. Copy the file /boot/System.map to /mnt/floppy.
  4. Copy the file /boot/bzImage to /mnt/floppy.

Give me more details on this

Configure LILO

  1. Change to the /etc directory.
  2. Edit the file lilo.conf.
  3. Change the line
    image = /boot/vmlinuz
    to read
    image = /boot/bzImage
  4. You may want to add the line
    label = Core
    after the image = /boot/bzImage line.
  5. Save the file and exit the text editor.
  6. At the system prompt enter:
    lilo

Give me more details on this

Configure boot settings

  1. Edit /etc/fstab.
  2. Add lines for the swap partition and any other partitions you want mounted on startup.
  3. Save the file and exit the text editor.
  4. Change to the /sbin directory.
  5. Add a symlink to swapon called swapoff.
  6. Change to the /etc/rc.d directory.
  7. Locally backup the files: rc.si rc.ha rc.rb rc.mu
  8. Edit rc.si, the system initialisation script.
  9. Add the line
    swapon -a
    after the line mount -a or mount -av
  10. Save the file and exit the text editor.
  11. Edit rc.ha, the system halt script.
  12. Add the line
    swapoff -a
    before the line umount -a. Change the line umount -a to read
    umount -afv
  13. Save the file and exit the text editor.
  14. Edit rc.rb, the system reboot script.
  15. Add the line
    swapoff -a
    before the line umount -a. Change the line umount -a to read
    umount -afv
  16. Save the file and exit the text editor.
  17. Edit rc.mu, the system initialisation script.
  18. Change the line
    hostname localhost
    to read
    hostname corebox
    where corebox is the name you want to give your system. This is name that appears at the login prompt.
  19. Save the file and exit the text editor.

Give me more details on this

Configure basic networking - optional

  1. You should already be in the /etc/rc.d directory. If not, change to it.
  2. Edit the file rc.mu, the initialistaion script for runlevel 3.
  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
  4. Add additional lines in a similar way for any other ethernet cards on your system.
  5. Add routing rules to the local network and the default gateway:
    route add -net 192.168.0.0/24 dev eth0
    route add -net default gw 192.168.0.1
    Thanks to DJ Ruden for the correction on this section!
  6. You may wish to add comments or echoes to the file for your own information.
  7. Save the file and exit the text editor.
  8. Edit the file rc.rb.
  9. At the second line of the file add the line:
    ifconfig eth0 down
  10. Add similar lines for any other ethernet cards on your system, adapting the above example as necessary.
  11. You may wish to add comments of echoes to the file for your own information.
  12. Save the file and exit the text editor.
  13. Edit the file rc.ha
  14. At the second line of the file add the line:
    ifconfig eth0 down
  15. Add similar lines for any other ethernet cards.
  16. You may wish to add comments of echoes to the file for your own information.
  17. Save the file and exit the text editor.
  18. Edit /etc/resolv.conf.
  19. Add the following lines to the file:
    domain localhost
    search
    nameserver 192.168.0.1
    nameserver 192.168.1.1
  20. If you have a FQDN for your machine, then you may substitute it into the domain line instead of localhost.
  21. Save the file and exit the text editor.

Give me more details on this

Another Backup point

  1. Copy /etc/lilo.conf to /mnt/floppy
  2. Copy /etc/fstab to /mnt/floppy
  3. Copy /etc/rc.d/* to /mnt/floppy
  4. Copy /etc/resolv.conf to /mnt/floppy

Give me more details on this

Rebooting to your new system

  1. Unmount the floppy drive and remove the disk.
  2. Reboot the system using
    shutdown -r now
  3. If you receive an error message at this command and the system does not reboot, use the command
    shutdown -rn now
  4. When the system has rebooted log in as root.
  5. At the system prompt enter:
    passwd
  6. Type and confirm a new password.

Give me more details on this

Converting to ext3

  1. Convert your ext2 partitions to ext3 using the tune2fs command.
  2. Edit /etc/fstab.
  3. Change the lines listing ext2 to read ext3. For example:
    /dev/hda1 / ext3 defaults 1 1
  4. Reboot the system using:
    shutdown -r now

Give me more details on this

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


Valid CSS!     Valid HTML 4.0!     Valid RSS
Original design © For oswd.org by SquireCD