4/13/2019

Venturing Down The Linux Rabbit Hole

A New Project

     This is the start of a new series of posts documenting my exploration and configuration of Ubuntu Server 18.04.2 LTS  with the objective of having a better understanding what is under the hood of Linux and how to interact with it's CLI

Why Ubuntu?   

    Ubuntu it self is a widely supported and adopted  Linux distribution and is also based on another widely supported and derived (parent) Linux distribution, Debian. Canonical, which is the parent company for Ubuntu, itself maintains many versions of Linux for different forms of hosts and "flavors" the individual forms Ubuntu . Then you have third parties who take Ubuntu make their own derivatives like Mint. But when you get down to it, Ubuntu itself is a derivative of Debian which likely be the most derived and one of the oldest Linux distributions still actively being developed. With any luck most of the knowledge and experince gained from these exercises will remain relevant long into the future. 

Why Ubuntu Server? 

    This project is an exercise to force myself to use CLI commands and familiarize myself with the underlying environment and remote access. Ubuntu Server has most if not all of everything Ubuntu is under the hood, minus the Graphical User Interface (GUI) environment and associated applications.  After the next post, I  will not have display or input devices connected to it after the initial configuration process. As of starting this, 18.04.2 LTS (long term support)  is the latest/newest version that will have the longest time of support.

Note: there are are even two different installer versions (The standard )  for a more in information I suggest reading this link,  At the most basic level,  the  more easily e easily  found "line" installer the image uses a Canonical/ubuntu brewed installer and installs a slightly different set of package (notably ncluding openssh server) and the "alternative"  (which lacks the word "live" in the file name) uses the Debian installer.  Again read the link for the best comparison between the two versions.

What to expect in these posts?

    This documentation is intended to be a building block towards knowledge based on an existing foundation.  It will assume the reader has knowledge of PC hardware, OS installation, networking protocols, competence using MS Windows, bios settings, and etc. I will highlight what I considered important leaps from my base of knowledge and important things that might not be clearly explained difficult to pick out from the "--help" and "man" pages can be accessed in from the CLI of the OS itself.  The underlying goal is to configure and implement protocols and services on Ubuntu-Server and co-exist with devices running  much more popular Operating systems that people directly interact with,  Android, Windows, and Chrome0S.

But aren't Android and ChromeOS Linux based operating systems themselves?

    Under the hood yes,  but most users will never touch the actual "Linux" parts nor made aware of them.  For consumers, Linux is best when the user him or herself does not have to touch it nor is made aware it is there.

Gasp,  you forgot about iOS and OSX?

Nope, but I am trying. I do not own Apple products (nor condone their purchase). I simply cannot write about my experiences with hardware/software I do not own

 Onward to the real meat and potatoes...

Part 1 -  The Environment

The Hardware

While most people would be content with starting this process in a virtual machine, there is something so much more appealing to me with just running an operating system on directly on the hardware without anything in between to worry about. .Especially for someone like me who doesn't have a box already built running multiple other machines.  For purposes, I have built a system from disused parts in I've been collecting.




What I am working with:

  •     AM2+ socket motherboard (Foxconn A76ML-K w/ 760g chipset)
  •     AMD Phenom II X4 945 (95 watt version)
  •     2 x 2Gig ddr2 dual channel ram
  •     80GB SATA HDD
  •     2 PCI 100mbit Ethernet cards
  •     AND a grab (anti-static) bag of expansion cards I will be swapping out in the future.
This very much so is becoming a legacy system, but should be ok enough for learning,  Also note, if could use a USB flash drive, or even a SSD isntead of a HDD like I am using.  Linux isn't that picky about where it installs from, just make sure your bios supports booting from it.

Turning a box of hardware into a Server.

Download and create installation USB Flash drive. 

    Files can be download easily from Ubuntu's website,,  I will be using the "Alternative Ubuntu Installer" which doesn't install the cloud-init package.  If you downloaded the image on a Windows machine like Id id, use a piece of software like Rufus to create actual installation flash drive. 

Building the System.

These are my general steps for system building:

    1. Construct the core of system (Mother Board, CPU, RAM, PSU) together in a case.
    2. Plug in power, Keyboard, monitor, network cable, and etc.
    3. Turn on to see if posts, if it doesn't, time to troubleshoot.
    4. Once you are sure the computer posts, unplug the power cable, and add expansion cards, storage drive, and insert the installation flash drive.
    5. Clear the BIOS with the jumpers on the motherboard or momentarily pull the battery from the system. When building with a new or used motherboard a clean slate is best, the bios will need to go through some steps to recognize the CPU and it's feature sets.  Do not skip this step.

Configure the BIOS.

 NOTE: As previously mentioned I will not go into detailed instructions. Every motherboard is different, your experience may vary.

    1. Disable onboard hardware that will NOT be used. If you are using older hardware there will be  legacy  features including floppy controller, IDE, parallel port, IR, sound, and etc that you will probably not need.  Warning.  Make sure NOT to disable useful/needed hardware like integrated graphics (IGP), serial interface(s) (yes, keep the serial rs232/DB9), SATA, USB, onboard Ethernet, and etc. If in doubt leave it enabled. 
   
    2. Configure the onboard hardware you will use.  This includes:setting the SATA interfaces to AHCI mode and enable Wake-on-LAN (WoL).  You could also reduce the ram dedicated to the IGP to the lowest amount allowed, Ubuntu-Server lacks a GUI environment and the intention is to run it headless (eventually.) and dedicating it to the IGP will make it inaccessible to the OS for system ram.

   I also like to take the opportunity to set the motherboard's fan's settings to be quiet and only spin up when temperatures are high.  Most motherboards will default to running the fans at 100% regardless of load/temperature, which is good for the system health bad for people that might spend long periods listening to them.
   
    3. Double check previous steps, and set your boot order to for installer USB flash drive first, save config and restart into your install flash drive.

Install the Operating System

    1. Install Ubuntu-Server from the flash drive remove USB upon reboot. I let the installer automatically partition and format the system drive.

    2. Return to the bios and remove USB boot option from boot order.  Keep in the flash drive handy, to either re-install or attempt to fix a borked install in the future.


Once you have booted into Ubuntu-Server it should leave you with a CLI interface requesting a user name and password.

Next Post - Going headless.

No comments:

Post a Comment

Debian/Ubunt Package Installation from Default Repositories.

Before you Begin Note: This is meant to be a building upon the previous posts with minimal repetition, the previous post has relevant info...