Monday, May 30, 2011

Which Linux for my system??

PRELUDE

Over the past decade, we are seeing an accelerated adoption rate of Linux operating system for many hardware platforms. The hardware platforms are based out of either stand-alone processors or integrated processors or even systems on chip (SOC), 32-Bit or 64-Bit, single-core or multi-core, special cell processors or general purpose graphical processing units (GPU). About ten billion processors were manufactured in the year 2008. List of some of the processors can be found at http://en.wikipedia.org/wiki/List_of_microprocessors

The trend of number of transistors that can be put on an integrated circuit is doubling approximately every two years, almost following Moore's law. So, multiple new compact and efficient hardware platforms eventually hitting the market is inevitable.

The Linux market is growing rapidly because of secured networking protocols and ability to support variety of applications, its scalability, being royalty free and because of the number of active developers. Linux distributions may be specialized for different purposes including computer architecture support, embedded systems, stability, security, localization to a specific region or language, targeting of specific user groups and support for real-time applications. From general purpose use on Desktop, Servers, Mainframes , Supercomputers and Embedded Systems, Linux supports a vast variety of hardware platforms, probably more than any other operating system. Linux distributions have taken colossal of forms - from fully featured desktop, server, laptop, netbook, mobile phone, tablet operating systems to minimal environments as well. List of some of the Linux distributions can be found at http://en.wikipedia.org/wiki/List_of_Linux_distributions
(and also at http://distrowatch.com)

There are tools available to help select an appropriate distribution too. Yet, it’s not easy to pick up a Linux distribution for reasons like variety of choices, support for a particular feature or application on particular distribution, device drivers and processor architectures (as you see from the above, there are enormous hardware platforms, both custom and off the shelf). Also there are types as well, like live CD and flash drive installations. And for portable devices, there is already an intimidating list of hardware dependent distributions and versions of meego and android that are contemporary. It would be nice to have an easy method to pick up the right distribution and version as Linux seems to be eternal. Socrates said, “The unexamined life is not worth living”. So, let me elaborate some of the superficial points which may be useful in coming up with one:

1. Network booting is the process of booting a system from a network interface independently of data storage devices or installed operating systems. Most of the hardware platforms (esp. Intel based) provide an option to boot from the network in their firmware via the Preboot eXecution Environment (PXE). The PXE protocol is a combination of DHCP and TFTP protocols. DHCP is used to locate the appropriate boot server or servers and TFTP used to download the initial boot program and additional files. More on http://www.pix.net/software/pxeboot/archive/pxespec.pdf

2. Board Support Package (BSP) is implementation specific support code for a given hardware platform that conforms to a given operating system. It is commonly built with a boot loader that contains the minimal device support to load the operating system and device drivers for all the devices on the hardware platform. Linux Support Package or Linux BSP is commonly used term in the Linux world.

3. Linux kernel is maintained at http://www.kernel.org/ . Several other public source trees exist outside the kernel.org mainline, mostly for architecture specific development. For ease of use, a pre compiled Linux distribution can be download that supports particular hardware platform. It’s also very much possible to find the nearest open-source Linux kernel to the particular hardware platform and port it.

4. Once the operating system is installed, installing, upgrading, configuring, and removing software packages and their dependencies are cumbersome operations. Package Management System (PMS) is a collection of software tools to automate this process in a consistent manner. It typically maintains a database of software dependencies and version information to prevent software mismatches and missing prerequisites. Also allows upgrading software with latest versions, typically from a software repository. On my openSUSE desktop I use yast software management and zypper to install and maintain software packages. I also download and install rpm’s sometimes. Plenty of such divine tools are available on Linux distributions with comand line and graphical interfaces examples include yum, apt, dpkg, up2date, whohas, etc.

REVERIE

I stumbled upon an intriguing idea to automate the selection and install method as most of the necessary things are discretely available and can be made use of. Read through the synopsis below.

The Network Boot program which may be a ROM chip based or boot loader (like GRUB) based can additionally scan the system for listing down the architecture and devices on the hardware platform. The list could potentially include the comprehensive details not limiting to:
- CPU architecture, Register size, Clock speed and number of cores
- Size of memory (RAM)
- Display / Graphic adapters and Monitor / Display Devices (like LCD)
- IDE ATA / ATAPI / SCSI Controllers
- PCI Root Hubs and attached Devices
- PCMCIA adapters and attached Devices
- USB Root Hubs and attached Devices
- 1394 controllers and attached Devices
- Secure Digital host controllers
- Network interface adapters
- Bluetooth controllers
- Human Interface Devices
- Storage Devices / Disk Drives / DVD/CD-ROM drives
- Audio Controllers

This list could be sent to a remote Server over the intra or inter network by the Network Boot program. And of course, in order to the use intra or inter network by the Network Boot program, it should request an IP address (via DHCP) to a boot-server which is assumed to be local and separate (or even it could be the same) from the Server discussed below.

The Server can substantially have the following:
- Running network services like HTTP, FTP, TFTP, BOOTP, etc.
- Service to receive requests from Network Boot client program's
- Interpreter to parse the received list and to figure out suitable installable options of Linux kernel, Support Packages & Software Packages
- Provider program which can ftp the requested software components
- Archives of Readily available precompiled Linux Kernel images
- Archives of Support Packages and Drivers
- Software repository
- If kernel or driver or software package isn't available on the Server then it can maintain a link to the repository where it can be located

The PXE servers do run network services, does have a PXE Configuration file that contains the list of kernels which are available to boot and a copies of installer kernels. Also, Cobbler (https://fedorahosted.org/cobbler) is an installation server that assembles all the usual steps needed for a large network installation like TFTP, DNS, PXE, installation trees etc. and automates the process.

After receiving the list, the Server could parse the list and then generate suitable installable options of Linux kernel, Support Packages & Software Packages and then send it back to the System.

The Network Boot program could receive and then display the received list to the user with installable options (like GRUB presenting a graphical interface where the user can select which operating system to boot).

The user could pick the latest kernel versions, distributions, suitable drivers for the devices and the application software or development tools from the list and can select INSTALL. Most of the Linux distributions already have an interactive GUI installer.

The Network Boot program could pick items from the user selection and then request the Server for the software components and installables.

The Server can ftp the requested software. Starting from kernel installation to application software, this process would continue. If the server does not have the requested software component, it can maintain a list of repository locations and the fetch it from other servers and then ftp it back to the Network Boot program.



The method can be simplified by adding functions like auto install or recommended for an inscrutable layman, and for the experts, the as is custom install would suffice.

In a nutshell, it’s combining PXE, Boot loader, Linux distribution selector and a Package Management System in the conquest to pick up the right distribution and version of Linux. The only requirement or constraint is the network access to the Server. The hand held devices too could utilize the method as most of them have wifi NICs, and hand held devices without wifi are futile.

This method could also be used for finding the drivers for hotplug devices (like the windows "Install the software automatically" option) and to upgrade and manage softwares later in future.

I was smitten by an exquisite article on Clonezilla (http://www.clonezilla.org/) in the January/2011 issue of the Linux Journal (http://www.linuxjournal.com/) by Jeramiah Bowling. Clonezilla is open-source suite of cloning tools over the network and has significant resemblence to the method I was thoughtful about. It could be the starting point.


For a rendezvous, please leave a comment..

No comments:

Post a Comment