4 GNU/Linux Structure & Installation
Mr. Hardik Joshi
Finalizing the Linux Distribution
As we have seen in the previous module that Linux OS comes in various distributions. Before finalizing the installation of Linux, we must select the best distribution that fits our need. Our technical expertise and necessity will help in finalizing a particular Linux distribution. As such, Linux does not have different OS for server or for desktop systems, however, in server based distributions the GUI may not be included. There are various criteria to finalize an appropriate distribution for Linux. The following indicators can help us to select a proper distribution:
- What type of hardware is available ? (X86, ARM, PPC etc.)
- What will be the main function of the system (Server or Desktop)
- What type of packages will be installed?
- How much hard disk space is available?
- How long is the support cycle for each release?
- How often are packages updated?
- Is it for experimental use or long term stable system?
- Is there any need of customizable kernel from the vendor?
Linux can be classified on various criteria, the following diagram classifies based on the use (whether personal or network based). There are nearly 1000+ flavours of Linux as of now, most of them are suitable for Server OS or for Desktop OS. A curious user may surf internet and try to find out the distribution that is mostly used by others. We must select the distribution such that proper help is available through nearby communities
Installation of Linux for personal use can be non-commercial solution like Ubuntu, Fedora, OpenSuse, CentOS etc., however, if we want to install for organization, it is beneficial to get a commercial product. The following Linux distributions can be installed for academia:
- CentOS ( https://www.centos.org/download/ ) – Good for Network Administrators
- BOSS ( http://www.bosslinux.in/ ) – Indian Linux
- Trisquel ( http://trisquel.info/en/download ) – Complies to free software
- Ubuntu ( http://www.ubuntu.com/download/desktop ) – Adopted by many schools
Modes of Installation
Depending on the availability of the system, its hardware configuration and installed software, we may select either of the modes of installation that are listed below:
- Bare Metal Installation
- Dual boot with other OS
- Using Live Media like Live CD/DVD/USB
- Using a host machine hypervisor program (eg. VMWare, Virtual Box, Hyper-V etc.)
A computer system with no OS installed in it is generally called bare metal. Installing Linux on bare metal is completely risk free as there is no thread of losing any data. However, we have to check the hardware configuration and decide whether the hardware present in our system supports the distribution that we are planning to install. In case, if there already exists and OS on the computer, we can plan of installing Linux as dual boot provided there is an empty partition in the hard disk. We must ponder on the following points before installing Linux as dual boot system:
- Is there sufficient hard disk space so that two or more OS can reside on a Single hard disk
- Is there any OS that already exists (eg. Windows)
- Separate partition must exist or needs to be re-partitioned
- Risk of losing previously installed OS or data
There are chances of modifying the boot sector while installing Linux as dual boot system.The prior OS may not be visible if any mistake is made during the installation process.
Since few years, Linux distributions are also available such that there is not need to install Linux on hard disk. We can use Linux directly from the USB drive or CD/DVD. Such kind of Linux are known as live media, the CD/DVD or USB can be bootable. As the media is bootable, we must ensure that the system boots from media and not from the hard disk. Using Linux from live media is surely fun as it does not require any installation, there is also no risk of losing data residing on the hard disk, however while using live media, the following issues may arise:
System performance may degrade (as data transfer rate is less)
Persevering the files from live media to hard disk can become trickier
Since past few years, good hardware is available at cheaper costs. So, if we have a good hardware with more RAM and efficient processor, we can think of using virtualization software to install Linux.
Installing Linux using hypervisors
With the development of virtualization technologies, installation of Linux has become very easy. There is no risk of losing any data when Linux is installed as a virtual machine. However, if the hardware is not efficient, the system performance may degrade while using hypervisors. Let us understand how virtualization is done. If there exists some OS on the hardware, we can install virtualization software like VirtualBox, VMWare, Hyper-V within the existing OS. Let us take a scenario, suppose Windows is existing in our system. It is is a licensed version, we may not remove Windows. Under such circumstances, we download the virtualization software and install Linux within the software. After the installation gets over, we will be running two OS concurrently, windows as a host OS and Linux as a guest OS. Such kind of installation will require nearly 10 GB of hard disk space of Windows. The Linux installation will reside as a file in hard disk. Figure 2 illustrates the virtualization technique. The hypervisor or virtualization software fits in between the Host OS and the Guest OS.
Modern computer hardware contains virtualization functionality. While using virtualization technique, we must remember to enable the virtualization flags of CPU from the BIOS. Latest version of Windows comes with Hyper-V as a feature, in such case there is no need to install any virtualization software but we can start using Hyper-V. Oracle VirtualBox is a free virtualization software that can be downloaded if Hyper-V is not present in the system. Let us see the steps used to install Linux with the help of virtualization.
Installation of Linux
Before we begin with the installation, we must have Linux in .iso format. Linux iso file can be kept in USB drive or on hard disk partition. There is no need for a separate hard disk partition, however, the hard disk must have atleast 10-12 GB of free space if we are planning entire Linux installation. Now, let us see step-by-step screens of installing Linux. The virtualization software demonstrated here is Oracle Virtual Box. The following things need to be taken care of:
Hard disk must have enough space for installation CPU Virtualization must be enabled from BIOS We have downloaded proper ISO file
The ISO file (64 bits) and our hardware (64 bits) must match Internet connection is desirable but not necessary
Figure 10: Step-8 (Select the location of ISO File)
Figure 11: Step-9 (Installation will being)
During the installation process, we will be asked to supply root password, create users, configure the country/time zone, configure languages, select the software to be installed. It is recommended that the root password must be remembered since root user is the administrator account(super user account). It is also recommended to select software/packages before installing to avoid post installation hassles of installation of individual software through internet.
Linux Boot Process & Partitions
In this section, we will understand the booting process and certain terminology associated with the filesystem. During the installation, we can create partitions and can configure the directories as per the requirement of the organization. For instance, if the organization needs to create 100 users, we must assign more disk space to /HOME directory.
The filesystem of Linux is entirely different from Windows. In Windows, we have C:, D: and so on as hard disk partitions whereas in Linux the partitions can be /boot, /bin, etc. So, in Linux we identify the mount point as ‘/’ (root).
Linux Boot Process
When Linux is successfully installed, we can restart the system. As soon as the system gets restarted, the hardware initializes and gradually the OS will start. The following steps are performed during the
- BIOS initializes
- POST routine executes
- Boot Loader from MBR is invoked
- Boot Loader gives a choice of OS to start
- Boot Loader loads the Linux Kernel
- Boot Loader loads the initramfs (RAM based file system)
Let us summarize the key concepts covered in this module
- Various parameters are used to finalize on a specific Linux Distribution.
- Installation of Linux can be done using different methods, however, the available hardware becomes the key deciding factor.
- Linux can be installed on a partition of hard disk or can be executed from live media or from hypervisor program.
- Hypervisor programs like VirtualBox are the easiest way to learn Linux without taking any risk.
you can view video on GNU/Linux Structure & Installation |