Abstract

In this section of the WPCUG Linux group we are going to learn how to build a Linux installation by making our own distribution. We will learn how to boot strap a system. How to create a system using the scripts and methods created for Gentoo.

Gentoo
Gentoo

Gentoo

Welcome to Linux Advanced

In this advanced section we are going to dig into Linux to see what make a distribution. We are NOT going to learn how to write C code. But we will need a working knowledge of how to configure, build, and install software. I am not going to assume you know how to do these tasks at this time. We will learn enough as we go along.

But before we get rolling on our journey of discovery, I am going to make a few assumptions about you. This is just some of the skills I am going to take for granted.

  • I am going to assume you know how to work with a command line. It will be a while before we get to the graphical interface you are use to today.

  • I am also going to assume that you have some familiarity with Linux command line tools. I don’t expect you to have a detailed knowledge about how to use shell scripts, but I will be asking you to do some of the learning on your own.

  • I will expect you to be able to use a simple editor. I will try to use nano, but sometimes I might use VIM.

  • Lastly I am going to assume that you will take some time, on your own, to perform the things we will do. The best way to learn is to try things yourself. If you can free up 3 gig of disk space on a computer for a sandbox partition, you will be able to try what we do at home.

OK, if I’ve scared you too much with these expectations, relax. We will try to provide plenty of references to help you learn to perform these tasks. If you look you will notice that I have provided links to tutorials for shell scripts, nano, and vim above. I will try to keep doing this when there is good outside information.

Linux Installations Overview

Before we start, lets take a minute and have a look at how to install Ubuntu. I am just using Ubuntu as an example for typical Linux Distributions.

Here’s a road map for the steps you will take during the installation process.

  1. Back up any existing data or documents on the hard disk where you plan to install.

  2. Gather information about your computer and any needed documentation, before starting the installation.

  3. Create partitionable space for Ubuntu on your hard disk.

  4. Locate and/or download the installer software and any specialized driver files your machine requires (except Ubuntu CD users).

  5. Set up boot tapes/floppies/USB sticks, or place boot files (most Ubuntu CD users can boot from one of the CDs).

  6. Boot the installation system.

  7. Select the installation language.

  8. Activate the ethernet network connection, if available.

  9. Create and mount the partitions on which Ubuntu will be installed.

  10. Watch the automatic download/install/setup of the base system.

  11. Install a boot loader which can start up Ubuntu and/or your existing system.

  12. Load the newly installed system for the first time.

Overview of the Installation Process

You will notice that once you make a few decisions, the rest of the work is done in the automatic download/install/setup step. The installation CD contains many scripts and executable programs which do the actual work.

When you do this type of install there are hundreds of decisions already made for you. Decisions like, which editors to install, where to locate the config files, library files, startup files, etc. Now there is nothing wrong with someone else making the decisions, but Linux is about choices.

So the purpose of these Advanced sessions, will be to see how and where some of these decision are made. We will be sticking to the Filesystem Hierarchy Standard for our directory locations. And we will be using the Linux Standard Base for our application configurations.

I am going to assume that you have all done an installation using one of the graphical installers. If you have not, have a look at Ubuntu Graphical Install documentation.

Gentoo Distribution

For our first try at working with a boot loader style install we are going to install Gentoo Linux.

The reason I picked Gentoo is because it has a clearly documented process for installing linux using command line tools and custom scripts. This type of install is similiar to the method we will use to configure a Linux From Scratch system. But it has the advantage of automating many of the steps.

BootStraping a Computer

Before we get started lets take a look at the process known as bootstraping a computer.

Bootstrapping a Linux system - an Analysis

Installing Gentoo

At this point I am going to move to the Sandbox machine and walk through the steps of doing a Gentoo Minimal install. Since I am using the gentoo process I will be using the Gentoo Linux x86 Handbook.

What to remember

Before I do a presentation, I typically do all the steps and operations at home. This way I have been through the steps prior to showing them to a group. The advantage is that I get to anticipate what should happen during a presentation. It allows me have reasonable confidence thaty things will go as planned.

I am telling you this because I realized I fall into the same trap that I see happen over and over when dealing with service person. They sit at your computer and call up tasks, make choices, change parameters, and basically fly thru one screen after another. This is good for them because it gets the job done and they move on. It is bad for you because it is almost impossible to follow what they did to fix the issue. When this has happened to me, I wished that I had a camera focused on the screen so I could go back and see what they were doing.

So I am going to make two suggestions for what I think you should do during these talks.

  1. Take notes of the commands I am using while I work on the system. For me to record all the steps is not yet practical, although I am exploring how to do this. If I am going to fast to write down the commands, ask me to pause and explain them.

  2. When you perform the setup yourself don’t be afraid to play with the install. Remember, the idea is to learn how to use Linux. You should not be afraid of doing it again and again. You often can learn more by repeating something rather than trying to get it all correct the first try.

  3. When you are working, use a virtual terminal to open an editor and keep notes. This is a good way to capture information for later use. I will demonstrate how to do this during the instll.


Written by John F. Moore

Last Revised: Mon Jan 16 15:37:36 EST 2017

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
HTML5 Powered with CSS3 / Styling, and Semantics